@@ -641,14 +641,14 @@ def digest_parser(self, parser: configparser.ConfigParser) -> Self:
641641 gui_location = tuple (
642642 map (int , re .split (r"[;,\-]" , parser ["CLI" ]["gui_location" ])),
643643 )
644- setattr ( self , " gui_location" , gui_location )
644+ self . gui_location = gui_location
645645
646646 window_size = parser ["CLI" ][
647647 "window_size"
648648 ] # if not "default", get a tuple of the position
649649 if window_size != "default" :
650650 window_size = tuple (map (int , re .split (r"[;,\-]" , window_size )))
651- setattr ( self , " window_size" , window_size )
651+ self . window_size = window_size
652652
653653 # plugins
654654 plugins = parser ["CLI" ].get ("plugins" , fallback = "" , raw = True )
@@ -672,7 +672,7 @@ def digest_parser(self, parser: configparser.ConfigParser) -> Self:
672672
673673 val = parser ["CLI" ].get ("progress_bar" )
674674 if val :
675- setattr ( self , " progress_bar" , val )
675+ self . progress_bar = val
676676
677677 val = parser ["ffmpeg" ].get ("loglevel" )
678678 if val :
@@ -682,11 +682,11 @@ def digest_parser(self, parser: configparser.ConfigParser) -> Self:
682682 val = parser ["jupyter" ].getboolean ("media_embed" )
683683 except ValueError :
684684 val = None
685- setattr ( self , " media_embed" , val )
685+ self . media_embed = val
686686
687687 val = parser ["jupyter" ].get ("media_width" )
688688 if val :
689- setattr ( self , " media_width" , val )
689+ self . media_width = val
690690
691691 val = parser ["CLI" ].get ("quality" , fallback = "" , raw = True )
692692 if val :
@@ -837,15 +837,12 @@ def digest_args(self, args: argparse.Namespace) -> Self:
837837 if args .tex_template :
838838 self .tex_template = TexTemplate .from_file (args .tex_template )
839839
840- if (
841- self .renderer == RendererType .OPENGL
842- and getattr (args , "write_to_movie" ) is None
843- ):
840+ if self .renderer == RendererType .OPENGL and args .write_to_movie is None :
844841 # --write_to_movie was not passed on the command line, so don't generate video.
845842 self ["write_to_movie" ] = False
846843
847844 # Handle --gui_location flag.
848- if getattr ( args , " gui_location" ) is not None :
845+ if args . gui_location is not None :
849846 self .gui_location = args .gui_location
850847
851848 return self
0 commit comments