Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
chore: remove unused import and black formatting
  • Loading branch information
KingDarBoja committed Mar 24, 2020
commit a8a878a26122eddac71ab1d35e06725d9feb782b
8 changes: 2 additions & 6 deletions graphql/type/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,21 @@
from collections import Iterable

from collections import namedtuple
from typing import Dict, Union, List, Optional, cast, NamedTuple
from typing import Dict, Union, List, Optional

from .definition import (
GraphQLAbstractType,
GraphQLNamedType,
GraphQLInterfaceType,
GraphQLObjectType,
GraphQLUnionType,
GraphQLType,
is_union_type,
is_interface_type,
is_object_type,
)
from .directives import GraphQLDirective, specified_directives
from .introspection import IntrospectionSchema
from .typemap import GraphQLTypeMap


InterfaceImplementations = namedtuple('InterfaceImplementations', 'objects, interfaces')
InterfaceImplementations = namedtuple("InterfaceImplementations", "objects, interfaces")


class GraphQLSchema(object):
Expand Down
4 changes: 1 addition & 3 deletions graphql/type/typemap.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,7 @@ def assert_object_implements_interface(
)

assert is_type_sub_type_of(
cast("GraphQLSchema", schema),
object_field.type,
interface_field.type
cast("GraphQLSchema", schema), object_field.type, interface_field.type
), '{}.{} expects type "{}" but {}.{} provides type "{}".'.format(
interface,
field_name,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
InlineFragment,
SelectionSet,
)
from ...type.definition import GraphQLField, GraphQLScalarType
from ...type.definition import GraphQLField
from typing import List, Union, Any, Optional, Dict, Tuple


Expand Down