Skip to content

Commit

Permalink
Fixed flake8 issues
Browse files Browse the repository at this point in the history
  • Loading branch information
syrusakbary committed Jun 23, 2018
1 parent 29e1456 commit b2111af
Show file tree
Hide file tree
Showing 74 changed files with 74 additions and 74 deletions.
2 changes: 1 addition & 1 deletion graphql/backend/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion graphql/backend/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion graphql/backend/cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion graphql/backend/compiled.py
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 1 addition & 1 deletion graphql/backend/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion graphql/backend/decider.py
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 1 addition & 1 deletion graphql/error/base.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion graphql/error/format_error.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion graphql/error/located_error.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from .base import GraphQLError

if False:
if False: # flake8: noqa
from ..language.ast import Field
from typing import List, Union

Expand Down
2 changes: 1 addition & 1 deletion graphql/error/syntax_error.py
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 1 addition & 1 deletion graphql/error/tests/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion graphql/execution/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion graphql/execution/executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion graphql/execution/executors/asyncio.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion graphql/execution/executors/sync.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
if False:
if False: # flake8: noqa
from typing import Any, Callable


Expand Down
2 changes: 1 addition & 1 deletion graphql/execution/executors/thread.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from promise import Promise
from .utils import process

if False:
if False: # flake8: noqa
from typing import Any, Callable


Expand Down
2 changes: 1 addition & 1 deletion graphql/execution/executors/utils.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion graphql/execution/middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion graphql/execution/tests/test_nonnull.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion graphql/execution/tests/test_subscribe.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion graphql/execution/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
2 changes: 1 addition & 1 deletion graphql/execution/values.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion graphql/graphql.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion graphql/language/ast.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
if False:
if False: # flake8: noqa
from .parser import Loc
from typing import Any, Optional, Union, List, Tuple, Iterable

Expand Down
2 changes: 1 addition & 1 deletion graphql/language/lexer.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from ..error import GraphQLSyntaxError

if False:
if False: # flake8: noqa
from typing import Optional
from .source import Source

Expand Down
2 changes: 1 addition & 1 deletion graphql/language/location.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
if False:
if False: # flake8: noqa
from .source import Source
from typing import Any

Expand Down
2 changes: 1 addition & 1 deletion graphql/language/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion graphql/language/printer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion graphql/language/visitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion graphql/pyutils/cached_property.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
if False:
if False: # flake8: noqa
from typing import Any


Expand Down
2 changes: 1 addition & 1 deletion graphql/pyutils/contain_subset.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
if False:
if False: # flake8: noqa
from typing import Any, Dict

obj = (dict, list, tuple)
Expand Down
2 changes: 1 addition & 1 deletion graphql/pyutils/default_ordered_dict.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import copy
from collections import OrderedDict

if False:
if False: # flake8: noqa
from typing import Any, List


Expand Down
2 changes: 1 addition & 1 deletion graphql/pyutils/pair_set.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
if False:
if False: # flake8: noqa
from typing import Dict, Any


Expand Down
2 changes: 1 addition & 1 deletion graphql/type/definition.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
2 changes: 1 addition & 1 deletion graphql/type/introspection.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion graphql/type/scalars.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion graphql/type/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion graphql/type/typemap.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
is_output_type,
)

if False:
if False: # flake8: noqa
from typing import Any, List, Optional, Union


Expand Down
2 changes: 1 addition & 1 deletion graphql/utils/ast_to_code.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from ..language.ast import Node
from ..language.parser import Loc

if False:
if False: # flake8: noqa
from typing import Any


Expand Down
2 changes: 1 addition & 1 deletion graphql/utils/concat_ast.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from ..language.ast import Document

if False:
if False: # flake8: noqa
from typing import Iterable


Expand Down
2 changes: 1 addition & 1 deletion graphql/utils/get_field_def.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion graphql/utils/get_operation_ast.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from ..language import ast

if False:
if False: # flake8: noqa
from ..language.ast import Document, OperationDefinition
from typing import Optional

Expand Down
2 changes: 1 addition & 1 deletion graphql/utils/is_valid_literal_value.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion graphql/utils/is_valid_value.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
GraphQLScalarType,
)

if False:
if False: # flake8: noqa
from typing import Any, List

_empty_list = [] # type: List
Expand Down
2 changes: 1 addition & 1 deletion graphql/utils/quoted_or_list.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import functools

if False:
if False: # flake8: noqa
from typing import List


Expand Down
2 changes: 1 addition & 1 deletion graphql/utils/schema_printer.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from .ast_from_value import ast_from_value


if False:
if False: # flake8: noqa
from ..type.definition import (
GraphQLArgument,
GraphQLType,
Expand Down
Loading

0 comments on commit b2111af

Please sign in to comment.