Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Oct 24, 2024
1 parent baab3c0 commit a564778
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion anta/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ def save_commands_data(self, eos_data: list[dict[str, Any] | str]) -> None:
def __init_subclass__(cls) -> None:
"""Verify that the mandatory class attributes are defined and set name and description if not set."""
mandatory_attributes = ["categories", "commands"]
if (missing_attrs := [attr for attr in mandatory_attributes if not hasattr(cls, attr)]):
if missing_attrs := [attr for attr in mandatory_attributes if not hasattr(cls, attr)]:
msg = f"Class {cls.__module__}.{cls.__name__} is missing required class attribute(s): {', '.join(missing_attrs)}"
raise AttributeError(msg)

Expand Down

0 comments on commit a564778

Please sign in to comment.