Skip to content

Commit bfc4b94

Browse files
committed
Fix issue with newer flake8
1 parent b559a79 commit bfc4b94

File tree

4 files changed

+9
-12
lines changed

4 files changed

+9
-12
lines changed

Diff for: .flake8

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[flake8]
2-
ignore = E203,W503
2+
ignore = E203,E704,W503
33
exclude = .git,.mypy_cache,.pytest_cache,.tox,.venv,__pycache__,build,dist,docs
44
max-line-length = 88

Diff for: src/graphql/type/definition.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from enum import Enum
22
from typing import (
3+
TYPE_CHECKING,
34
Any,
45
Callable,
56
Collection,
@@ -10,7 +11,6 @@
1011
NamedTuple,
1112
Optional,
1213
Tuple,
13-
TYPE_CHECKING,
1414
Type,
1515
TypeVar,
1616
Union,
@@ -21,8 +21,8 @@
2121
from ..error import GraphQLError
2222
from ..language import (
2323
EnumTypeDefinitionNode,
24-
EnumValueDefinitionNode,
2524
EnumTypeExtensionNode,
25+
EnumValueDefinitionNode,
2626
EnumValueNode,
2727
FieldDefinitionNode,
2828
FieldNode,
@@ -47,16 +47,16 @@
4747
from ..pyutils import (
4848
AwaitableOrValue,
4949
Path,
50+
Undefined,
5051
cached_property,
5152
did_you_mean,
5253
inspect,
5354
is_collection,
5455
is_description,
5556
suggestion_list,
56-
Undefined,
5757
)
5858
from ..utilities.value_from_ast_untyped import value_from_ast_untyped
59-
from .assert_name import assert_name, assert_enum_value_name
59+
from .assert_name import assert_enum_value_name, assert_name
6060

6161
try:
6262
from typing import TypedDict

Diff for: src/graphql/utilities/ast_to_dict.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
from ..language import Node, OperationType
44
from ..pyutils import is_iterable
55

6-
76
__all__ = ["ast_to_dict"]
87

98

@@ -34,10 +33,8 @@ def ast_to_dict(
3433
) -> Any:
3534
"""Convert a language AST to a nested Python dictionary.
3635
37-
Set `location` to True in order to get the locations as well.
36+
Set `locations` to True in order to get the locations as well.
3837
"""
39-
40-
"""Convert a node to a nested Python dictionary."""
4138
if isinstance(node, Node):
4239
if cache is None:
4340
cache = {}

Diff for: src/graphql/utilities/type_from_ast.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
from typing import cast, overload, Optional
1+
from typing import Optional, cast, overload
22

33
from ..language import ListTypeNode, NamedTypeNode, NonNullTypeNode, TypeNode
44
from ..pyutils import inspect
55
from ..type import (
6-
GraphQLSchema,
7-
GraphQLNamedType,
86
GraphQLList,
7+
GraphQLNamedType,
98
GraphQLNonNull,
109
GraphQLNullableType,
10+
GraphQLSchema,
1111
GraphQLType,
1212
)
1313

0 commit comments

Comments
 (0)