- Some typing.

- Ignore sitk on python3.12 on intel mac.
This commit is contained in:
Wim Pomp
2024-04-12 16:03:36 +02:00
parent db4bd63b94
commit 1bfac6f26e
4 changed files with 221 additions and 166 deletions

View File

@@ -26,13 +26,13 @@ def lazy_property(function, field, *arg_fields):
class Plane(model.Plane):
""" Lazily retrieve delta_t from metadata """
def __init__(self, t0, file, **kwargs):
def __init__(self, t0, file, **kwargs): # noqa
super().__init__(**kwargs)
# setting fields here because they would be removed by ome_types/pydantic after class definition
setattr(self.__class__, 'delta_t', lazy_property(self.get_delta_t, 'delta_t', 't0', 'file'))
setattr(self.__class__, 'delta_t_quantity', _quantity_property('delta_t'))
self.__dict__['t0'] = t0
self.__dict__['file'] = file
self.__dict__['t0'] = t0 # noqa
self.__dict__['file'] = file # noqa
@staticmethod
def get_delta_t(t0, file):