From ffb3e825406eee71ce6ff58f25dcf60b740383bc Mon Sep 17 00:00:00 2001 From: Andreas Kirsch Date: Mon, 18 Dec 2023 22:22:25 +0000 Subject: [PATCH] Use legacy for ZMQInteractiveShell instead of throwing AttributeError highlighting_style is not available in ZMQInteractiveShell. Use "legacy" as is correct. --- prettyprinter/extras/ipython.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prettyprinter/extras/ipython.py b/prettyprinter/extras/ipython.py index 9ca7b58..86cc133 100644 --- a/prettyprinter/extras/ipython.py +++ b/prettyprinter/extras/ipython.py @@ -53,7 +53,7 @@ def pretty(self, obj): obj, stream=self.stream, style=pygments_style_from_name_or_cls( - ipy.highlighting_style, + getattr(ipy, "highlighting_style", "legacy"), ishell=ipy ), width=columns,