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

Class TypeAliasStmt

mypy/nodes.py:2216–2236  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2214
2215
2216class TypeAliasStmt(Statement):
2217 __slots__ = ("name", "type_args", "value", "invalid_recursive_alias", "alias_node")
2218
2219 __match_args__ = ("name", "type_args", "value")
2220
2221 name: NameExpr
2222 type_args: list[TypeParam]
2223 value: LambdaExpr # Return value will get translated into a type
2224 invalid_recursive_alias: bool
2225 alias_node: TypeAlias | None
2226
2227 def __init__(self, name: NameExpr, type_args: list[TypeParam], value: LambdaExpr) -> None:
2228 super().__init__()
2229 self.name = name
2230 self.type_args = type_args
2231 self.value = value
2232 self.invalid_recursive_alias = False
2233 self.alias_node = None
2234
2235 def accept(self, visitor: StatementVisitor[T]) -> T:
2236 return visitor.visit_type_alias_stmt(self)
2237
2238
2239# Expressions

Callers 2

visit_TypeAliasMethod · 0.90
read_type_alias_stmtFunction · 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…