From 18b8e76d67baf8c594611be2211c51da033d46ce Mon Sep 17 00:00:00 2001 From: Patrick Kidger <33688385+patrick-kidger@users.noreply.github.com> Date: Tue, 26 Sep 2023 02:11:14 +0100 Subject: [PATCH] Be tolerant of faulty IPython installs. --- jaxtyping/_ipython_extension.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/jaxtyping/_ipython_extension.py b/jaxtyping/_ipython_extension.py index 50fec53..2452e50 100644 --- a/jaxtyping/_ipython_extension.py +++ b/jaxtyping/_ipython_extension.py @@ -21,7 +21,9 @@ try: _JaxtypingTransformer(typechecker=typechecker) ) -except ImportError: +except Exception: + # Very broad exception-handling, as e.g. IPython will sometimes be + # present but fail to import for mysterious reasons. pass