danielgtaylor / danielgtaylor/python-betterproto

Naming collision with nested enums

Offen
#212 9 Kommentare 0 Reaktionen 1 zugewiesene Person Beansprucht von @cetanu Auf GitHub ansehen
enhancement help wanted high priority
Vorherrschende Sprache
Python
Sterne
1.8k
Forks
234
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

# Problem

Currently these two enums in the same file will be both compiled into the same name of `ContentStatus`

```
message Content {enum Status{ ... }}
enum ContentStatus{ ... }
```

Currently the behaviour is to silently overwrite one of the enums, therefore making all subsequent call of the enum possibly wrong.

# Workaround

I have consulted @nat-n and they say they don't see a way to work around the issue currently, except to directly modify the generated code.

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.