astx.modules

astx.modules

Source: packages/astx/src/astx/modules.py

title: ASTx namespace AST types.

Classes

NamespaceKind(str, Enum)

title: Stable namespace categories.
summary: >-
  Distinguish the semantic origin of one namespace-valued binding while
  keeping the user-facing expression model uniform.

NamespaceType(AnyType)

title: Semantic-only namespace type.
summary: >-
  Represent one imported namespace value during semantic analysis and
  lowering without modeling it as a user-defined runtime aggregate.
attributes:
  namespace_key:
    type: str
  namespace_kind:
    type: NamespaceKind
  display_name:
    type: str | None

Methods

module_key(self) -> str
title: Return the legacy module-key alias for this namespace.
returns:
  type: str
get_struct(self, simplified: bool=False) -> astx.base.ReprStruct
title: Build one repr structure for a namespace type.
parameters:
  simplified:
    type: bool
returns:
  type: astx.base.ReprStruct