8000 add comment · googleapis/proto-plus-python@d72dfb4 · GitHub
[go: up one dir, main page]

Skip to content

Commit d72dfb4

Browse files
committed
add comment
1 parent 3099991 commit d72dfb4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

proto/enums.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ def __new__(mcls, name, bases, attrs):
7373
(
7474
descriptor_pb2.EnumValueDescriptorProto(name=name, number=number)
7575
# Minor hack to get all the enum variants out.
76+
# Use the `_member_names` property to get only the enum members
77+
# See https://github.com/googleapis/proto-plus-python/issues/490
7678
for name, number in attrs.items()
7779
if name in attrs._member_names and isinstance(number, int)
7880
),

0 commit comments

Comments
 (0)
0