mirror of
https://github.com/graphql-python/graphene.git
synced 2025-07-16 19:12:21 +03:00
Apply PEP 681 to graphene
This commit is contained in:
parent
03cf2e131e
commit
daf48865e5
|
@ -1,4 +1,4 @@
|
|||
from typing import TYPE_CHECKING
|
||||
from typing import TYPE_CHECKING, dataclass_transform
|
||||
|
||||
from .base import BaseOptions, BaseType, BaseTypeMeta
|
||||
from .field import Field
|
||||
|
@ -19,6 +19,7 @@ class ObjectTypeOptions(BaseOptions):
|
|||
interfaces = () # type: Iterable[Type[Interface]]
|
||||
|
||||
|
||||
@dataclass_transform()
|
||||
class ObjectTypeMeta(BaseTypeMeta):
|
||||
def __new__(cls, name_, bases, namespace, **options):
|
||||
# Note: it's safe to pass options as keyword arguments as they are still type-checked by ObjectTypeOptions.
|
||||
|
|
Loading…
Reference in New Issue
Block a user