danielgtaylor / danielgtaylor/python-betterproto

Generated class name change proto casing

Đang mở
#263 2 bình luận 2 reaction 0 người được giao Xem trên GitHub
compiler-bug
Ngôn ngữ chính
Python
Star
1.8k
Fork
234
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

Given the following protobuf:
```
message ABCAnswerDeleted {
uint64 test_id = 1;
}
```
Version: `betterproto[compiler]` -> `2.0.0b2` or `2.0.0b3` gives
```
@dataclass(eq=False, repr=False)
class AbcAnswerDeleted(betterproto.Message):
test_id: int = betterproto.uint64_field(1)

def __post_init__(self) -> None:
super().__post_init__()
```

Version: `betterproto[compiler]` -> `1.2.5` gives
```
@dataclass
class ABCAnswerDeleted(betterproto.Message):
test_id: int = betterproto.uint64_field(1)
```

In `2.0.0b2` classname `ABC` is turned into `Abc`. Is this something new to betterproto 2 ? Is there an option to specify to allow class-name conservation ?

Thanks for the lib and for the support :)

Seems to be coming from: https://github.com/danielgtaylor/python-betterproto/blob/v2.0.0b3/src/betterproto/compile/importing.py#L60

https://github.com/danielgtaylor/python-betterproto/blob/v2.0.0b3/src/betterproto/plugin/models.py#L302

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.