Skip to content

Commit 6e8eac1

Browse files
authored
Update mypy/semanal.py
1 parent 7217f8b commit 6e8eac1

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

mypy/semanal.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6071,9 +6071,8 @@ def analyze_type_application_args(self, expr: IndexExpr) -> list[Type] | None:
60716071
return None
60726072
types.append(analyzed)
60736073

6074-
analyzer = self.type_analyzer()
6075-
types = analyzer.check_unpacks_in_list(types)
6076-
6074+
if allow_unpack:
6075+
types = self.type_analyzer().check_unpacks_in_list(types)
60776076
if has_param_spec and num_args == 1 and types:
60786077
first_arg = get_proper_type(types[0])
60796078
single_any = len(types) == 1 and isinstance(first_arg, AnyType)

0 commit comments

Comments
 (0)