2828
2929logger  =  logging .getLogger (__name__ )
3030
31- DEFAULT_FORMATS  =  dict ( html = " svg"latex = " pdf"text = None ) 
31+ DEFAULT_FORMATS  =  { " html" :  " svg"" latex" :  " pdf"" text" :  None } 
3232
3333
3434def  merge_dict (dst , src ):
@@ -58,21 +58,21 @@ class AafigDirective(images.Image):
5858
5959    has_content  =  True 
6060    required_arguments  =  0 
61-     own_option_spec  =  dict ( 
62-         line_width = float ,
63-         background = str ,
64-         foreground = str ,
65-         fill = str ,
66-         aspect = nonnegative_int ,
67-         textual = flag ,
68-         proportional = flag ,
69-     ) 
61+     own_option_spec  =  { 
62+         " line_width" :  float ,
63+         " background" :  str ,
64+         " foreground" :  str ,
65+         " fill" :  str ,
66+         " aspect" :  nonnegative_int ,
67+         " textual" :  flag ,
68+         " proportional" :  flag ,
69+     } 
7070    option_spec  =  images .Image .option_spec .copy ()
7171    option_spec .update (own_option_spec )
7272
7373    def  run (self ):
74-         aafig_options  =  dict () 
75-         own_options_keys  =  [self .own_option_spec .keys ()]  +  [ "scale" ]
74+         aafig_options  =  {} 
75+         own_options_keys  =  [self .own_option_spec .keys (),  "scale" ]
7676        for  (k , v ) in  self .options .items ():
7777            if  k  in  own_options_keys :
7878                # convert flags to booleans 
@@ -88,7 +88,7 @@ def run(self):
8888        if  isinstance (image_node , nodes .system_message ):
8989            return  [image_node ]
9090        text  =  "\n " .join (self .content )
91-         image_node .aafig  =  dict ( options = aafig_options , text = text ) 
91+         image_node .aafig  =  { " options" :  aafig_options , " text" :  text } 
9292        return  [image_node ]
9393
9494
@@ -206,7 +206,7 @@ def setup(app):
206206    app .add_directive ("aafig" , AafigDirective )
207207    app .connect ("doctree-read" , render_aafig_images )
208208    app .add_config_value ("aafig_format" , DEFAULT_FORMATS , "html" )
209-     app .add_config_value ("aafig_default_options" , dict () , "html" )
209+     app .add_config_value ("aafig_default_options" , {} , "html" )
210210
211211
212212# vim: set expandtab shiftwidth=4 softtabstop=4 : 
0 commit comments