Skip to content

Commit b8e2281

Browse files
authored
Merge pull request #466 from WeatherGod/dedent_fix
Try using inspect.cleandoc() instead of matplotlib.cbook.dedent()
2 parents 0079438 + ac2957d commit b8e2281

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/mpl_toolkits/basemap/__init__.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,12 @@
2323
from urllib.request import urlretrieve, urlopen
2424

2525
from matplotlib import __version__ as _matplotlib_version
26-
from matplotlib.cbook import dedent
26+
try:
27+
from inspect import cleandoc as dedent
28+
except ImportError:
29+
# Deprecated as of version 3.1. Not quite the same
30+
# as textwrap.dedent.
31+
from matplotlib.cbook import dedent
2732
# check to make sure matplotlib is not too old.
2833
_matplotlib_version = LooseVersion(_matplotlib_version)
2934
_mpl_required_version = LooseVersion('0.98')

0 commit comments

Comments
 (0)