mirror of
https://github.com/graphql-python/graphene.git
synced 2025-09-21 19:32:33 +03:00
Black formatting
This commit is contained in:
parent
4fe4979372
commit
cd7a29d9dd
|
@ -34,7 +34,9 @@ class BaseType(SubclassWithMeta):
|
||||||
return type(class_name, (cls,), {"Meta": options})
|
return type(class_name, (cls,), {"Meta": options})
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def __init_subclass_with_meta__(cls, name=None, description=None, _meta=None, **_kwargs):
|
def __init_subclass_with_meta__(
|
||||||
|
cls, name=None, description=None, _meta=None, **_kwargs
|
||||||
|
):
|
||||||
assert "_meta" not in cls.__dict__, "Can't assign directly meta"
|
assert "_meta" not in cls.__dict__, "Can't assign directly meta"
|
||||||
if not _meta:
|
if not _meta:
|
||||||
return
|
return
|
||||||
|
|
|
@ -4,12 +4,12 @@ from graphene import Schema, ObjectType, String
|
||||||
def test_objecttype_meta_with_annotations():
|
def test_objecttype_meta_with_annotations():
|
||||||
class Query(ObjectType):
|
class Query(ObjectType):
|
||||||
class Meta:
|
class Meta:
|
||||||
name: str = 'oops'
|
name: str = "oops"
|
||||||
|
|
||||||
hello = String()
|
hello = String()
|
||||||
|
|
||||||
def resolve_hello(self, info):
|
def resolve_hello(self, info):
|
||||||
return 'Hello'
|
return "Hello"
|
||||||
|
|
||||||
schema = Schema(query=Query)
|
schema = Schema(query=Query)
|
||||||
assert schema is not None
|
assert schema is not None
|
||||||
|
|
Loading…
Reference in New Issue
Block a user