From cd46c4f9e4a979b5159aff779eda7d45cde2604c Mon Sep 17 00:00:00 2001 From: Christoph Zwerschke Date: Thu, 23 Jan 2020 18:32:32 +0100 Subject: [PATCH] Make latest black and pyupgrade happy again --- graphql/backend/tests/test_document.py | 2 +- graphql/type/tests/test_validation.py | 30 +++++++++++----------- graphql/utils/tests/test_schema_printer.py | 2 +- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/graphql/backend/tests/test_document.py b/graphql/backend/tests/test_document.py index e3b74c95..dceb4aaa 100644 --- a/graphql/backend/tests/test_document.py +++ b/graphql/backend/tests/test_document.py @@ -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" diff --git a/graphql/type/tests/test_validation.py b/graphql/type/tests/test_validation.py index 4bead700..c1f1daf6 100644 --- a/graphql/type/tests/test_validation.py +++ b/graphql/type/tests/test_validation.py @@ -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", @@ -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( @@ -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", @@ -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( @@ -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( @@ -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( @@ -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( @@ -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", @@ -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)} @@ -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( @@ -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( @@ -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( @@ -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", @@ -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", @@ -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", diff --git a/graphql/utils/tests/test_schema_printer.py b/graphql/utils/tests/test_schema_printer.py index 0d61facf..832676ee 100644 --- a/graphql/utils/tests/test_schema_printer.py +++ b/graphql/utils/tests/test_schema_printer.py @@ -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