File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
src/frequenz/sdk/microgrid/component Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change 77
88from dataclasses import dataclass
99from enum import Enum
10- from typing import Optional
1110
1211import frequenz .api .common .components_pb2 as components_pb
1312import frequenz .api .microgrid .inverter_pb2 as inverter_pb
@@ -32,7 +31,7 @@ class InverterType(ComponentType):
3231def _component_type_from_protobuf (
3332 component_category : components_pb .ComponentCategory .ValueType ,
3433 component_metadata : inverter_pb .Metadata ,
35- ) -> Optional [ ComponentType ] :
34+ ) -> ComponentType | None :
3635 """Convert a protobuf InverterType message to Component enum.
3736
3837 For internal-only use by the `microgrid` package.
@@ -112,7 +111,7 @@ class Component:
112111
113112 component_id : int
114113 category : ComponentCategory
115- type : Optional [ ComponentType ] = None
114+ type : ComponentType | None = None
116115
117116 def is_valid (self ) -> bool :
118117 """Check if this instance contains valid data.
You can’t perform that action at this time.
0 commit comments