Skip to content

Commit d51d85b

Browse files
msullivanilevkivskyi
authored andcommitted
Use interable unpacking now that mypyc supports it (#6946)
1 parent bd0d039 commit d51d85b

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

mypy/newsemanal/semanal.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -2973,9 +2973,7 @@ def process_module_assignment(self, lvals: List[Lvalue], rval: Expression,
29732973
# extra elements, so no error will be raised here; mypy will later complain
29742974
# about the length mismatch in type-checking.
29752975
elementwise_assignments = zip(rval.items, *[v.items for v in seq_lvals])
2976-
# TODO: use 'for rv, *lvs in' once mypyc supports it
2977-
for part in elementwise_assignments:
2978-
rv, lvs = part[0], list(part[1:])
2976+
for rv, *lvs in elementwise_assignments:
29792977
self.process_module_assignment(lvs, rv, ctx)
29802978
elif isinstance(rval, RefExpr):
29812979
rnode = self.lookup_type_node(rval)

mypy/semanal.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -2660,9 +2660,7 @@ def process_module_assignment(self, lvals: List[Lvalue], rval: Expression,
26602660
# extra elements, so no error will be raised here; mypy will later complain
26612661
# about the length mismatch in type-checking.
26622662
elementwise_assignments = zip(rval.items, *[v.items for v in seq_lvals])
2663-
# TODO: use 'for rv, *lvs in' once mypyc supports it
2664-
for part in elementwise_assignments:
2665-
rv, lvs = part[0], list(part[1:])
2663+
for rv, *lvs in elementwise_assignments:
26662664
self.process_module_assignment(lvs, rv, ctx)
26672665
elif isinstance(rval, RefExpr):
26682666
rnode = self.lookup_type_node(rval)

0 commit comments

Comments
 (0)