Skip to main content

parse_annotation

Function parse_annotation 

Source
pub fn parse_annotation(
    text: &str,
    ctx: &PyRefContext,
    cfg: &PySigConfig,
) -> Vec<Node>
Expand description

Port of _parse_annotation (_annotations.py:95-251): parse one annotation string and render it as a flat node list. On any parse or unparse failure the whole string becomes a single type_to_xref (_annotations.py:250-251) [PY §2.3].