Skip to content

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

@Carl-Chinatomby

Description

@Carl-Chinatomby

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions