Skip to content

Commit 2a99e7a

Browse files
committed
refactor(bl_states): adjust ClassVar[str] typehint to be str|None
1 parent 83bf44c commit 2a99e7a

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

bec_lib/bec_lib/bl_states.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import traceback
88
from abc import ABC, abstractmethod
99
from 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

1212
import yaml
1313
from 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

Comments
 (0)