8000 Merge pull request #19597 from Bolton-and-Menk-GIS/ipython_fix · matplotlib/matplotlib@b0aab9f · GitHub
[go: up one dir, main page]

Skip to content

Commit b0aab9f

Browse files
authored
Merge pull request #19597 from Bolton-and-Menk-GIS/ipython_fix
Fix IPython import issue
2 parents 2e248f5 + d70d826 commit b0aab9f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/matplotlib/backend_bases.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1743,7 +1743,7 @@ def _fix_ipython_backend2gui(cls):
17431743
# `ipython --auto`). This cannot be done at import time due to
17441744
# ordering issues, so we do it when creating a canvas, and should only
17451745
# be done once per class (hence the `lru_cache(1)`).
1746-
if "IPython" not in sys.modules:
1746+
if sys.modules.get("IPython") is None:
17471747
return
17481748
import IPython
17491749
ip = IPython.get_ipython()

0 commit comments

Comments
 (0)
0