File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 1515
1616
1717try :
18- ip = get_ipython ()
18+ get_ipython ()
1919except NameError :
2020 IS_IPYTHON = False
21+ IPYTHON = None
2122else :
2223 IS_IPYTHON = True
24+ IPYTHON = get_ipython ()
2325
2426
2527class PlotArea :
@@ -673,15 +675,13 @@ def delete_graphic(self, graphic: Graphic):
673675
674676 if IS_IPYTHON :
675677 # remove any references that ipython might have made
676- ip = get_ipython ()
677-
678678 # check both namespaces
679- for namespace in [ip .user_ns , ip .user_ns_hidden ]:
679+ for namespace in [IPYTHON .user_ns , IPYTHON .user_ns_hidden ]:
680680 # find the reference
681681 for ref , obj in namespace .items ():
682682 if graphic is obj :
683683 # we found the reference, remove from ipython
684- ip .del_var (ref )
684+ IPYTHON .del_var (ref )
685685 break
686686
687687 def clear (self ):
You can’t perform that action at this time.
0 commit comments