From de4e8ffc873c5a8667a0433dd2c3bb29e8ecd999 Mon Sep 17 00:00:00 2001 From: Tim Leach <4410524+TimLeach635@users.noreply.github.com> Date: Wed, 1 Jul 2026 15:24:41 +0100 Subject: [PATCH 1/2] fix: stop enums masking Co-Authored-By: Claude --- LION/models/LIONmodel.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LION/models/LIONmodel.py b/LION/models/LIONmodel.py index 1999baef..d1db3c24 100644 --- a/LION/models/LIONmodel.py +++ b/LION/models/LIONmodel.py @@ -49,7 +49,7 @@ class ModelInputType(int, Enum): SINOGRAM = 0 NOISY_RECON = 1 - IMAGE = 1 + IMAGE = 2 # Class for Model parameters that should be true for all models From 523ce572915c2db4ee46ec1dd29dd7d01d7e3406 Mon Sep 17 00:00:00 2001 From: Tim Leach <4410524+TimLeach635@users.noreply.github.com> Date: Thu, 2 Jul 2026 08:34:15 +0100 Subject: [PATCH 2/2] style: run black formatter --- LION/models/LIONmodel.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/LION/models/LIONmodel.py b/LION/models/LIONmodel.py index d1db3c24..a59439a8 100644 --- a/LION/models/LIONmodel.py +++ b/LION/models/LIONmodel.py @@ -6,13 +6,13 @@ # ============================================================================= -#%% This is a base class for LION models. +# %% This is a base class for LION models. # # All classes must derive from this one. # It definest a bunch of auxiliary functions # -#%% Imports +# %% Imports # You will want to import LIONParameter, as all models must save and use Parameters. from enum import Enum @@ -83,8 +83,10 @@ def __init__( f"Expected geometry to be of type Geometry or None, but got {type(geometry).__name__}. " "If you passed positional arguments to the model, please verify their order matches the model's __init__ signature." ) - - if model_parameters is not None and not isinstance(model_parameters, LIONModelParameter): + + if model_parameters is not None and not isinstance( + model_parameters, LIONModelParameter + ): raise TypeError( f"Expected model_parameters to be of type LIONModelParameter or None, but got {type(model_parameters).__name__}. " "Ensure you are not accidentally passing a Geometry object as model_parameters."