Skip to content

Commit

Permalink
Make latest black and pyupgrade happy again
Browse files Browse the repository at this point in the history
  • Loading branch information
Cito committed Jan 23, 2020
1 parent 446ebee commit cd46c4f
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion graphql/backend/tests/test_document.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,4 @@ def test_document_get_operation_type_multiple_operations_empty_operation_name():
mutation {hello}
"""
)
assert document.get_operation_type(None) is "mutation"
assert document.get_operation_type(None) == "mutation"
30 changes: 15 additions & 15 deletions graphql/type/tests/test_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ def test_it_rejects_a_schema_which_defines_a_builtin_type(self):

# noinspection PyUnusedLocal
def test_it_rejects_a_schema_which_have_same_named_objects_implementing_an_interface(
self
self,
):
AnotherInterface = GraphQLInterfaceType(
name="AnotherInterface",
Expand Down Expand Up @@ -384,7 +384,7 @@ def test_rejects_an_object_with_incorrectly_typed_field_args(self):
)

def test_rejects_an_object_with_incorrectly_typed_field_args_with_an_invalid_value(
self
self,
):
with raises(AssertionError) as excinfo:
assert schema_with_field_type(
Expand Down Expand Up @@ -422,7 +422,7 @@ def test_accepts_an_object_type_with_array_interface(self):
)

def test_accepts_an_object_type_with_interfaces_as_a_function_returning_an_array(
self
self,
):
AnotherInterfaceType = GraphQLInterfaceType(
name="AnotherInterface",
Expand Down Expand Up @@ -455,7 +455,7 @@ def test_rejects_an_object_type_with_incorrectly_typed_interfaces(self):
)

def test_rejects_an_object_type_with_interfaces_as_a_function_returning_an_incorrect_type(
self
self,
):
with raises(AssertionError) as excinfo:
schema_with_field_type(
Expand Down Expand Up @@ -613,7 +613,7 @@ def test_rejects_an_input_object_type_with_incorrectly_typed_field_value(self):
)

def test_rejects_an_input_object_type_with_fields_function_returning_incorrectly_typed_field_value(
self
self,
):
with raises(AssertionError) as excinfo:
schema_with_input_object(
Expand Down Expand Up @@ -641,7 +641,7 @@ def test_rejects_an_input_object_type_with_empty_fields(self):
)

def test_rejects_an_input_object_type_with_a_field_function_that_returns_nothing(
self
self,
):
with raises(AssertionError) as excinfo:
schema_with_input_object(
Expand All @@ -655,7 +655,7 @@ def test_rejects_an_input_object_type_with_a_field_function_that_returns_nothing
)

def test_rejects_an_input_object_type_with_a_field_function_that_returns_empty(
self
self,
):
with raises(AssertionError) as excinfo:
schema_with_input_object(
Expand Down Expand Up @@ -728,7 +728,7 @@ def test_accepts_an_interface_with_implementing_type_defining_is_type_of(self):
)

def test_accepts_an_interface_type_defining_resolve_type_with_implementing_type_defining_is_type_of(
self
self,
):
AnotherInterfaceType = GraphQLInterfaceType(
name="AnotherInterface",
Expand Down Expand Up @@ -758,7 +758,7 @@ def test_rejects_an_interface_type_with_an_incorrect_type_for_resolve_type(self)
)

def test_rejects_an_interface_type_not_defining_resolve_type_with_implementing_type_not_defining_is_type_of(
self
self,
):
AnotherInterfaceType = GraphQLInterfaceType(
name="AnotherInterface", fields={"f": GraphQLField(GraphQLString)}
Expand Down Expand Up @@ -796,7 +796,7 @@ def test_accepts_a_union_of_object_types_defining_is_type_of(self):
)

def test_accepts_a_union_type_defning_resolve_type_of_objects_defning_is_type_of(
self
self,
):
assert schema_with_field_type(
GraphQLUnionType(
Expand All @@ -817,7 +817,7 @@ def test_rejects_an_interface_type_with_an_incorrect_type_for_resolve_type(self)
)

def test_rejects_a_union_type_not_defining_resolve_type_of_object_types_not_defining_is_type_of(
self
self,
):
with raises(AssertionError) as excinfo:
schema_with_field_type(
Expand Down Expand Up @@ -896,7 +896,7 @@ def test_rejects_a_scalar_type_defining_parse_literal_but_not_parse_value(self):
)

def test_rejects_a_scalar_type_defining_parse_literal_and_parse_value_with_an_incorrect_type(
self
self,
):
with raises(AssertionError) as excinfo:
schema_with_field_type(
Expand Down Expand Up @@ -1370,7 +1370,7 @@ def test_accepts_an_object_which_implements_an_interface(self):
assert schema_with_field_type(AnotherObject)

def test_accepts_an_object_which_implements_an_interface_along_with_more_fields(
self
self,
):
AnotherInterface = GraphQLInterfaceType(
name="AnotherInterface",
Expand All @@ -1396,7 +1396,7 @@ def test_accepts_an_object_which_implements_an_interface_along_with_more_fields(
assert schema_with_field_type(AnotherObject)

def test_accepts_an_object_which_implements_an_interface_field_along_with_more_arguments(
self
self,
):
AnotherInterface = GraphQLInterfaceType(
name="AnotherInterface",
Expand Down Expand Up @@ -1425,7 +1425,7 @@ def test_accepts_an_object_which_implements_an_interface_field_along_with_more_a
assert schema_with_field_type(AnotherObject)

def test_rejects_an_object_which_implements_an_interface_field_along_with_additional_required_arguments(
self
self,
):
AnotherInterface = GraphQLInterfaceType(
name="AnotherInterface",
Expand Down
2 changes: 1 addition & 1 deletion graphql/utils/tests/test_schema_printer.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def test_prints_non_null_list_string_field():

def test_prints_list_non_null_string_field():
output = print_single_field_schema(
GraphQLField((GraphQLList(GraphQLNonNull(GraphQLString))))
GraphQLField(GraphQLList(GraphQLNonNull(GraphQLString)))
)
assert (
output
Expand Down

0 comments on commit cd46c4f

Please sign in to comment.