Skip to content

Commit cd46c4f

Browse files
committed
Make latest black and pyupgrade happy again
1 parent 446ebee commit cd46c4f

File tree

3 files changed

+17
-17
lines changed

3 files changed

+17
-17
lines changed

graphql/backend/tests/test_document.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,4 +80,4 @@ def test_document_get_operation_type_multiple_operations_empty_operation_name():
8080
mutation {hello}
8181
"""
8282
)
83-
assert document.get_operation_type(None) is "mutation"
83+
assert document.get_operation_type(None) == "mutation"

graphql/type/tests/test_validation.py

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ def test_it_rejects_a_schema_which_defines_a_builtin_type(self):
177177

178178
# noinspection PyUnusedLocal
179179
def test_it_rejects_a_schema_which_have_same_named_objects_implementing_an_interface(
180-
self
180+
self,
181181
):
182182
AnotherInterface = GraphQLInterfaceType(
183183
name="AnotherInterface",
@@ -384,7 +384,7 @@ def test_rejects_an_object_with_incorrectly_typed_field_args(self):
384384
)
385385

386386
def test_rejects_an_object_with_incorrectly_typed_field_args_with_an_invalid_value(
387-
self
387+
self,
388388
):
389389
with raises(AssertionError) as excinfo:
390390
assert schema_with_field_type(
@@ -422,7 +422,7 @@ def test_accepts_an_object_type_with_array_interface(self):
422422
)
423423

424424
def test_accepts_an_object_type_with_interfaces_as_a_function_returning_an_array(
425-
self
425+
self,
426426
):
427427
AnotherInterfaceType = GraphQLInterfaceType(
428428
name="AnotherInterface",
@@ -455,7 +455,7 @@ def test_rejects_an_object_type_with_incorrectly_typed_interfaces(self):
455455
)
456456

457457
def test_rejects_an_object_type_with_interfaces_as_a_function_returning_an_incorrect_type(
458-
self
458+
self,
459459
):
460460
with raises(AssertionError) as excinfo:
461461
schema_with_field_type(
@@ -613,7 +613,7 @@ def test_rejects_an_input_object_type_with_incorrectly_typed_field_value(self):
613613
)
614614

615615
def test_rejects_an_input_object_type_with_fields_function_returning_incorrectly_typed_field_value(
616-
self
616+
self,
617617
):
618618
with raises(AssertionError) as excinfo:
619619
schema_with_input_object(
@@ -641,7 +641,7 @@ def test_rejects_an_input_object_type_with_empty_fields(self):
641641
)
642642

643643
def test_rejects_an_input_object_type_with_a_field_function_that_returns_nothing(
644-
self
644+
self,
645645
):
646646
with raises(AssertionError) as excinfo:
647647
schema_with_input_object(
@@ -655,7 +655,7 @@ def test_rejects_an_input_object_type_with_a_field_function_that_returns_nothing
655655
)
656656

657657
def test_rejects_an_input_object_type_with_a_field_function_that_returns_empty(
658-
self
658+
self,
659659
):
660660
with raises(AssertionError) as excinfo:
661661
schema_with_input_object(
@@ -728,7 +728,7 @@ def test_accepts_an_interface_with_implementing_type_defining_is_type_of(self):
728728
)
729729

730730
def test_accepts_an_interface_type_defining_resolve_type_with_implementing_type_defining_is_type_of(
731-
self
731+
self,
732732
):
733733
AnotherInterfaceType = GraphQLInterfaceType(
734734
name="AnotherInterface",
@@ -758,7 +758,7 @@ def test_rejects_an_interface_type_with_an_incorrect_type_for_resolve_type(self)
758758
)
759759

760760
def test_rejects_an_interface_type_not_defining_resolve_type_with_implementing_type_not_defining_is_type_of(
761-
self
761+
self,
762762
):
763763
AnotherInterfaceType = GraphQLInterfaceType(
764764
name="AnotherInterface", fields={"f": GraphQLField(GraphQLString)}
@@ -796,7 +796,7 @@ def test_accepts_a_union_of_object_types_defining_is_type_of(self):
796796
)
797797

798798
def test_accepts_a_union_type_defning_resolve_type_of_objects_defning_is_type_of(
799-
self
799+
self,
800800
):
801801
assert schema_with_field_type(
802802
GraphQLUnionType(
@@ -817,7 +817,7 @@ def test_rejects_an_interface_type_with_an_incorrect_type_for_resolve_type(self)
817817
)
818818

819819
def test_rejects_a_union_type_not_defining_resolve_type_of_object_types_not_defining_is_type_of(
820-
self
820+
self,
821821
):
822822
with raises(AssertionError) as excinfo:
823823
schema_with_field_type(
@@ -896,7 +896,7 @@ def test_rejects_a_scalar_type_defining_parse_literal_but_not_parse_value(self):
896896
)
897897

898898
def test_rejects_a_scalar_type_defining_parse_literal_and_parse_value_with_an_incorrect_type(
899-
self
899+
self,
900900
):
901901
with raises(AssertionError) as excinfo:
902902
schema_with_field_type(
@@ -1370,7 +1370,7 @@ def test_accepts_an_object_which_implements_an_interface(self):
13701370
assert schema_with_field_type(AnotherObject)
13711371

13721372
def test_accepts_an_object_which_implements_an_interface_along_with_more_fields(
1373-
self
1373+
self,
13741374
):
13751375
AnotherInterface = GraphQLInterfaceType(
13761376
name="AnotherInterface",
@@ -1396,7 +1396,7 @@ def test_accepts_an_object_which_implements_an_interface_along_with_more_fields(
13961396
assert schema_with_field_type(AnotherObject)
13971397

13981398
def test_accepts_an_object_which_implements_an_interface_field_along_with_more_arguments(
1399-
self
1399+
self,
14001400
):
14011401
AnotherInterface = GraphQLInterfaceType(
14021402
name="AnotherInterface",
@@ -1425,7 +1425,7 @@ def test_accepts_an_object_which_implements_an_interface_field_along_with_more_a
14251425
assert schema_with_field_type(AnotherObject)
14261426

14271427
def test_rejects_an_object_which_implements_an_interface_field_along_with_additional_required_arguments(
1428-
self
1428+
self,
14291429
):
14301430
AnotherInterface = GraphQLInterfaceType(
14311431
name="AnotherInterface",

graphql/utils/tests/test_schema_printer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def test_prints_non_null_list_string_field():
8484

8585
def test_prints_list_non_null_string_field():
8686
output = print_single_field_schema(
87-
GraphQLField((GraphQLList(GraphQLNonNull(GraphQLString))))
87+
GraphQLField(GraphQLList(GraphQLNonNull(GraphQLString)))
8888
)
8989
assert (
9090
output

0 commit comments

Comments
 (0)