hydra.print.docs module

String representations of hydra.docs types.

hydra.print.docs.definition_reference(v1: DefinitionReference) str

Render a DefinitionReference as its fully-qualified name.

hydra.print.docs.doc_segment(seg: DocSegment) str

Render a single DocSegment back to its source string form.

hydra.print.docs.doc_segment_with(render: Callable[[EntityReference], str], v1: DocSegment) str

Render a single DocSegment using a custom {@type hydra.packaging.EntityReference} renderer.

hydra.print.docs.doc_segments(segs: Sequence[DocSegment]) str

Render a list of DocSegments back to a plain documentation string.

hydra.print.docs.doc_segments_with(render: Callable[[EntityReference], str], segs: Sequence[DocSegment]) str

Render a list of DocSegments using a custom {@type hydra.packaging.EntityReference} renderer.

hydra.print.docs.entity_reference(v1: EntityReference) str

Render a {@type hydra.packaging.EntityReference} as its doc-escape tag string (without the surrounding braces).

hydra.print.docs.render_doc_string(s: str) str

Parse a documentation string and re-render it, converting doc-escape tags through their canonical form.

hydra.print.docs.render_doc_string_with(render: Callable[[EntityReference], str], s: str) str

Parse a documentation string and render it using a custom {@type hydra.packaging.EntityReference} renderer. Text segments are passed through; ref segments are rendered by the provided function. Unrecognized doc-escape blocks are passed through as text.