@@ -643,14 +643,14 @@ def digest_parser(self, parser: configparser.ConfigParser) -> Self:
643643 gui_location = tuple (
644644 map (int , re .split (r"[;,\-]" , parser ["CLI" ]["gui_location" ])),
645645 )
646- setattr ( self , " gui_location" , gui_location )
646+ self . gui_location = gui_location
647647
648648 window_size = parser ["CLI" ][
649649 "window_size"
650650 ] # if not "default", get a tuple of the position
651651 if window_size != "default" :
652652 window_size = tuple (map (int , re .split (r"[;,\-]" , window_size )))
653- setattr ( self , " window_size" , window_size )
653+ self . window_size = window_size
654654
655655 # plugins
656656 plugins = parser ["CLI" ].get ("plugins" , fallback = "" , raw = True )
@@ -671,7 +671,7 @@ def digest_parser(self, parser: configparser.ConfigParser) -> Self:
671671
672672 val = parser ["CLI" ].get ("progress_bar" )
673673 if val :
674- setattr ( self , " progress_bar" , val )
674+ self . progress_bar = val
675675
676676 val = parser ["ffmpeg" ].get ("loglevel" )
677677 if val :
@@ -681,11 +681,11 @@ def digest_parser(self, parser: configparser.ConfigParser) -> Self:
681681 val = parser ["jupyter" ].getboolean ("media_embed" )
682682 except ValueError :
683683 val = None
684- setattr ( self , " media_embed" , val )
684+ self . media_embed = val
685685
686686 val = parser ["jupyter" ].get ("media_width" )
687687 if val :
688- setattr ( self , " media_width" , val )
688+ self . media_width = val
689689
690690 val = parser ["CLI" ].get ("quality" , fallback = "" , raw = True )
691691 if val :
@@ -836,15 +836,12 @@ def digest_args(self, args: argparse.Namespace) -> Self:
836836 if args .tex_template :
837837 self .tex_template = TexTemplate .from_file (args .tex_template )
838838
839- if (
840- self .renderer == RendererType .OPENGL
841- and getattr (args , "write_to_movie" ) is None
842- ):
839+ if self .renderer == RendererType .OPENGL and args .write_to_movie is None :
843840 # --write_to_movie was not passed on the command line, so don't generate video.
844841 self ["write_to_movie" ] = False
845842
846843 # Handle --gui_location flag.
847- if getattr ( args , " gui_location" ) is not None :
844+ if args . gui_location is not None :
848845 self .gui_location = args .gui_location
849846
850847 return self
0 commit comments