From a60af140143f435b7d036c94d1a2ce6ede970f51 Mon Sep 17 00:00:00 2001 From: evieira Date: Fri, 31 Jul 2026 13:49:53 +0000 Subject: [PATCH] add ipython None check in accordance with new iPython 9.16 release Signed-off-by: evieira --- sqlmesh/core/console.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sqlmesh/core/console.py b/sqlmesh/core/console.py index 8af837b08a..f9a758b405 100644 --- a/sqlmesh/core/console.py +++ b/sqlmesh/core/console.py @@ -2920,7 +2920,10 @@ def __init__( super().__init__(console, **kwargs) - self.display = display or get_ipython().user_ns.get("display", ipython_display) + ipython = get_ipython() + self.display = display or ( + ipython.user_ns.get("display", ipython_display) if ipython else ipython_display + ) self.missing_dates_output = widgets.Output() self.dynamic_options_after_categorization_output = widgets.VBox()