77import traceback
88from abc import ABC , abstractmethod
99from dataclasses import dataclass
10- from typing import Any , Callable , ClassVar , Generic , Literal , Type , TypeVar , cast
10+ from typing import Any , Callable , Generic , Literal , Type , TypeVar , cast
1111
1212import yaml
1313from pydantic import BaseModel , field_validator , model_validator
@@ -58,7 +58,7 @@ class BeamlineStateConfig(BaseModel):
5858 Base Configuration for a beamline state.
5959 """
6060
61- state_type : ClassVar [ str ] = "BeamlineState"
61+ state_type : str | None = "BeamlineState"
6262
6363 name : str
6464 title : str | None = None
@@ -85,7 +85,7 @@ class DeviceStateConfig(BeamlineStateConfig):
8585 Configuration for a device-based beamline state.
8686 """
8787
88- state_type : ClassVar [ str ] = "DeviceBeamlineState"
88+ state_type : str | None = "DeviceBeamlineState"
8989
9090 device : DeviceBase | str
9191 signal : DeviceBase | str | None = None
@@ -118,7 +118,7 @@ class DeviceWithinLimitsStateConfig(DeviceStateConfig):
118118 Configuration for a device within limits beamline state.
119119 """
120120
121- state_type : ClassVar [ str ] = "DeviceWithinLimitsState"
121+ state_type : str | None = "DeviceWithinLimitsState"
122122
123123 low_limit : float | None = None
124124 high_limit : float | None = None
@@ -175,7 +175,7 @@ class AggregatedStateConfig(BeamlineStateConfig):
175175 Keys of the states dictionary are the labels of the different states.
176176 """
177177
178- state_type : ClassVar [ str ] = "AggregatedState"
178+ state_type : str | None = "AggregatedState"
179179
180180 states : dict [str , SubDeviceStateConfig ]
181181
0 commit comments