Skip to content

Commit a5009d8

Browse files
committed
fixup! Add a utility to convert protobuf enums to Python enums
Remove explicit conversion to int
1 parent 488a62f commit a5009d8

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

src/frequenz/client/microgrid/_util.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,6 @@ class SomeEnum(enum.Enum):
4141
The resulting python enum value if the protobuf value is known, otherwise
4242
the input value converted to a plain `int`.
4343
"""
44-
# A protobuf enum value is a NewType of int, so we make sure we have a pure int at
45-
# this point.
46-
value = int(value)
4744
try:
4845
return enum_type(value)
4946
except ValueError:

0 commit comments

Comments
 (0)