Skip to content

Commit d11b857

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent b5b27bd commit d11b857

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

strawberry/utils/inspect.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
Any,
66
Callable,
77
Generic,
8-
Optional,
98
Literal,
9+
Optional,
1010
Protocol,
1111
TypeVar,
1212
Union,
@@ -84,8 +84,7 @@ class IntBarFoo(IntBar, Foo[str]): ...
8484
from strawberry.types.base import has_object_definition
8585

8686
class Unresolved:
87-
"""
88-
Sentinel class.
87+
"""Sentinel class.
8988
9089
Until PEP 0661 is accepted, this class is used as a sentinel.
9190
"""
@@ -128,8 +127,14 @@ def __str__(self) -> str:
128127

129128
for type_param, arg in list(param_args.items()):
130129
resolved_arg = arg
131-
while isinstance(resolved_arg, TypeVar) and not isinstance(resolved_arg, Unresolved):
132-
resolved_arg = param_args.get(resolved_arg, UNRESOLVED) if resolved_arg is not type_param else UNRESOLVED
130+
while isinstance(resolved_arg, TypeVar) and not isinstance(
131+
resolved_arg, Unresolved
132+
):
133+
resolved_arg = (
134+
param_args.get(resolved_arg, UNRESOLVED)
135+
if resolved_arg is not type_param
136+
else UNRESOLVED
137+
)
133138

134139
param_args[type_param] = resolved_arg
135140

0 commit comments

Comments
 (0)