{% from "chirpui/callout.html" import callout %} {#- Exceptions block for a documented Python function/method. Field path verified against Bengal's autodoc Python extractor (bengal/autodoc/extractors/python/extractor.py): the docstring's `Raises:` section is parsed into `metadata.parsed_doc.raises`, a list of dicts with `type` and `description` keys. A passed-in `raises` list (non-extractor callers) is honored first. -#} {% let raises = raises ?? element?.metadata?.parsed_doc?.raises ?? element?.raises ?? [] %} {% if raises | length > 0 %} {% call callout(variant="warning", title="Raises", cls="chirp-theme-reference-raises") %}
{{ exc_type }}{% if item.get("description") %}: {{ item.description }}{% end %}