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

Class EnumCallExpr

mypy/nodes.py:3462–3482  ·  view source on GitHub ↗

Named tuple expression Enum('name', 'val1 val2 ...').

Source from the content-addressed store, hash-verified

3460
3461
3462class EnumCallExpr(Expression):
3463 """Named tuple expression Enum('name', 'val1 val2 ...')."""
3464
3465 __slots__ = ("info", "items", "values")
3466
3467 __match_args__ = ("info", "items", "values")
3468
3469 # The class representation of this enumerated type
3470 info: TypeInfo
3471 # The item names (for debugging)
3472 items: list[str]
3473 values: list[Expression | None]
3474
3475 def __init__(self, info: TypeInfo, items: list[str], values: list[Expression | None]) -> None:
3476 super().__init__()
3477 self.info = info
3478 self.items = items
3479 self.values = values
3480
3481 def accept(self, visitor: ExpressionVisitor[T]) -> T:
3482 return visitor.visit_enum_call_expr(self)
3483
3484
3485class PromoteExpr(Expression):

Callers 2

check_enum_callMethod · 0.90
visit_enum_call_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…