diff --git a/graphql/backend/__init__.py b/graphql/backend/__init__.py index b3d714f0..87e9493e 100644 --- a/graphql/backend/__init__.py +++ b/graphql/backend/__init__.py @@ -9,7 +9,7 @@ from .decider import GraphQLDeciderBackend from .cache import GraphQLCachedBackend -if False: +if False: # flake8: noqa from typing import Union _default_backend = None diff --git a/graphql/backend/base.py b/graphql/backend/base.py index 909942ac..ee6c143e 100644 --- a/graphql/backend/base.py +++ b/graphql/backend/base.py @@ -4,7 +4,7 @@ from abc import ABCMeta, abstractmethod import six -if False: +if False: # flake8: noqa from typing import Dict, Optional, Union, Callable from ..language.ast import Document from ..type.schema import GraphQLSchema diff --git a/graphql/backend/cache.py b/graphql/backend/cache.py index 683d976e..1ecd1267 100644 --- a/graphql/backend/cache.py +++ b/graphql/backend/cache.py @@ -4,7 +4,7 @@ from .base import GraphQLBackend -if False: +if False: # flake8: noqa from typing import Any, Dict, Optional, Union, Tuple, Hashable from .base import GraphQLDocument diff --git a/graphql/backend/compiled.py b/graphql/backend/compiled.py index d7950bc9..7dc88e50 100644 --- a/graphql/backend/compiled.py +++ b/graphql/backend/compiled.py @@ -1,7 +1,7 @@ from six import string_types from .base import GraphQLDocument -if False: +if False: # flake8: noqa from ..type.schema import GraphQLSchema from typing import Any, Optional, Dict, Callable, Union diff --git a/graphql/backend/core.py b/graphql/backend/core.py index e5118426..9368c7de 100644 --- a/graphql/backend/core.py +++ b/graphql/backend/core.py @@ -8,7 +8,7 @@ from .base import GraphQLBackend, GraphQLDocument -if False: +if False: # flake8: noqa from typing import Any, Optional, Union from .base import GraphQLDocument from ..language.ast import Document diff --git a/graphql/backend/decider.py b/graphql/backend/decider.py index c4d1b3b4..6019393c 100644 --- a/graphql/backend/decider.py +++ b/graphql/backend/decider.py @@ -1,6 +1,6 @@ from .base import GraphQLBackend, GraphQLDocument -if False: +if False: # flake8: noqa from typing import List, Union, Any, Optional from ..type.schema import GraphQLSchema diff --git a/graphql/error/base.py b/graphql/error/base.py index d1310acd..f84482f2 100644 --- a/graphql/error/base.py +++ b/graphql/error/base.py @@ -1,7 +1,7 @@ import six from ..language.location import get_location -if False: +if False: # flake8: noqa from ..language.source import Source from ..language.location import SourceLocation from types import TracebackType diff --git a/graphql/error/format_error.py b/graphql/error/format_error.py index 4592e850..f7c9cb52 100644 --- a/graphql/error/format_error.py +++ b/graphql/error/format_error.py @@ -2,7 +2,7 @@ from .base import GraphQLError -if False: +if False: # flake8: noqa from .base import GraphQLError from .located_error import GraphQLLocatedError from typing import Any, Dict, Union diff --git a/graphql/error/located_error.py b/graphql/error/located_error.py index ea4284d4..3bf70c98 100644 --- a/graphql/error/located_error.py +++ b/graphql/error/located_error.py @@ -2,7 +2,7 @@ from .base import GraphQLError -if False: +if False: # flake8: noqa from ..language.ast import Field from typing import List, Union diff --git a/graphql/error/syntax_error.py b/graphql/error/syntax_error.py index 480c1fb7..4be4a4b4 100644 --- a/graphql/error/syntax_error.py +++ b/graphql/error/syntax_error.py @@ -1,7 +1,7 @@ from ..language.location import get_location from .base import GraphQLError -if False: +if False: # flake8: noqa from ..language.source import Source from ..language.location import SourceLocation diff --git a/graphql/error/tests/test_base.py b/graphql/error/tests/test_base.py index 740e0023..28d8e2a3 100644 --- a/graphql/error/tests/test_base.py +++ b/graphql/error/tests/test_base.py @@ -5,7 +5,7 @@ from graphql.language.parser import parse from graphql.type import GraphQLField, GraphQLObjectType, GraphQLSchema, GraphQLString -if False: +if False: # flake8: noqa from graphql.execution.base import ResolveInfo from typing import Any from typing import Optional diff --git a/graphql/execution/base.py b/graphql/execution/base.py index 985c24c3..36c42428 100644 --- a/graphql/execution/base.py +++ b/graphql/execution/base.py @@ -12,7 +12,7 @@ ) from ..error.format_error import format_error as default_format_error -if False: +if False: # flake8: noqa from typing import Any, Optional, Dict, List, Union from ..language.ast import Field, OperationDefinition from ..type.definition import GraphQLList, GraphQLObjectType, GraphQLScalarType diff --git a/graphql/execution/executor.py b/graphql/execution/executor.py index f759055c..f23f59c4 100644 --- a/graphql/execution/executor.py +++ b/graphql/execution/executor.py @@ -35,7 +35,7 @@ from .executors.sync import SyncExecutor from .middleware import MiddlewareManager -if False: +if False: # flake8: noqa from typing import Any, Optional, Union, Dict, List, Callable from rx import Observable from ..type.schema import GraphQLSchema diff --git a/graphql/execution/executors/asyncio.py b/graphql/execution/executors/asyncio.py index afb8a968..27637c23 100644 --- a/graphql/execution/executors/asyncio.py +++ b/graphql/execution/executors/asyncio.py @@ -4,7 +4,7 @@ from promise import Promise -if False: +if False: # flake8: noqa from asyncio.unix_events import _UnixSelectorEventLoop from typing import Optional, Any, Callable diff --git a/graphql/execution/executors/sync.py b/graphql/execution/executors/sync.py index 58295d1a..df8aabb6 100644 --- a/graphql/execution/executors/sync.py +++ b/graphql/execution/executors/sync.py @@ -1,4 +1,4 @@ -if False: +if False: # flake8: noqa from typing import Any, Callable diff --git a/graphql/execution/executors/thread.py b/graphql/execution/executors/thread.py index 9d682b64..35210d99 100644 --- a/graphql/execution/executors/thread.py +++ b/graphql/execution/executors/thread.py @@ -4,7 +4,7 @@ from promise import Promise from .utils import process -if False: +if False: # flake8: noqa from typing import Any, Callable diff --git a/graphql/execution/executors/utils.py b/graphql/execution/executors/utils.py index 1cab3ff4..41cd29d1 100644 --- a/graphql/execution/executors/utils.py +++ b/graphql/execution/executors/utils.py @@ -1,6 +1,6 @@ from sys import exc_info -if False: +if False: # flake8: noqa from ..base import ResolveInfo from promise import Promise from typing import Callable, Dict, Tuple, Union diff --git a/graphql/execution/middleware.py b/graphql/execution/middleware.py index 0c7f82d3..0880858b 100644 --- a/graphql/execution/middleware.py +++ b/graphql/execution/middleware.py @@ -4,7 +4,7 @@ from promise import Promise -if False: +if False: # flake8: noqa from .base import ResolveInfo from typing import Any, Callable, Iterator, Tuple, Union, List, Dict diff --git a/graphql/execution/tests/test_nonnull.py b/graphql/execution/tests/test_nonnull.py index 8a44fa9e..ebd1e844 100644 --- a/graphql/execution/tests/test_nonnull.py +++ b/graphql/execution/tests/test_nonnull.py @@ -12,7 +12,7 @@ from .utils import rejected, resolved -if False: +if False: # flake8: noqa from promise import Promise from typing import Any, Optional, Dict, Tuple, Union diff --git a/graphql/execution/tests/test_subscribe.py b/graphql/execution/tests/test_subscribe.py index 661113f0..f6ad3f34 100644 --- a/graphql/execution/tests/test_subscribe.py +++ b/graphql/execution/tests/test_subscribe.py @@ -15,7 +15,7 @@ subscribe, ) -if False: +if False: # flake8: noqa from graphql.execution.base import ResolveInfo from rx import Observable from typing import Optional, Union, Any, Callable, Tuple diff --git a/graphql/execution/utils.py b/graphql/execution/utils.py index 6229eb1b..bbab86c3 100644 --- a/graphql/execution/utils.py +++ b/graphql/execution/utils.py @@ -15,7 +15,7 @@ from ..utils.type_from_ast import type_from_ast from .values import get_argument_values, get_variable_values -if False: +if False: # flake8: noqa from ..type.definition import GraphQLObjectType, GraphQLField from ..type.schema import GraphQLSchema from ..language.ast import ( diff --git a/graphql/execution/values.py b/graphql/execution/values.py index 289273ab..a0568321 100644 --- a/graphql/execution/values.py +++ b/graphql/execution/values.py @@ -18,7 +18,7 @@ from ..utils.type_from_ast import type_from_ast from ..utils.value_from_ast import value_from_ast -if False: +if False: # flake8: noqa from ..language.ast import VariableDefinition, Argument from ..type.schema import GraphQLSchema from ..type.definition import GraphQLArgument diff --git a/graphql/graphql.py b/graphql/graphql.py index ef695bad..f7c394b7 100644 --- a/graphql/graphql.py +++ b/graphql/graphql.py @@ -3,7 +3,7 @@ from promise import promisify -if False: +if False: # flake8: noqa from rx import Observable from typing import Any, Union, Optional from .language.ast import Document diff --git a/graphql/language/ast.py b/graphql/language/ast.py index e9cb307c..7a31e453 100644 --- a/graphql/language/ast.py +++ b/graphql/language/ast.py @@ -1,4 +1,4 @@ -if False: +if False: # flake8: noqa from .parser import Loc from typing import Any, Optional, Union, List, Tuple, Iterable diff --git a/graphql/language/lexer.py b/graphql/language/lexer.py index dbc11401..a41c4976 100644 --- a/graphql/language/lexer.py +++ b/graphql/language/lexer.py @@ -4,7 +4,7 @@ from ..error import GraphQLSyntaxError -if False: +if False: # flake8: noqa from typing import Optional from .source import Source diff --git a/graphql/language/location.py b/graphql/language/location.py index 973743b0..6cf48f50 100644 --- a/graphql/language/location.py +++ b/graphql/language/location.py @@ -1,4 +1,4 @@ -if False: +if False: # flake8: noqa from .source import Source from typing import Any diff --git a/graphql/language/parser.py b/graphql/language/parser.py index fd7e5494..f8a20b84 100644 --- a/graphql/language/parser.py +++ b/graphql/language/parser.py @@ -5,7 +5,7 @@ from .lexer import Lexer, TokenKind, get_token_desc, get_token_kind_desc from .source import Source -if False: +if False: # flake8: noqa from typing import Dict, Union, Any, Optional, Callable, List from ..error.syntax_error import GraphQLSyntaxError from .source import Source diff --git a/graphql/language/printer.py b/graphql/language/printer.py index 3c6c1f7d..68bb0e4d 100644 --- a/graphql/language/printer.py +++ b/graphql/language/printer.py @@ -2,7 +2,7 @@ from .visitor import Visitor, visit -if False: +if False: # flake8: noqa from typing import Any, List, Optional, Union from graphql.language.ast import ( Node, diff --git a/graphql/language/visitor.py b/graphql/language/visitor.py index d5eda74e..4314b28f 100644 --- a/graphql/language/visitor.py +++ b/graphql/language/visitor.py @@ -5,7 +5,7 @@ from . import ast from .visitor_meta import QUERY_DOCUMENT_KEYS, VisitorMeta -if False: +if False: # flake8: noqa from typing import Any, List, Optional, Union, Tuple, Dict from ..utils.type_info import TypeInfo from ..validation.validation import UsageVisitor diff --git a/graphql/pyutils/cached_property.py b/graphql/pyutils/cached_property.py index e1e0fc75..119b9e2a 100644 --- a/graphql/pyutils/cached_property.py +++ b/graphql/pyutils/cached_property.py @@ -1,4 +1,4 @@ -if False: +if False: # flake8: noqa from typing import Any diff --git a/graphql/pyutils/contain_subset.py b/graphql/pyutils/contain_subset.py index 5b8f3f58..da3aea78 100644 --- a/graphql/pyutils/contain_subset.py +++ b/graphql/pyutils/contain_subset.py @@ -1,4 +1,4 @@ -if False: +if False: # flake8: noqa from typing import Any, Dict obj = (dict, list, tuple) diff --git a/graphql/pyutils/default_ordered_dict.py b/graphql/pyutils/default_ordered_dict.py index 273e62fd..83a0b307 100644 --- a/graphql/pyutils/default_ordered_dict.py +++ b/graphql/pyutils/default_ordered_dict.py @@ -1,7 +1,7 @@ import copy from collections import OrderedDict -if False: +if False: # flake8: noqa from typing import Any, List diff --git a/graphql/pyutils/pair_set.py b/graphql/pyutils/pair_set.py index f880ec3b..9b369a4c 100644 --- a/graphql/pyutils/pair_set.py +++ b/graphql/pyutils/pair_set.py @@ -1,4 +1,4 @@ -if False: +if False: # flake8: noqa from typing import Dict, Any diff --git a/graphql/type/definition.py b/graphql/type/definition.py index ec23d3dc..f7e0e7ba 100644 --- a/graphql/type/definition.py +++ b/graphql/type/definition.py @@ -7,7 +7,7 @@ from ..utils.assert_valid_name import assert_valid_name from ..utils.undefined import Undefined -if False: +if False: # flake8: noqa from typing import List, Dict, Any, Callable, Optional, Union, Type diff --git a/graphql/type/introspection.py b/graphql/type/introspection.py index c80170e1..1dafd80d 100644 --- a/graphql/type/introspection.py +++ b/graphql/type/introspection.py @@ -18,7 +18,7 @@ from .directives import DirectiveLocation from .scalars import GraphQLBoolean, GraphQLString -if False: +if False: # flake8: noqa from ..execution.base import ResolveInfo from typing import Union, List, Optional, Any diff --git a/graphql/type/scalars.py b/graphql/type/scalars.py index 4578023c..0169e825 100644 --- a/graphql/type/scalars.py +++ b/graphql/type/scalars.py @@ -3,7 +3,7 @@ from ..language.ast import BooleanValue, FloatValue, IntValue, StringValue from .definition import GraphQLScalarType -if False: +if False: # flake8: noqa from typing import Any, Optional, Union # As per the GraphQL Spec, Integers are only treated as valid when a valid diff --git a/graphql/type/schema.py b/graphql/type/schema.py index 0905749d..06cf5be6 100644 --- a/graphql/type/schema.py +++ b/graphql/type/schema.py @@ -5,7 +5,7 @@ from .introspection import IntrospectionSchema from .typemap import GraphQLTypeMap -if False: +if False: # flake8: noqa from .definition import GraphQLInterfaceType, GraphQLUnionType, GraphQLType from typing import Dict, Union, Any, List, Optional diff --git a/graphql/type/typemap.py b/graphql/type/typemap.py index f8eab077..aebff6f0 100644 --- a/graphql/type/typemap.py +++ b/graphql/type/typemap.py @@ -15,7 +15,7 @@ is_output_type, ) -if False: +if False: # flake8: noqa from typing import Any, List, Optional, Union diff --git a/graphql/utils/ast_to_code.py b/graphql/utils/ast_to_code.py index 659562c3..2db01b35 100644 --- a/graphql/utils/ast_to_code.py +++ b/graphql/utils/ast_to_code.py @@ -1,7 +1,7 @@ from ..language.ast import Node from ..language.parser import Loc -if False: +if False: # flake8: noqa from typing import Any diff --git a/graphql/utils/concat_ast.py b/graphql/utils/concat_ast.py index 41401829..8685bbc0 100644 --- a/graphql/utils/concat_ast.py +++ b/graphql/utils/concat_ast.py @@ -2,7 +2,7 @@ from ..language.ast import Document -if False: +if False: # flake8: noqa from typing import Iterable diff --git a/graphql/utils/get_field_def.py b/graphql/utils/get_field_def.py index c7efca75..5b06973f 100644 --- a/graphql/utils/get_field_def.py +++ b/graphql/utils/get_field_def.py @@ -5,7 +5,7 @@ TypeNameMetaFieldDef, ) -if False: +if False: # flake8: noqa from ..language.ast import Field from ..type.definition import GraphQLField, GraphQLInterfaceType, GraphQLObjectType from ..type.schema import GraphQLSchema diff --git a/graphql/utils/get_operation_ast.py b/graphql/utils/get_operation_ast.py index 74fd5a2c..56dccd4e 100644 --- a/graphql/utils/get_operation_ast.py +++ b/graphql/utils/get_operation_ast.py @@ -1,6 +1,6 @@ from ..language import ast -if False: +if False: # flake8: noqa from ..language.ast import Document, OperationDefinition from typing import Optional diff --git a/graphql/utils/is_valid_literal_value.py b/graphql/utils/is_valid_literal_value.py index f91c842b..47d7c13a 100644 --- a/graphql/utils/is_valid_literal_value.py +++ b/graphql/utils/is_valid_literal_value.py @@ -8,7 +8,7 @@ GraphQLScalarType, ) -if False: +if False: # flake8: noqa from ..language.ast import ObjectValue, StringValue from ..type.definition import GraphQLInputObjectType, GraphQLScalarType from typing import Union, Any, List diff --git a/graphql/utils/is_valid_value.py b/graphql/utils/is_valid_value.py index 857b724a..2dd83bfc 100644 --- a/graphql/utils/is_valid_value.py +++ b/graphql/utils/is_valid_value.py @@ -15,7 +15,7 @@ GraphQLScalarType, ) -if False: +if False: # flake8: noqa from typing import Any, List _empty_list = [] # type: List diff --git a/graphql/utils/quoted_or_list.py b/graphql/utils/quoted_or_list.py index 22d6aa48..c968b73f 100644 --- a/graphql/utils/quoted_or_list.py +++ b/graphql/utils/quoted_or_list.py @@ -1,6 +1,6 @@ import functools -if False: +if False: # flake8: noqa from typing import List diff --git a/graphql/utils/schema_printer.py b/graphql/utils/schema_printer.py index 13146d10..5fe2df68 100644 --- a/graphql/utils/schema_printer.py +++ b/graphql/utils/schema_printer.py @@ -11,7 +11,7 @@ from .ast_from_value import ast_from_value -if False: +if False: # flake8: noqa from ..type.definition import ( GraphQLArgument, GraphQLType, diff --git a/graphql/utils/type_comparators.py b/graphql/utils/type_comparators.py index 90388fd5..2e6b2bbc 100644 --- a/graphql/utils/type_comparators.py +++ b/graphql/utils/type_comparators.py @@ -7,7 +7,7 @@ is_abstract_type, ) -if False: +if False: # flake8: noqa from ..type.typemap import GraphQLTypeMap from ..type.definition import ( GraphQLScalarType, diff --git a/graphql/utils/type_from_ast.py b/graphql/utils/type_from_ast.py index 58719c41..c3a0d411 100644 --- a/graphql/utils/type_from_ast.py +++ b/graphql/utils/type_from_ast.py @@ -1,7 +1,7 @@ from ..language import ast from ..type.definition import GraphQLList, GraphQLNonNull -if False: +if False: # flake8: noqa from ..language.ast import ListType, NamedType, NonNullType from ..type.schema import GraphQLSchema from typing import Any, Union diff --git a/graphql/utils/type_info.py b/graphql/utils/type_info.py index de07ddb7..9f87f7c4 100644 --- a/graphql/utils/type_info.py +++ b/graphql/utils/type_info.py @@ -11,7 +11,7 @@ from .get_field_def import get_field_def from .type_from_ast import type_from_ast -if False: +if False: # flake8: noqa from ..type.schema import GraphQLSchema from ..type.definition import ( GraphQLType, diff --git a/graphql/utils/value_from_ast.py b/graphql/utils/value_from_ast.py index f7a730f0..f8a78c70 100644 --- a/graphql/utils/value_from_ast.py +++ b/graphql/utils/value_from_ast.py @@ -7,7 +7,7 @@ GraphQLScalarType, ) -if False: +if False: # flake8: noqa from ..language.ast import Node from ..type.definition import GraphQLType from typing import Any, Dict, Union, Optional, List diff --git a/graphql/validation/rules/arguments_of_correct_type.py b/graphql/validation/rules/arguments_of_correct_type.py index 416e36bd..d9d7d950 100644 --- a/graphql/validation/rules/arguments_of_correct_type.py +++ b/graphql/validation/rules/arguments_of_correct_type.py @@ -3,7 +3,7 @@ from ...utils.is_valid_literal_value import is_valid_literal_value from .base import ValidationRule -if False: +if False: # flake8: noqa from ...language.ast import Argument from typing import Any, List, Union diff --git a/graphql/validation/rules/base.py b/graphql/validation/rules/base.py index 368dc168..821dd747 100644 --- a/graphql/validation/rules/base.py +++ b/graphql/validation/rules/base.py @@ -1,6 +1,6 @@ from ...language.visitor import Visitor -if False: +if False: # flake8: noqa from ..validation import ValidationContext diff --git a/graphql/validation/rules/default_values_of_correct_type.py b/graphql/validation/rules/default_values_of_correct_type.py index 3b2f52f8..d09500c4 100644 --- a/graphql/validation/rules/default_values_of_correct_type.py +++ b/graphql/validation/rules/default_values_of_correct_type.py @@ -4,7 +4,7 @@ from ...utils.is_valid_literal_value import is_valid_literal_value from .base import ValidationRule -if False: +if False: # flake8: noqa from ...language.ast import Document, OperationDefinition, SelectionSet from typing import List, Union diff --git a/graphql/validation/rules/fields_on_correct_type.py b/graphql/validation/rules/fields_on_correct_type.py index 4ce057eb..f6446471 100644 --- a/graphql/validation/rules/fields_on_correct_type.py +++ b/graphql/validation/rules/fields_on_correct_type.py @@ -7,7 +7,7 @@ from ...utils.suggestion_list import suggestion_list from .base import ValidationRule -if False: +if False: # flake8: noqa from ...language.ast import Field, InlineFragment from typing import Any, List, Union diff --git a/graphql/validation/rules/fragments_on_composite_types.py b/graphql/validation/rules/fragments_on_composite_types.py index 1873ac5f..e775b700 100644 --- a/graphql/validation/rules/fragments_on_composite_types.py +++ b/graphql/validation/rules/fragments_on_composite_types.py @@ -3,7 +3,7 @@ from ...type.definition import is_composite_type from .base import ValidationRule -if False: +if False: # flake8: noqa from ...language.ast import Field, InlineFragment from typing import Any, List, Union diff --git a/graphql/validation/rules/known_argument_names.py b/graphql/validation/rules/known_argument_names.py index b9a7b1fd..e7b4839a 100644 --- a/graphql/validation/rules/known_argument_names.py +++ b/graphql/validation/rules/known_argument_names.py @@ -4,7 +4,7 @@ from ...utils.suggestion_list import suggestion_list from .base import ValidationRule -if False: +if False: # flake8: noqa from ...language.ast import Argument from typing import Any, List, Union diff --git a/graphql/validation/rules/known_type_names.py b/graphql/validation/rules/known_type_names.py index 7f147a98..b0a95aeb 100644 --- a/graphql/validation/rules/known_type_names.py +++ b/graphql/validation/rules/known_type_names.py @@ -3,7 +3,7 @@ from ...utils.suggestion_list import suggestion_list from .base import ValidationRule -if False: +if False: # flake8: noqa from ...language.ast import NamedType from typing import Any diff --git a/graphql/validation/rules/lone_anonymous_operation.py b/graphql/validation/rules/lone_anonymous_operation.py index 2699f759..89c480f6 100644 --- a/graphql/validation/rules/lone_anonymous_operation.py +++ b/graphql/validation/rules/lone_anonymous_operation.py @@ -2,7 +2,7 @@ from ...language import ast from .base import ValidationRule -if False: +if False: # flake8: noqa from ..validation import ValidationContext from ...language.ast import Document, OperationDefinition from typing import Any, List, Optional, Union diff --git a/graphql/validation/rules/no_fragment_cycles.py b/graphql/validation/rules/no_fragment_cycles.py index ccd9f8f3..6dfdf46b 100644 --- a/graphql/validation/rules/no_fragment_cycles.py +++ b/graphql/validation/rules/no_fragment_cycles.py @@ -1,7 +1,7 @@ from ...error import GraphQLError from .base import ValidationRule -if False: +if False: # flake8: noqa from ..validation import ValidationContext from ...language.ast import Document, OperationDefinition from typing import List, Union diff --git a/graphql/validation/rules/no_undefined_variables.py b/graphql/validation/rules/no_undefined_variables.py index afa0db1b..77f3eb6e 100644 --- a/graphql/validation/rules/no_undefined_variables.py +++ b/graphql/validation/rules/no_undefined_variables.py @@ -1,7 +1,7 @@ from ...error import GraphQLError from .base import ValidationRule -if False: +if False: # flake8: noqa from ..validation import ValidationContext from ...language.ast import Document, OperationDefinition from typing import List, Union diff --git a/graphql/validation/rules/no_unused_fragments.py b/graphql/validation/rules/no_unused_fragments.py index b4ba428a..76f8f35a 100644 --- a/graphql/validation/rules/no_unused_fragments.py +++ b/graphql/validation/rules/no_unused_fragments.py @@ -1,7 +1,7 @@ from ...error import GraphQLError from .base import ValidationRule -if False: +if False: # flake8: noqa from ..validation import ValidationContext from ...language.ast import Document, OperationDefinition from typing import List, Union, Any, Optional diff --git a/graphql/validation/rules/no_unused_variables.py b/graphql/validation/rules/no_unused_variables.py index ed7b77fc..baca2daa 100644 --- a/graphql/validation/rules/no_unused_variables.py +++ b/graphql/validation/rules/no_unused_variables.py @@ -1,7 +1,7 @@ from ...error import GraphQLError from .base import ValidationRule -if False: +if False: # flake8: noqa from ..validation import ValidationContext from ...language.ast import Document, OperationDefinition from typing import List, Union diff --git a/graphql/validation/rules/overlapping_fields_can_be_merged.py b/graphql/validation/rules/overlapping_fields_can_be_merged.py index 74a1e188..834acf50 100644 --- a/graphql/validation/rules/overlapping_fields_can_be_merged.py +++ b/graphql/validation/rules/overlapping_fields_can_be_merged.py @@ -17,7 +17,7 @@ from ...utils.type_from_ast import type_from_ast from .base import ValidationRule -if False: +if False: # flake8: noqa from ..validation import ValidationContext from ...language.ast import OperationDefinition, Field, InlineFragment, SelectionSet from ...type.definition import GraphQLUnionType, GraphQLField, GraphQLScalarType diff --git a/graphql/validation/rules/possible_fragment_spreads.py b/graphql/validation/rules/possible_fragment_spreads.py index 3cd8f1aa..d6b916c0 100644 --- a/graphql/validation/rules/possible_fragment_spreads.py +++ b/graphql/validation/rules/possible_fragment_spreads.py @@ -3,7 +3,7 @@ from ...utils.type_from_ast import type_from_ast from .base import ValidationRule -if False: +if False: # flake8: noqa from ..language.ast import Field, InlineFragment from typing import Any, List, Union diff --git a/graphql/validation/rules/provided_non_null_arguments.py b/graphql/validation/rules/provided_non_null_arguments.py index 190e9d03..1d727a0d 100644 --- a/graphql/validation/rules/provided_non_null_arguments.py +++ b/graphql/validation/rules/provided_non_null_arguments.py @@ -2,7 +2,7 @@ from ...type.definition import GraphQLNonNull from .base import ValidationRule -if False: +if False: # flake8: noqa from ...language.ast import Field, InlineFragment from typing import Any, List, Optional, Union diff --git a/graphql/validation/rules/scalar_leafs.py b/graphql/validation/rules/scalar_leafs.py index 97755de0..76d25a24 100644 --- a/graphql/validation/rules/scalar_leafs.py +++ b/graphql/validation/rules/scalar_leafs.py @@ -2,7 +2,7 @@ from ...type.definition import get_named_type, is_leaf_type from .base import ValidationRule -if False: +if False: # flake8: noqa from ...language.ast import Field, InlineFragment from typing import Any, List, Union diff --git a/graphql/validation/rules/unique_argument_names.py b/graphql/validation/rules/unique_argument_names.py index b0f0adfb..60dfb2e6 100644 --- a/graphql/validation/rules/unique_argument_names.py +++ b/graphql/validation/rules/unique_argument_names.py @@ -1,7 +1,7 @@ from ...error import GraphQLError from .base import ValidationRule -if False: +if False: # flake8: noqa from ..validation import ValidationContext from ...language.ast import Field, InlineFragment, Argument from typing import Any, List, Union diff --git a/graphql/validation/rules/unique_fragment_names.py b/graphql/validation/rules/unique_fragment_names.py index ff1003f8..fe2141e7 100644 --- a/graphql/validation/rules/unique_fragment_names.py +++ b/graphql/validation/rules/unique_fragment_names.py @@ -1,7 +1,7 @@ from ...error import GraphQLError from .base import ValidationRule -if False: +if False: # flake8: noqa from ..validation import ValidationContext from ...language.ast import Document, OperationDefinition from typing import List, Union diff --git a/graphql/validation/rules/unique_input_field_names.py b/graphql/validation/rules/unique_input_field_names.py index f5afbeb1..78a89a50 100644 --- a/graphql/validation/rules/unique_input_field_names.py +++ b/graphql/validation/rules/unique_input_field_names.py @@ -1,7 +1,7 @@ from ...error import GraphQLError from .base import ValidationRule -if False: +if False: # flake8: noqa from ..validation import ValidationContext from ...language.ast import Argument, ObjectValue, ObjectField from typing import Any, List, Union diff --git a/graphql/validation/rules/unique_operation_names.py b/graphql/validation/rules/unique_operation_names.py index da097447..6bfe70d5 100644 --- a/graphql/validation/rules/unique_operation_names.py +++ b/graphql/validation/rules/unique_operation_names.py @@ -1,7 +1,7 @@ from ...error import GraphQLError from .base import ValidationRule -if False: +if False: # flake8: noqa from ..validation import ValidationContext from ...language.ast import Document, OperationDefinition from typing import Any, List, Optional, Union diff --git a/graphql/validation/rules/unique_variable_names.py b/graphql/validation/rules/unique_variable_names.py index 8d2ce3d3..2d966152 100644 --- a/graphql/validation/rules/unique_variable_names.py +++ b/graphql/validation/rules/unique_variable_names.py @@ -1,7 +1,7 @@ from ...error import GraphQLError from .base import ValidationRule -if False: +if False: # flake8: noqa from ..validation import ValidationContext from ...language.ast import Document, OperationDefinition from typing import List, Union diff --git a/graphql/validation/rules/variables_in_allowed_position.py b/graphql/validation/rules/variables_in_allowed_position.py index 6c62f449..8bcf1c52 100644 --- a/graphql/validation/rules/variables_in_allowed_position.py +++ b/graphql/validation/rules/variables_in_allowed_position.py @@ -4,7 +4,7 @@ from ...utils.type_from_ast import type_from_ast from .base import ValidationRule -if False: +if False: # flake8: noqa from ..validation import ValidationContext from ...language.ast import Document, OperationDefinition from typing import List, Union diff --git a/graphql/validation/validation.py b/graphql/validation/validation.py index 70596a34..b708f6a3 100644 --- a/graphql/validation/validation.py +++ b/graphql/validation/validation.py @@ -4,7 +4,7 @@ from ..utils.type_info import TypeInfo from .rules import specified_rules -if False: +if False: # flake8: noqa from typing import List, Union from ..language.ast import Document, OperationDefinition, SelectionSet from ..language.visitor_meta import VisitorMeta diff --git a/setup.cfg b/setup.cfg index 722f81b1..fef65f01 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [flake8] -exclude = tests,scripts,setup.py,docs,graphql/execution/executors/asyncio_utils.py +exclude = tests,scripts,setup.py,docs,graphql/execution/executors/asyncio_utils.py,conftest.py max-line-length = 200 [coverage:run]