API reference
python:arx:arx.parser.types.TypeParserMixin.parse_type
method parse_type
parse_type(*, allow_template_vars: bool = True, allow_union: bool = False, type_context: TypeUseContext = TypeUseContext.GENERAL) -> astx.DataType
Source: packages/arx/src/arx/parser/types.py:289
Parse a type annotation.
Parentheses group a complete type with multiline layout while preserving template-variable and type-use restrictions. They do not introduce tuple types or additional runtime union support.
Parameters
-
allow_template_vars โ Whether to use allow template vars.; Type: bool
-
allow_union โ Whether to consume unparenthesized union members.; Type: bool
-
type_context โ Type context.; Type: TypeUseContext
Returns
Parsed a type annotation.; Type: astx.DataType