MCPcopy Create free account
hub / github.com/python/mypy / flatten_lvalues

Method flatten_lvalues

mypy/semanal.py:3888–3895  ·  view source on GitHub ↗
(self, lvalues: list[Expression])

Source from the content-addressed store, hash-verified

3886 s.is_final_def = True
3887
3888 def flatten_lvalues(self, lvalues: list[Expression]) -> list[Expression]:
3889 res: list[Expression] = []
3890 for lv in lvalues:
3891 if isinstance(lv, (TupleExpr, ListExpr)):
3892 res.extend(self.flatten_lvalues(lv.items))
3893 else:
3894 res.append(lv)
3895 return res
3896
3897 def process_type_annotation(self, s: AssignmentStmt) -> None:
3898 """Analyze type annotation or infer simple literal type."""

Callers 1

store_final_statusMethod · 0.95

Calls 3

isinstanceFunction · 0.85
extendMethod · 0.80
appendMethod · 0.80

Tested by

no test coverage detected