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

Method seq_expr

mypy/literals.py:208–212  ·  view source on GitHub ↗
(self, e: ListExpr | TupleExpr | SetExpr, name: str)

Source from the content-addressed store, hash-verified

206 return ("Unary", e.op, literal_hash(e.expr))
207
208 def seq_expr(self, e: ListExpr | TupleExpr | SetExpr, name: str) -> Key | None:
209 if all(literal(x) == LITERAL_YES for x in e.items):
210 rest: tuple[Key | None, ...] = tuple(literal_hash(x) for x in e.items)
211 return (name,) + rest
212 return None
213
214 def visit_list_expr(self, e: ListExpr) -> Key | None:
215 return self.seq_expr(e, "List")

Callers 3

visit_list_exprMethod · 0.95
visit_tuple_exprMethod · 0.95
visit_set_exprMethod · 0.95

Calls 4

allFunction · 0.85
literalFunction · 0.85
tupleClass · 0.85
literal_hashFunction · 0.85

Tested by

no test coverage detected