graphql-python / graphql-python/graphene

Is it necessary to prevent a datasclass field name from being a Python keyword?

Aperta
#1,348 1 commento 1 reazione 0 assegnatari Vedi su GitHub
✨ enhancement
Lingua principale
Python
Stelle
8.2k
Fork
818
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

I ran into this error when dynamically creating an dataclass:

"Field names must not be keywords: {name!r}"
https://github.com/graphql-python/graphene/blob/master/graphene/pyutils/dataclasses.py#L1196-L1197

The field names come from a defined external dataset, and one field name happens to be a Python keyword, but I don't think that causes any harm.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.