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

Class CastExpr

mypy/nodes.py:2765–2781  ·  view source on GitHub ↗

Cast expression cast(type, expr).

Source from the content-addressed store, hash-verified

2763
2764
2765class CastExpr(Expression):
2766 """Cast expression cast(type, expr)."""
2767
2768 __slots__ = ("expr", "type")
2769
2770 __match_args__ = ("expr", "type")
2771
2772 expr: Expression
2773 type: mypy.types.Type
2774
2775 def __init__(self, expr: Expression, typ: mypy.types.Type) -> None:
2776 super().__init__()
2777 self.expr = expr
2778 self.type = typ
2779
2780 def accept(self, visitor: ExpressionVisitor[T]) -> T:
2781 return visitor.visit_cast_expr(self)
2782
2783
2784class TypeFormExpr(Expression):

Callers 2

visit_call_exprMethod · 0.90
visit_cast_exprMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…