From 3c6c207ddec5261f8c45eafa00fb1e877fec1907 Mon Sep 17 00:00:00 2001 From: hinderling Date: Wed, 27 Nov 2024 15:02:35 +0100 Subject: [PATCH 1/2] copy pattern from camera exposure --- src/useq/_mda_event.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/useq/_mda_event.py b/src/useq/_mda_event.py index eea198e..46f873c 100644 --- a/src/useq/_mda_event.py +++ b/src/useq/_mda_event.py @@ -73,7 +73,7 @@ class SLMImage(UseqModel): data: Any = Field(..., repr=False) device: Optional[str] = None - exposure: Optional[float] = None + exposure: Optional[float] = Field(default=None, gt=0.0) @model_validator(mode="before") def _cast_data(cls, v: Any) -> Any: From 2ec1e7e07df5693d98bc261047860e526c0f7323 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 27 Nov 2024 14:15:39 +0000 Subject: [PATCH 2/2] style(pre-commit.ci): auto fixes [...] --- src/useq/_mda_event.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/useq/_mda_event.py b/src/useq/_mda_event.py index 46f873c..6e2f8a2 100644 --- a/src/useq/_mda_event.py +++ b/src/useq/_mda_event.py @@ -73,7 +73,7 @@ class SLMImage(UseqModel): data: Any = Field(..., repr=False) device: Optional[str] = None - exposure: Optional[float] = Field(default=None, gt=0.0) + exposure: Optional[float] = Field(default=None, gt=0.0) @model_validator(mode="before") def _cast_data(cls, v: Any) -> Any: