Skip to content

Commit be9b8ae

Browse files
authored
Import get_ipython to avoid NameError (#138)
As described in #137
1 parent 558e428 commit be9b8ae

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pyviz_comms/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ class extension(param.ParameterizedFunction):
5555

5656
def __new__(cls, *args, **kwargs):
5757
if _in_ipython:
58+
from IPython import get_ipython
59+
5860
exec_count = get_ipython().execution_count # noqa: F821
5961
extension._repeat_execution_in_cell = (exec_count == cls._last_execution_count)
6062
# Update the last count on this base class only so that every new instance

0 commit comments

Comments
 (0)