Skip to content

Commit

Permalink
[Bug] Fix for environment detection in barebones environments. (guida…
Browse files Browse the repository at this point in the history
  • Loading branch information
nopdive authored and svrvt committed Nov 14, 2024
1 parent c6db4ac commit 40a64d6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions guidance/visual/_environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def _detect_ipython(flags: EnvFlags) -> bool:
try:
from IPython import get_ipython
found = get_ipython() is not None
except NameError: # pragma: no cover
except (NameError, ImportError): # pragma: no cover
pass
return found

Expand All @@ -129,7 +129,7 @@ def _detect_ipython_zmq(flags: EnvFlags) -> bool:
found = False # Terminal running IPython
else:
found = False # Other type (?)
except NameError: # pragma: no cover
except (NameError, ImportError): # pragma: no cover
found = False # Probably standard Python interpreter

flags.is_notebook |= found
Expand Down

0 comments on commit 40a64d6

Please sign in to comment.