Skip to content

Commit

Permalink
doc: Sometimes decorators are not functions (#1012)
Browse files Browse the repository at this point in the history
  • Loading branch information
gmuloc authored Jan 17, 2025
1 parent d57b53e commit 419f6ca
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion anta/reporter/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
class ReportTable:
"""TableReport Generate a Table based on TestResult."""

@dataclass()
@dataclass
class Headers: # pylint: disable=too-many-instance-attributes
"""Headers for the table report."""

Expand Down
2 changes: 1 addition & 1 deletion docs/templates/python/material/class.html.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
{{ super() }}

{% for dec in class.decorators %}
{% if dec.value.function.name == "deprecated_test_class" %}
{% if dec.value.function is defined and dec.value.function.name == "deprecated_test_class" %}
<img alt="Static Badge" src="https://img.shields.io/badge/DEPRECATED-yellow?style=flat&logoSize=auto">
{% for arg in dec.value.arguments | selectattr("name", "equalto", "removal_in_version") | list %}
<img alt="Static Badge" src="https://img.shields.io/badge/REMOVAL-{{ arg.value[1:-1] }}-grey?style=flat&logoSize=auto&labelColor=red">
Expand Down

0 comments on commit 419f6ca

Please sign in to comment.