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

Skip to content

Commit 96d37e3

Browse files
committed
DOC : add note + linter guard
1 parent ea367e2 commit 96d37e3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/matplotlib/_pylab_helpers.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,9 @@ def destroy_fig(cls, fig):
8484

8585
@classmethod
8686
def destroy_all(cls):
87-
import gc
87+
# this is need to ensure that gc is available in corner cases
88+
# where modules are being torn down after install with easy_install
89+
import gc # nnqa
8890
for manager in list(cls.figs.values()):
8991
manager.canvas.mpl_disconnect(manager._cidgcf)
9092
manager.destroy()

0 commit comments

Comments
 (0)