danielgtaylor / danielgtaylor/python-betterproto
Messages with underscores in their name do not generate working python.
Open
compiler-bug
- Dominant language
- Python
- Stars
- 1.8k
- Forks
- 234
- PR merge metrics
- No merged PRs in 30d
Description
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.
Contributor guide
Assessment
This issue has not been assessed yet.