Skip to content

Commit cb4d508

Browse files
committed
Fixed PEP8 errors
1 parent 5d4def9 commit cb4d508

File tree

4 files changed

+16
-16
lines changed

4 files changed

+16
-16
lines changed

graphql/language/tests/test_printer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def test_correctly_prints_mutation_operation_without_name():
4848

4949
def test_correctly_prints_query_with_artifacts():
5050
query_ast_shorthanded = parse(
51-
'query ($foo: TestType) @testDirective { id, name }'
51+
'query ($foo: TestType) @testDirective { id, name }'
5252
)
5353
assert print_ast(query_ast_shorthanded) == '''query ($foo: TestType) @testDirective {
5454
id
@@ -59,7 +59,7 @@ def test_correctly_prints_query_with_artifacts():
5959

6060
def test_correctly_prints_mutation_with_artifacts():
6161
query_ast_shorthanded = parse(
62-
'mutation ($foo: TestType) @testDirective { id, name }'
62+
'mutation ($foo: TestType) @testDirective { id, name }'
6363
)
6464
assert print_ast(query_ast_shorthanded) == '''mutation ($foo: TestType) @testDirective {
6565
id

graphql/language/visitor.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88

99
class Falsey(object):
10+
1011
def __nonzero__(self):
1112
return False
1213

graphql/validation/rules/fields_on_correct_type.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
izip = zip
1313

1414

15-
1615
class OrderedCounter(Counter, OrderedDict):
1716
pass
1817

@@ -43,7 +42,7 @@ def undefined_field_message(field_name, type, suggested_types):
4342
suggestions = ', '.join(['"{}"'.format(t) for t in suggested_types[:MAX_LENGTH]])
4443
l_suggested_types = len(suggested_types)
4544
if l_suggested_types > MAX_LENGTH:
46-
suggestions += ", and {} other types".format(l_suggested_types-MAX_LENGTH)
45+
suggestions += ", and {} other types".format(l_suggested_types - MAX_LENGTH)
4746
message += " However, this field exists on {}.".format(suggestions)
4847
message += " Perhaps you meant to use an inline fragment?"
4948
return message

graphql/validation/tests/test_fields_on_correct_type.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -188,11 +188,11 @@ def test_defined_on_implementors_queried_on_union():
188188
}
189189
''', [
190190
undefined_field(
191-
'name',
192-
'CatOrDog',
193-
['Being', 'Pet', 'Canine', 'Cat', 'Dog'],
194-
3,
195-
9
191+
'name',
192+
'CatOrDog',
193+
['Being', 'Pet', 'Canine', 'Cat', 'Dog'],
194+
3,
195+
9
196196
)
197197
])
198198

@@ -218,17 +218,17 @@ def test_fields_correct_type_no_suggestion():
218218
def test_fields_correct_type_no_small_number_suggestions():
219219
message = FieldsOnCorrectType.undefined_field_message('T', 'f', ['A', 'B'])
220220
assert message == (
221-
'Cannot query field "T" on type "f". ' +
222-
'However, this field exists on "A", "B". ' +
223-
'Perhaps you meant to use an inline fragment?'
221+
'Cannot query field "T" on type "f". ' +
222+
'However, this field exists on "A", "B". ' +
223+
'Perhaps you meant to use an inline fragment?'
224224
)
225225

226226

227227
def test_fields_correct_type_lot_suggestions():
228228
message = FieldsOnCorrectType.undefined_field_message('T', 'f', ['A', 'B', 'C', 'D', 'E', 'F'])
229229
assert message == (
230-
'Cannot query field "T" on type "f". ' +
231-
'However, this field exists on "A", "B", "C", "D", "E", ' +
232-
'and 1 other types. '+
233-
'Perhaps you meant to use an inline fragment?'
230+
'Cannot query field "T" on type "f". ' +
231+
'However, this field exists on "A", "B", "C", "D", "E", ' +
232+
'and 1 other types. ' +
233+
'Perhaps you meant to use an inline fragment?'
234234
)

0 commit comments

Comments
 (0)