File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -532,19 +532,14 @@ def get_plot_formats(config):
532532 default_dpi = {'png' : 80 , 'hires.png' : 200 , 'pdf' : 200 }
533533 formats = []
534534 plot_formats = config .plot_formats
535- if isinstance (plot_formats , str ):
536- # String Sphinx < 1.3, Split on , to mimic
537- # Sphinx 1.3 and later. Sphinx 1.3 always
538- # returns a list.
539- plot_formats = plot_formats .split (',' )
540535 for fmt in plot_formats :
541536 if isinstance (fmt , str ):
542537 if ':' in fmt :
543538 suffix , dpi = fmt .split (':' )
544539 formats .append ((str (suffix ), int (dpi )))
545540 else :
546541 formats .append ((fmt , default_dpi .get (fmt , 80 )))
547- elif type (fmt ) in (tuple , list ) and len (fmt ) == 2 :
542+ elif isinstance (fmt , (tuple , list ) ) and len (fmt ) == 2 :
548543 formats .append ((str (fmt [0 ]), int (fmt [1 ])))
549544 else :
550545 raise PlotError ('invalid image format "%r" in plot_formats' % fmt )
You can’t perform that action at this time.
0 commit comments