hydra.parse.docs module
Parser for Hydra documentation strings, producing DocSegment lists. A bespoke helper parser, not a parse<T> convention function (see docs/specification/index.md, Conventions).
- hydra.parse.docs.parse_doc_annotation(inner: str) object
Parse the content between the doc-escape delimiters into an EntityReference. The input is the inner content (tag and optional rhs), e.g. “type hydra.core.Lambda”. Returns nothing for unrecognized tags.
- hydra.parse.docs.parse_doc_string(s: str) Sequence[DocSegment]
Parse a documentation string into a list of {@type hydra.docs.DocSegment}s. Recognized doc-escape tags become DocSegment.ref segments (wrapping a {@type hydra.packaging.EntityReference}); all other text (including unrecognized doc-escape blocks) becomes DocSegment.text segments. Adjacent text fragments are not merged.