Skip to main content

render_annotation()

Render an annotation as highlighted inline content

Usage

Source

render_annotation(annotation=None)

Parameters

annotation: Annotation | None = None
The annotation to render. None uses the current attribute’s annotation.

Returns

str
The highlighted annotation text with supported expression markup.

Raises

TypeError
If no annotation is supplied and the current object is not an attribute.