Skip to content

Commit

Permalink
Fix issue with newer flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
Cito committed Sep 2, 2024
1 parent b559a79 commit bfc4b94
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .flake8
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[flake8]
ignore = E203,W503
ignore = E203,E704,W503
exclude = .git,.mypy_cache,.pytest_cache,.tox,.venv,__pycache__,build,dist,docs
max-line-length = 88
8 changes: 4 additions & 4 deletions src/graphql/type/definition.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from enum import Enum
from typing import (
TYPE_CHECKING,
Any,
Callable,
Collection,
Expand All @@ -10,7 +11,6 @@
NamedTuple,
Optional,
Tuple,
TYPE_CHECKING,
Type,
TypeVar,
Union,
Expand All @@ -21,8 +21,8 @@
from ..error import GraphQLError
from ..language import (
EnumTypeDefinitionNode,
EnumValueDefinitionNode,
EnumTypeExtensionNode,
EnumValueDefinitionNode,
EnumValueNode,
FieldDefinitionNode,
FieldNode,
Expand All @@ -47,16 +47,16 @@
from ..pyutils import (
AwaitableOrValue,
Path,
Undefined,
cached_property,
did_you_mean,
inspect,
is_collection,
is_description,
suggestion_list,
Undefined,
)
from ..utilities.value_from_ast_untyped import value_from_ast_untyped
from .assert_name import assert_name, assert_enum_value_name
from .assert_name import assert_enum_value_name, assert_name

try:
from typing import TypedDict
Expand Down
5 changes: 1 addition & 4 deletions src/graphql/utilities/ast_to_dict.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from ..language import Node, OperationType
from ..pyutils import is_iterable


__all__ = ["ast_to_dict"]


Expand Down Expand Up @@ -34,10 +33,8 @@ def ast_to_dict(
) -> Any:
"""Convert a language AST to a nested Python dictionary.
Set `location` to True in order to get the locations as well.
Set `locations` to True in order to get the locations as well.
"""

"""Convert a node to a nested Python dictionary."""
if isinstance(node, Node):
if cache is None:
cache = {}
Expand Down
6 changes: 3 additions & 3 deletions src/graphql/utilities/type_from_ast.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
from typing import cast, overload, Optional
from typing import Optional, cast, overload

from ..language import ListTypeNode, NamedTypeNode, NonNullTypeNode, TypeNode
from ..pyutils import inspect
from ..type import (
GraphQLSchema,
GraphQLNamedType,
GraphQLList,
GraphQLNamedType,
GraphQLNonNull,
GraphQLNullableType,
GraphQLSchema,
GraphQLType,
)

Expand Down

0 comments on commit bfc4b94

Please sign in to comment.