From 64a8fdb70256f765c165a60fdf1c90a6cfcd7767 Mon Sep 17 00:00:00 2001 From: Johannes Kasimir Date: Wed, 4 Feb 2026 14:31:29 +0100 Subject: [PATCH] fix: add workaround to avoid jedi issue --- src/ess/reflectometry/figures.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/ess/reflectometry/figures.py b/src/ess/reflectometry/figures.py index 742e7fe0..7923611c 100644 --- a/src/ess/reflectometry/figures.py +++ b/src/ess/reflectometry/figures.py @@ -103,7 +103,8 @@ def wavelength_theta_figure( A Plopp figure displaying the histogram. ''' - if isinstance(da, sc.DataArray): + # Double check is workaround for github.com/davidhalter/jedi/issues/2085 + if not isinstance(da, tuple) and isinstance(da, sc.DataArray): return wavelength_theta_figure( (da,), wavelength_bins=(wavelength_bins,), @@ -181,7 +182,8 @@ def q_theta_figure( A Plopp figure displaying the histogram. ''' - if isinstance(da, sc.DataArray): + # Double check is workaround for github.com/davidhalter/jedi/issues/2085 + if not isinstance(da, tuple) and isinstance(da, sc.DataArray): return q_theta_figure( (da,), q_bins=(q_bins,), @@ -244,7 +246,8 @@ def wavelength_z_figure( A Plopp figure displaying the histogram. ''' - if isinstance(da, sc.DataArray): + # Double check is workaround for github.com/davidhalter/jedi/issues/2085 + if not isinstance(da, tuple) and isinstance(da, sc.DataArray): return wavelength_z_figure((da,), wavelength_bins=(wavelength_bins,), **kwargs) wavelength_bins = _repeat_variable_argument(len(da), wavelength_bins)