Skip to content

Commit ea0c52a

Browse files
committed
Some adaptations to long lines after reformatting
1 parent 1bcd466 commit ea0c52a

20 files changed

+86
-102
lines changed

graphql/error/graphql_error.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
from .print_error import print_error
55

66
if TYPE_CHECKING: # pragma: no cover
7-
from ..language.ast import Node # noqa
8-
from ..language.location import SourceLocation # noqa
9-
from ..language.source import Source # noqa
7+
from ..language.ast import Node # noqa: F401
8+
from ..language.location import SourceLocation # noqa: F401
9+
from ..language.source import Source # noqa: F401
1010

1111
__all__ = ["GraphQLError"]
1212

graphql/error/located_error.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from .graphql_error import GraphQLError
44

55
if TYPE_CHECKING: # pragma: no cover
6-
from ..language.ast import Node # noqa
6+
from ..language.ast import Node # noqa: F401
77

88
__all__ = ["located_error"]
99

graphql/language/parser.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,9 @@ def parse(
107107
source,
108108
no_location=no_location,
109109
experimental_fragment_variables=experimental_fragment_variables,
110-
experimental_variable_definition_directives=experimental_variable_definition_directives, # noqa
110+
experimental_variable_definition_directives=(
111+
experimental_variable_definition_directives
112+
),
111113
)
112114
return parse_document(lexer)
113115

setup.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,3 @@
4646
include_package_data=True,
4747
zip_safe=False,
4848
)
49-

tests/execution/test_mutations.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ async def promise_and_fail_to_change_the_number(self, newNumber: int):
8080
"promiseAndFailToChangeTheNumber": GraphQLField(
8181
numberHolderType,
8282
args={"newNumber": GraphQLArgument(GraphQLInt)},
83-
resolve=lambda obj, _info, newNumber: obj.promise_and_fail_to_change_the_number( # noqa
84-
newNumber
83+
resolve=lambda obj, _info, newNumber: (
84+
obj.promise_and_fail_to_change_the_number(newNumber)
8585
),
8686
),
8787
},

tests/execution/test_variables.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def field_with_input_arg(input_arg: GraphQLArgument):
9090
"fieldWithDefaultArgumentValue": field_with_input_arg(
9191
GraphQLArgument(GraphQLString, default_value="Hello World")
9292
),
93-
"fieldWithNonNullableStringInputAndDefaultArgumentValue": field_with_input_arg(
93+
"fieldWithNonNullableStringInputAndDefaultArgValue": field_with_input_arg(
9494
GraphQLArgument(GraphQLNonNull(GraphQLString), default_value="Hello World")
9595
),
9696
"fieldWithNestedInputObject": field_with_input_arg(
@@ -162,7 +162,8 @@ def properly_parses_null_value_to_null():
162162

163163
assert result == (
164164
{
165-
"fieldWithObjectInput": "{'a': None, 'b': None, 'c': 'C', 'd': None}" # noqa
165+
"fieldWithObjectInput": "{'a': None, 'b': None,"
166+
" 'c': 'C', 'd': None}"
166167
},
167168
None,
168169
)
@@ -907,14 +908,12 @@ def when_no_runtime_value_is_provided_to_a_non_null_argument():
907908
result = execute_query(
908909
"""
909910
query optionalVariable($optional: String) {
910-
fieldWithNonNullableStringInputAndDefaultArgumentValue(input: $optional)
911+
fieldWithNonNullableStringInputAndDefaultArgValue(input: $optional)
911912
}
912-
""" # noqa
913+
"""
913914
)
914915

915916
assert result == (
916-
{
917-
"fieldWithNonNullableStringInputAndDefaultArgumentValue": "'Hello World'" # noqa
918-
},
917+
{"fieldWithNonNullableStringInputAndDefaultArgValue": "'Hello World'"},
919918
None,
920919
)

tests/language/test_printer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,4 +195,4 @@ def prints_kitchen_sink(kitchen_sink): # noqa: F811
195195
query
196196
}
197197
'''
198-
) # noqa
198+
)

tests/language/test_schema_printer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,5 +156,5 @@ def prints_kitchen_sink(kitchen_sink): # noqa: F811
156156
extend schema @onSchema {
157157
subscription: SubscriptionType
158158
}
159-
''' # noqa
159+
''' # noqa: E501
160160
)

tests/type/test_enum.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,8 @@ def may_be_internally_represented_with_complex_values():
324324
{"first": "ONE", "second": "TWO", "good": "TWO", "bad": None},
325325
[
326326
{
327-
"message": "Expected a value of type 'Complex' but received: Complex2", # noqa
327+
"message": "Expected a value of type 'Complex'"
328+
" but received: Complex2",
328329
"locations": [(6, 15)],
329330
"path": ["bad"],
330331
}

tests/type/test_introspection.py

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1214,25 +1214,28 @@ def exposes_descriptions_on_types_and_fields():
12141214
"fields": [
12151215
{
12161216
"name": "types",
1217-
"description": "A list of all types supported by this server.", # noqa
1217+
"description": "A list of all types supported"
1218+
" by this server.",
12181219
},
12191220
{
12201221
"name": "queryType",
1221-
"description": "The type that query operations will be rooted at.", # noqa
1222+
"description": "The type that query operations"
1223+
" will be rooted at.",
12221224
},
12231225
{
12241226
"name": "mutationType",
1225-
"description": "If this server supports mutation, the type that" # noqa
1226-
" mutation operations will be rooted at.", # noqa
1227+
"description": "If this server supports mutation, the type"
1228+
" that mutation operations will be rooted at.",
12271229
},
12281230
{
12291231
"name": "subscriptionType",
1230-
"description": "If this server support subscription, the type" # noqa
1231-
" that subscription operations will be rooted at.", # noqa
1232+
"description": "If this server support subscription,"
1233+
" the type that subscription operations will be rooted at.",
12321234
},
12331235
{
12341236
"name": "directives",
1235-
"description": "A list of all directives supported by this server.", # noqa
1237+
"description": "A list of all directives supported"
1238+
" by this server.",
12361239
},
12371240
],
12381241
}

0 commit comments

Comments
 (0)