Skip to content

Commit

Permalink
only set pager in an ipython context (#774)
Browse files Browse the repository at this point in the history
  • Loading branch information
maximlt authored Jul 24, 2023
1 parent 524bf57 commit 00a5b85
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions param/parameterized.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,16 @@
)

try:
# In case the optional ipython module is unavailable
from .ipython import ParamPager
param_pager = ParamPager(metaclass=True) # Generates param description
except:
get_ipython()
except NameError:
param_pager = None
else:
# In case the optional ipython module is unavailable
try:
from .ipython import ParamPager
param_pager = ParamPager(metaclass=True) # Generates param description
except:
param_pager = None

from inspect import getfullargspec

Expand Down

0 comments on commit 00a5b85

Please sign in to comment.