Skip to content

Commit 1d04e11

Browse files
committed
Update black
1 parent e49f77a commit 1d04e11

File tree

6 files changed

+53
-45
lines changed

6 files changed

+53
-45
lines changed

poetry.lock

Lines changed: 29 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ pytest-cov = "^3.0"
5656
pytest-describe = "^2.0"
5757
pytest-timeout = "^2.0"
5858
black = [
59-
{version = "21.12b0", python = ">=3.6.2"},
59+
{version = "22.1.0", python = ">=3.6.2"},
6060
{version = "20.8b1", python = "<3.6.2"}
6161
]
6262
flake8 = "^4.0"

tests/execution/test_middleware.py

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -157,20 +157,17 @@ def skip_middleware_without_resolve_method():
157157
class BadMiddleware:
158158
pass # no resolve method here
159159

160-
assert (
161-
execute(
162-
GraphQLSchema(
163-
GraphQLObjectType(
164-
"TestType",
165-
{"foo": GraphQLField(GraphQLString)},
166-
)
167-
),
168-
parse("{ foo }"),
169-
{"foo": "bar"},
170-
middleware=MiddlewareManager(BadMiddleware()),
171-
)
172-
== ({"foo": "bar"}, None)
173-
)
160+
assert execute(
161+
GraphQLSchema(
162+
GraphQLObjectType(
163+
"TestType",
164+
{"foo": GraphQLField(GraphQLString)},
165+
)
166+
),
167+
parse("{ foo }"),
168+
{"foo": "bar"},
169+
middleware=MiddlewareManager(BadMiddleware()),
170+
) == ({"foo": "bar"}, None)
174171

175172
def with_function_and_object():
176173
doc = parse("{ field }")

tests/execution/test_resolve.py

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -36,27 +36,21 @@ class RootValue:
3636
def default_function_accesses_keys_of_dict():
3737
root_value = {"test": "testValue"}
3838

39-
assert (
40-
execute_sync(
41-
schema=_test_schema(GraphQLField(GraphQLString)),
42-
document=parse("{ test }"),
43-
root_value=root_value,
44-
)
45-
== ({"test": "testValue"}, None)
46-
)
39+
assert execute_sync(
40+
schema=_test_schema(GraphQLField(GraphQLString)),
41+
document=parse("{ test }"),
42+
root_value=root_value,
43+
) == ({"test": "testValue"}, None)
4744

4845
def default_function_accesses_keys_of_chain_map():
4946
# use a mapping that is not a subclass of dict
5047
root_value = ChainMap({"test": "testValue"})
5148

52-
assert (
53-
execute_sync(
54-
schema=_test_schema(GraphQLField(GraphQLString)),
55-
document=parse("{ test }"),
56-
root_value=root_value,
57-
)
58-
== ({"test": "testValue"}, None)
59-
)
49+
assert execute_sync(
50+
schema=_test_schema(GraphQLField(GraphQLString)),
51+
document=parse("{ test }"),
52+
root_value=root_value,
53+
) == ({"test": "testValue"}, None)
6054

6155
def default_function_calls_methods():
6256
class RootValue:

tests/utilities/test_get_introspection_query.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def to_not_match(self, name: str) -> None:
3232

3333
@staticmethod
3434
def to_reg_exp(name: str) -> Pattern:
35-
return re.compile(fr"\b{name}\b")
35+
return re.compile(rf"\b{name}\b")
3636

3737

3838
def describe_get_introspection_query():

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ python =
1212

1313
[testenv:black]
1414
basepython = python3.9
15-
deps = black==21.12b0
15+
deps = black==22.1.0
1616
commands =
1717
black src tests setup.py -t py39 --check
1818

0 commit comments

Comments
 (0)