graphql-python / graphql-python/graphene

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

Open
#1,348 1 comment 1 reaction 0 assignees View on GitHub
✨ enhancement
Dominant language
Python
Stars
8.2k
Forks
818
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.