Skip to content

Updating mypy to 0.770 raises new errors #276

Closed
@KingDarBoja

Description

@KingDarBoja

If bumping mypy to 0.770, these erros will show up:

graphql\execution\executors\asyncio.py:56: error: Incompatible types in assignment (expression has type "AbstractEventLoop", variable has type "Optional[_UnixSelectorEventLoop]")
graphql\execution\executors\asyncio.py:67: error: Item "None" of "Optional[_UnixSelectorEventLoop]" has no attribute "run_until_complete"
graphql\utils\type_comparators.py:39: error: Argument 2 to "is_type_sub_type_of" has incompatible type "Union[GraphQLList, GraphQLObjectType, GraphQLScalarType, GraphQLInputObjectType, GraphQLInterfaceType]"; expected "GraphQLScalarType"
graphql\utils\type_comparators.py:39: error: Argument 3 to "is_type_sub_type_of" has incompatible type "Union[GraphQLList, GraphQLObjectType, GraphQLScalarType, GraphQLInputObjectType, GraphQLInterfaceType]"; expected "GraphQLScalarType"
graphql\utils\type_comparators.py:43: error: Argument 2 to "is_type_sub_type_of" has incompatible type "Union[GraphQLList, GraphQLObjectType, GraphQLScalarType, GraphQLInputObjectType, GraphQLInterfaceType]"; expected "GraphQLScalarType"
graphql\utils\type_comparators.py:57: error: Argument 1 to "is_possible_type" of "GraphQLSchema" has incompatible type "GraphQLScalarType"; expected "Union[GraphQLInterfaceType, GraphQLUnionType]"
graphql\utils\type_comparators.py:57: error: Argument 1 to "is_possible_type" of "GraphQLTypeMap" has incompatible type "GraphQLScalarType"; expected "Union[GraphQLInterfaceType, GraphQLUnionType]"
graphql\validation\rules\overlapping_fields_can_be_merged.py:708: error: Argument 1 to "do_types_conflict" has incompatible type "Union[GraphQLList, GraphQLObjectType, GraphQLScalarType, GraphQLInputObjectType, GraphQLInterfaceType]"; expected "GraphQLScalarType"
graphql\validation\rules\overlapping_fields_can_be_merged.py:708: error: Argument 2 to "do_types_conflict" has incompatible type "Union[GraphQLList, GraphQLObjectType, GraphQLScalarType, GraphQLInputObjectType, GraphQLInterfaceType]"; expected "GraphQLScalarType"
graphql\validation\rules\overlapping_fields_can_be_merged.py:713: error: Argument 1 to "do_types_conflict" has incompatible type "Union[GraphQLList, GraphQLObjectType, GraphQLScalarType, GraphQLInputObjectType, GraphQLInterfaceType]"; expected "GraphQLScalarType"
graphql\validation\rules\overlapping_fields_can_be_merged.py:713: error: Argument 2 to "do_types_conflict" has incompatible type "Union[GraphQLList, GraphQLObjectType, GraphQLScalarType, GraphQLInputObjectType, GraphQLInterfaceType]"; expected "GraphQLScalarType"

I will address these errors in a PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions