try fix lint

This commit is contained in:
allen-munsch 2022-10-24 09:25:18 -05:00
parent bcd8a61da8
commit 57dde680d2
No known key found for this signature in database
GPG Key ID: 0C977048B8BDD447
2 changed files with 3 additions and 3 deletions

View File

@ -453,10 +453,10 @@ class Schema:
return _type
def get_type(self, name):
'''
"""
This will actually return a `GraphQLObjectType` of type `GrapheneObjectType` from graphql-core, not a graphene ObjectType.
These two are fundamentally different classes. That's the reason why your test is failing. You'd need to return the Graphene type here.
'''
"""
return self.graphql_schema.type_map.get(name).graphene_type
def lazy(self, _type):

View File

@ -32,7 +32,7 @@ def test_schema_get_type():
schema = Schema(Query)
assert schema.Query == Query
assert schema.MyOtherType == MyOtherType
assert schema.get_type('MyOtherType') == MyOtherType
assert schema.get_type("MyOtherType") == MyOtherType