diff --git a/pyproject.toml b/pyproject.toml index 1ce73547..c02461f1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -29,7 +29,7 @@ classifiers = [ ] dependencies = [ "mkdocstrings>=0.24.2", - "griffe>=0.37", + "griffe>=0.44", ] [project.urls] diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/expression.html b/src/mkdocstrings_handlers/python/templates/material/_base/expression.html index cbc84e43..00e1c761 100644 --- a/src/mkdocstrings_handlers/python/templates/material/_base/expression.html +++ b/src/mkdocstrings_handlers/python/templates/material/_base/expression.html @@ -29,7 +29,11 @@ {{ render(expression.slice.elements[0], annotations_path) }} {%- elif expression.classname == "ExprAttribute" -%} {%- if annotations_path == "brief" -%} - {{ render(expression.last, "brief") }} + {%- if expression.last.is_enum_value -%} + {{ crossref(expression.last.parent, "brief") }}.value + {%- else -%} + {{ render(expression.last, "brief") }} + {%- endif -%} {%- elif annotations_path == "full" -%} {{ render(expression.first, "full") }} {%- for element in expression -%}