mirror of
https://github.com/tiqi-group/pydase.git
synced 2025-04-23 09:30:02 +02:00
fixes mypy error
This commit is contained in:
parent
fd3338f99f
commit
6b1227fcbb
@ -66,12 +66,14 @@ class Serializer:
|
||||
|
||||
@staticmethod
|
||||
def _serialize_enum(obj: Enum) -> dict[str, Any]:
|
||||
import pydase.components.coloured_enum
|
||||
|
||||
value = obj.name
|
||||
readonly = False
|
||||
doc = obj.__doc__
|
||||
if sys.version_info < (3, 11) and doc == "An enumeration.":
|
||||
doc = None
|
||||
if type(obj).__base__.__name__ == "ColouredEnum":
|
||||
if isinstance(obj, pydase.components.coloured_enum.ColouredEnum):
|
||||
obj_type = "ColouredEnum"
|
||||
else:
|
||||
obj_type = "Enum"
|
||||
|
Loading…
x
Reference in New Issue
Block a user