Skip to main content

Module py

Module py 

Source
Expand description

The Python domain (M2 wave 4.5).

This module root carries the parse-time configuration bundle that the py object directives, the signature parser and the fix_parens xref roles read. The directives themselves land on top of this file in the next task; nothing here walks a doctree.

Modules§

annotations
Annotation rendering: the _parse_annotation / type_to_xref port (sphinx/domains/python/_annotations.py:30-251, sphinx 9.1.0).
arglist
Arglist and PEP-695 type-parameter-list parsing for the py domain: the _parse_arglist / _pseudo_parse_arglist / _parse_type_list port (sphinx/domains/python/_annotations.py:254-619, sphinx 9.1.0) plus the signature_from_str grammar (sphinx/util/inspect.py:967-1038) and the multi_line_parameter_list measurement (_object.py:291-312).
expr
Python expression parsing with ast.unparse-normalized output.
pycode
sphinx.pycode — the ModuleAnalyzer/DefinitionFinder surface the literalinclude :pyobject: filter consumes.

Structs§

PySigConfig
The object-signature / py-domain configuration the read phase consumes, lifted out of crate::config::BuildConfig so the parser depends on ten values instead of the whole build configuration.