MCPcopy Index your code
hub / github.com/python/mypy / flatten_lvalues

Method flatten_lvalues

mypy/checker.py:4311–4320  ·  view source on GitHub ↗
(self, lvalues: list[Expression])

Source from the content-addressed store, hash-verified

4309 self.no_partial_types = False
4310
4311 def flatten_lvalues(self, lvalues: list[Expression]) -> list[Expression]:
4312 res: list[Expression] = []
4313 for lv in lvalues:
4314 if isinstance(lv, (TupleExpr, ListExpr)):
4315 res.extend(self.flatten_lvalues(lv.items))
4316 if isinstance(lv, StarExpr):
4317 # Unwrap StarExpr, since it is unwrapped by other helpers.
4318 lv = lv.expr
4319 res.append(lv)
4320 return res
4321
4322 def check_multi_assignment_from_tuple(
4323 self,

Callers 2

check_finalMethod · 0.95

Calls 3

isinstanceFunction · 0.85
extendMethod · 0.80
appendMethod · 0.80

Tested by

no test coverage detected