Skip to content

Commit

Permalink
fix: Render enumeration instance name instead of just "value", allowi…
Browse files Browse the repository at this point in the history
…ng proper cross-reference

Issue-124: #124
  • Loading branch information
pawamoy committed Apr 19, 2024
1 parent 9f8456a commit 11d81d8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ classifiers = [
]
dependencies = [
"mkdocstrings>=0.24.2",
"griffe>=0.37",
"griffe>=0.44",
]

[project.urls]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 -%}
Expand Down

0 comments on commit 11d81d8

Please sign in to comment.