danielgtaylor / danielgtaylor/python-betterproto

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

Aperta
#259 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
compiler-bug
Lingua principale
Python
Stelle
1.8k
Fork
234
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.