File tree Expand file tree Collapse file tree 1 file changed +3
-10
lines changed Expand file tree Collapse file tree 1 file changed +3
-10
lines changed Original file line number Diff line number Diff line change 146
146
import sys
147
147
import textwrap
148
148
import traceback
149
- import warnings
150
149
151
150
from docutils .parsers .rst import directives , Directive
152
151
from docutils .parsers .rst .directives .images import Image
153
152
import jinja2 # Sphinx dependency.
154
153
155
154
import matplotlib
156
155
from matplotlib .backend_bases import FigureManagerBase
157
- try :
158
- with warnings .catch_warnings (record = True ):
159
- warnings .simplefilter ("error" , UserWarning )
160
- matplotlib .use ('Agg' )
161
- except UserWarning :
162
- import matplotlib .pyplot as plt
163
- plt .switch_backend ("Agg" )
164
- else :
165
- import matplotlib .pyplot as plt
156
+ import matplotlib .pyplot as plt
166
157
from matplotlib import _pylab_helpers , cbook
158
+
159
+ matplotlib .use ("agg" )
167
160
align = Image .align
168
161
169
162
__version__ = 2
You can’t perform that action at this time.
0 commit comments