Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2cdcfe7 commit 44b564fCopy full SHA for 44b564f
1 file changed
lib/matplotlib/rcsetup.py
@@ -20,6 +20,7 @@
20
import operator
21
import os
22
import re
23
+import sys
24
25
import numpy as np
26
@@ -187,12 +188,10 @@ def _validate_date_int_mult(s):
187
188
if s is None:
189
return
190
s = validate_bool(s)
- try:
191
- import matplotlib.dates as mdates
+ # only do this if dates is already imported...
192
+ mdates = sys.modules.get("matplotlib.dates")
193
+ if mdates:
194
mdates._rcParam_helper.set_int_mult(s)
- except Exception:
- # this can fail at import because mdates ends up as a circular import.
195
- pass
196
197
198
def _validate_tex_preamble(s):
0 commit comments