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

Skip to content

Commit 7867676

Browse files
author
cclauss
committed
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 e04da0a commit 7867676

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
@@ -164,7 +164,7 @@
164164
plt.switch_backend("Agg")
165165
else:
166166
import matplotlib.pyplot as plt
167-
from matplotlib import _pylab_helpers
167+
from matplotlib import _pylab_helpers, cbook
168168

169169
__version__ = 2
170170

0 commit comments

Comments
 (0)