File tree Expand file tree Collapse file tree 1 file changed +1
-6
lines changed Expand file tree Collapse file tree 1 file changed +1
-6
lines changed Original file line number Diff line number Diff line change @@ -532,19 +532,14 @@ def get_plot_formats(config):
532
532
default_dpi = {'png' : 80 , 'hires.png' : 200 , 'pdf' : 200 }
533
533
formats = []
534
534
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 (',' )
540
535
for fmt in plot_formats :
541
536
if isinstance (fmt , str ):
542
537
if ':' in fmt :
543
538
suffix , dpi = fmt .split (':' )
544
539
formats .append ((str (suffix ), int (dpi )))
545
540
else :
546
541
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 :
548
543
formats .append ((str (fmt [0 ]), int (fmt [1 ])))
549
544
else :
550
545
raise PlotError ('invalid image format "%r" in plot_formats' % fmt )
You can’t perform that action at this time.
0 commit comments