Skip to content

Commit dbc02ee

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

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

mypy/expandtype.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -524,9 +524,7 @@ def expand_type_list_with_unpack(self, typs: list[Type]) -> list[Type]:
524524
items.extend(self.expand_unpack(item))
525525
else:
526526
expanded = item.accept(self)
527-
if isinstance(expanded, UnpackType) and isinstance(
528-
expanded.type, TupleType
529-
):
527+
if isinstance(expanded, UnpackType) and isinstance(expanded.type, TupleType):
530528
# Inline Unpack[tuple[X, Y]] -> X, Y
531529
# This also handles Unpack[tuple[()]] -> nothing
532530
items.extend(expanded.type.items)
@@ -543,9 +541,7 @@ def expand_type_tuple_with_unpack(self, typs: tuple[Type, ...]) -> list[Type]:
543541
items.extend(self.expand_unpack(item))
544542
else:
545543
expanded = item.accept(self)
546-
if isinstance(expanded, UnpackType) and isinstance(
547-
expanded.type, TupleType
548-
):
544+
if isinstance(expanded, UnpackType) and isinstance(expanded.type, TupleType):
549545
# Inline Unpack[tuple[X, Y]] -> X, Y
550546
# This also handles Unpack[tuple[()]] -> nothing
551547
items.extend(expanded.type.items)

0 commit comments

Comments
 (0)