Skip to content
Merged
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
Next Next commit
refactor: cast GraphQLSchema compatible with py27
  • Loading branch information
KingDarBoja committed Mar 24, 2020
commit 6cbd2bddfc1bde88e909128ef2ab4dbd4b966cdf
6 changes: 5 additions & 1 deletion graphql/type/typemap.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
from collections import OrderedDict, defaultdict
from functools import reduce

from typing import cast

from ..utils.type_comparators import is_equal_type, is_type_sub_type_of
from .definition import (
GraphQLArgument,
Expand Down Expand Up @@ -162,7 +164,9 @@ def assert_object_implements_interface(
)

assert is_type_sub_type_of(
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