Skip to content

Commit

Permalink
fix: fix 'Couldn't build proto file' when using Python 3.13
Browse files Browse the repository at this point in the history
  • Loading branch information
parthea committed Oct 15, 2024
1 parent 25ab8ce commit 5064a98
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion proto/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def __new__(mcls, name, bases, attrs):
descriptor_pb2.EnumValueDescriptorProto(name=name, number=number)
# Minor hack to get all the enum variants out.
for name, number in attrs.items()
if isinstance(number, int)
if name in attrs.member_names and isinstance(number, int)
),
key=lambda v: v.number,
),
Expand Down

0 comments on commit 5064a98

Please sign in to comment.