Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c0f6a96

Browse files
author
cclauss
authored
Undefined name: cbook --> matplotlib.cbook
Use the _fully qualified name_ because __matplotlib__ is currently imported but __matplotlib.cbook__ is not. flake8 testing of https://github.com/matplotlib/matplotlib on Python 3.6.3 $ __flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics__ ``` ./lib/matplotlib/sphinxext/plot_directive.py:341:5: F821 undefined name 'cbook' cbook.warn_deprecated('3.0', name='remove_coding', removal='3.1') ^ 1 F821 undefined name 'cbook' 1 ```
1 parent ff67864 commit c0f6a96

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/matplotlib/sphinxext/plot_directive.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ def remove_coding(text):
338338
r"""
339339
Remove the coding comment, which six.exec\_ doesn't like.
340340
"""
341-
cbook.warn_deprecated('3.0', name='remove_coding', removal='3.1')
341+
matplotlib.cbook.warn_deprecated('3.0', name='remove_coding', removal='3.1')
342342
sub_re = re.compile("^#\s*-\*-\s*coding:\s*.*-\*-$", flags=re.MULTILINE)
343343
return sub_re.sub("", text)
344344

0 commit comments

Comments
 (0)