render_annotation()
Render an annotation as highlighted inline content
Usage
render_annotation(annotation=None)Parameters
annotation: Annotation | None = None-
The annotation to render.
Noneuses 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.