Skip to content

Commit 9d104eb

Browse files
committed
More clean-up after auto formatting with black
1 parent 77d52ff commit 9d104eb

28 files changed

+629
-634
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ a query language for APIs created by Facebook.
1212
[![Python 3 Status](https://pyup.io/repos/github/graphql-python/graphql-core-next/python-3-shield.svg)](https://pyup.io/repos/github/graphql-python/graphql-core-next/)
1313

1414
The current version 1.0.1 of GraphQL-core-next is up-to-date with GraphQL.js version
15-
14.0.2. All parts of the API are covered by an extensive test suite of currently 1617
15+
14.0.2. All parts of the API are covered by an extensive test suite of currently 1618
1616
unit tests.
1717

1818

graphql/execution/execute.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -842,7 +842,7 @@ def complete_leaf_value(return_type: GraphQLLeafType, result: Any) -> Any:
842842
serialized_result = return_type.serialize(result)
843843
if is_invalid(serialized_result):
844844
raise TypeError(
845-
f"Expected a value of type '{return_type}'" f" but received: {result!r}"
845+
f"Expected a value of type '{return_type}' but received: {result!r}"
846846
)
847847
return serialized_result
848848

@@ -1084,8 +1084,7 @@ def invalid_return_type_error(
10841084
) -> GraphQLError:
10851085
"""Create a GraphQLError for an invalid return type."""
10861086
return GraphQLError(
1087-
f"Expected value of type '{return_type.name}'" f" but got: {result!r}.",
1088-
field_nodes,
1087+
f"Expected value of type '{return_type.name}' but got: {result!r}.", field_nodes
10891088
)
10901089

10911090

graphql/language/lexer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ def read_number(source: Source, start, char, line, col, prev) -> Token:
278278
raise GraphQLSyntaxError(
279279
source,
280280
position,
281-
"Invalid number," f" unexpected digit after 0: {print_char(char)}.",
281+
f"Invalid number, unexpected digit after 0: {print_char(char)}.",
282282
)
283283
else:
284284
position = read_digits(source, position, char)

graphql/subscription/subscribe.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ async def create_source_event_stream(
103103
104104
Returns a coroutine that yields an AsyncIterable.
105105
106-
If the client-provided invalid arguments, the source stream could not be created,
106+
If the client provided invalid arguments, the source stream could not be created,
107107
or the resolver did not return an AsyncIterable, this function will throw an error,
108108
which should be caught and handled by the caller.
109109
@@ -173,5 +173,5 @@ async def create_source_event_stream(
173173
if isinstance(event_stream, AsyncIterable):
174174
return cast(AsyncIterable, event_stream)
175175
raise TypeError(
176-
"Subscription field must return AsyncIterable." f" Received: {event_stream!r}"
176+
f"Subscription field must return AsyncIterable. Received: {event_stream!r}"
177177
)

graphql/type/definition.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ class GraphQLWrappingType(GraphQLType, Generic[GT]):
158158
def __init__(self, type_: GT) -> None:
159159
if not is_type(type_):
160160
raise TypeError(
161-
"Can only create a wrapper for a GraphQLType, but got:" f" {type_}."
161+
f"Can only create a wrapper for a GraphQLType, but got: {type_}."
162162
)
163163
self.of_type = type_
164164

graphql/type/validate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ def validate_root_types(self):
112112
self.report_error("Query root type must be provided.", schema.ast_node)
113113
elif not is_object_type(query_type):
114114
self.report_error(
115-
"Query root type must be Object type," f" it cannot be {query_type}.",
115+
f"Query root type must be Object type, it cannot be {query_type}.",
116116
get_operation_type_node(schema, query_type, OperationType.QUERY),
117117
)
118118

graphql/utilities/assert_valid_name.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ def is_valid_name_error(name: str, node: Node = None) -> Optional[GraphQLError]:
3030
)
3131
if not re_name.match(name):
3232
return GraphQLError(
33-
"Names must match /^[_a-zA-Z][_a-zA-Z0-9]*$/" f" but {name!r} does not.",
34-
node,
33+
f"Names must match /^[_a-zA-Z][_a-zA-Z0-9]*$/ but {name!r} does not.", node
3534
)
3635
return None

graphql/utilities/build_client_schema.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ def build_object_def(object_introspection: Dict) -> GraphQLObjectType:
143143
interfaces = object_introspection.get("interfaces")
144144
if interfaces is None:
145145
raise TypeError(
146-
"Introspection result missing interfaces:" f" {object_introspection!r}"
146+
f"Introspection result missing interfaces: {object_introspection!r}"
147147
)
148148
return GraphQLObjectType(
149149
name=object_introspection["name"],
@@ -180,7 +180,7 @@ def build_union_def(union_introspection: Dict) -> GraphQLUnionType:
180180
def build_enum_def(enum_introspection: Dict) -> GraphQLEnumType:
181181
if enum_introspection.get("enumValues") is None:
182182
raise TypeError(
183-
"Introspection result missing enumValues:" f" {enum_introspection!r}"
183+
f"Introspection result missing enumValues: {enum_introspection!r}"
184184
)
185185
return GraphQLEnumType(
186186
name=enum_introspection["name"],
@@ -222,7 +222,7 @@ def build_input_object_def(
222222
def build_field(field_introspection: Dict) -> GraphQLField:
223223
if field_introspection.get("args") is None:
224224
raise TypeError(
225-
"Introspection result missing field args:" f" {field_introspection!r}"
225+
f"Introspection result missing field args: {field_introspection!r}"
226226
)
227227
return GraphQLField(
228228
get_output_type(field_introspection["type"]),
@@ -234,7 +234,7 @@ def build_field(field_introspection: Dict) -> GraphQLField:
234234
def build_field_def_map(type_introspection: Dict) -> Dict[str, GraphQLField]:
235235
if type_introspection.get("fields") is None:
236236
raise TypeError(
237-
"Introspection result missing fields:" f" {type_introspection!r}"
237+
f"Introspection result missing fields: {type_introspection!r}"
238238
)
239239
return {
240240
field_introspection["name"]: build_field(field_introspection)

graphql/utilities/coerce_value.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ def coerce_value(
166166
errors = add(
167167
errors,
168168
coercion_error(
169-
f"Field '{field_name}'" f" is not defined by type {type_.name}",
169+
f"Field '{field_name}' is not defined by type {type_.name}",
170170
blame_node,
171171
path,
172172
did_you_mean,

graphql/utilities/find_breaking_changes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -554,7 +554,7 @@ def find_types_removed_from_unions(
554554
types_removed_from_union.append(
555555
BreakingChange(
556556
BreakingChangeType.TYPE_REMOVED_FROM_UNION,
557-
f"{type_name} was removed" f" from union type {old_type_name}.",
557+
f"{type_name} was removed from union type {old_type_name}.",
558558
)
559559
)
560560
return types_removed_from_union

0 commit comments

Comments
 (0)