Black formatting

This commit is contained in:
Eran Kampf 2019-05-31 14:18:26 -07:00
parent 4fe4979372
commit cd7a29d9dd
2 changed files with 5 additions and 3 deletions

View File

@ -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

View File

@ -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