Skip to content

Handle enum variants that conflict with EnumTypeWrapper methods #238

@nipunn1313

Description

@nipunn1313

Eg

enum E {
    Name = 1;
    Value = 2;
}

Currently, it generates working python code, but broken stubs.
In python code - this all works.

from test_pb2 import E, Name, Value
assert Name == 1
assert Value == 2
assert E.Name(1) == 'Name'
assert E.Value('Name') == 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions