module_parsing¶
Read and parse all the Manim modules and extract documentation from them.
Type Aliases
- class AliasInfo¶
dict[str, str]
Dictionary with a definition key containing the definition of a
TypeAliasas a string, and optionally a doc key containing the documentation for that alias, if it exists.
- class ModuleLevelAliasDict¶
dict[str,
AliasCategoryDict]Dictionary containing every
TypeAliasdefined in a module, classified by category in differentAliasCategoryDictobjects.
- class ModuleTypeVarDict¶
dict[str, str]
Dictionary containing every
TypeVardefined in a module.
- class AliasDocsDict¶
dict[str,
ModuleLevelAliasDict]Dictionary which, for every module in Manim, contains documentation about their module-level attributes which are explicitly defined as
TypeAlias, separating them from the rest of attributes.
- class DataDict¶
dict[str, list[str]]
Type for a dictionary which, for every module, contains a list with the names of all their DOCUMENTED module-level attributes (identified by Sphinx via the
datarole, hence the name) which are NOT explicitly defined asTypeAlias.
- class TypeVarDict¶
dict[str,
ModuleTypeVarDict]A dictionary mapping module names to dictionaries of
TypeVarobjects.
Functions
- parse_module_attributes()[source]¶
Read all files, generate Abstract Syntax Trees from them, and extract useful information about the type aliases defined in the files: the category they belong to, their definition and their description, separating them from the “regular” module attributes.
- Returns:
ALIAS_DOCS_DICT (
AliasDocsDict) – A dictionary containing the information from all the type aliases in Manim. SeeAliasDocsDictfor more information.DATA_DICT (
DataDict) – A dictionary containing the names of all DOCUMENTED module-level attributes which are not aTypeAlias.TYPEVAR_DICT (
TypeVarDict) – A dictionary containing the definitions ofTypeVarobjects, organized by modules.
- Return type:
tuple[TypeAliasForwardRef(‘~manim.utils.docbuild.module_parsing.AliasDocsDict’), TypeAliasForwardRef(‘~manim.utils.docbuild.module_parsing.DataDict’), TypeAliasForwardRef(‘~manim.utils.docbuild.module_parsing.TypeVarDict’)]