python-betterproto icon indicating copy to clipboard operation
python-betterproto copied to clipboard

Messages with underscores in their name do not generate working python.

Open Carl-Chinatomby opened this issue 4 years ago • 0 comments

Messages with underscores in their name do not generate proper proto.

Consider a message of the following format:

message some_message {
    enum Type {
      type1 = 0;
      type2 = 1;
    }
    Type type = 11;
}

The resulting better python output will be:

@dataclass(eq=False, repr=False)
class SomeMessage(betterproto.Message):
    type: "some_message.Type" = betterproto.enum_field(11)

from . import some_message

The import file is non-existent.

This was tested on versions 1.2.5 and 2.0.0b3.

Carl-Chinatomby avatar Jul 24 '21 22:07 Carl-Chinatomby