diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 97457ece5..0242fe89b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -46,7 +46,7 @@ repos: - '' - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.7.4 + rev: v0.8.0 hooks: - id: ruff name: Run Ruff linter diff --git a/anta/cli/__init__.py b/anta/cli/__init__.py index b542a6d80..90be5c75c 100644 --- a/anta/cli/__init__.py +++ b/anta/cli/__init__.py @@ -35,7 +35,7 @@ def wrap() -> None: cli = build_cli(exc) -__all__ = ["cli", "anta"] +__all__ = ["anta", "cli"] if __name__ == "__main__": cli() diff --git a/anta/result_manager/__init__.py b/anta/result_manager/__init__.py index 055a3a179..81c4659cb 100644 --- a/anta/result_manager/__init__.py +++ b/anta/result_manager/__init__.py @@ -148,7 +148,7 @@ def _update_status(self, test_status: AntaTestStatus) -> None: if test_status == "error": self.error_status = True return - if self.status == "unset" or self.status == "skipped" and test_status in {"success", "failure"}: + if self.status == "unset" or (self.status == "skipped" and test_status in {"success", "failure"}): self.status = test_status elif self.status == "success" and test_status == "failure": self.status = AntaTestStatus.FAILURE diff --git a/anta/tests/field_notices.py b/anta/tests/field_notices.py index 4594c380f..41e81a840 100644 --- a/anta/tests/field_notices.py +++ b/anta/tests/field_notices.py @@ -109,15 +109,11 @@ def test(self) -> None: self.result.is_success() incorrect_aboot_version = ( - aboot_version.startswith("4.0.") - and int(aboot_version.split(".")[2]) < 7 - or aboot_version.startswith("4.1.") - and int(aboot_version.split(".")[2]) < 1 + (aboot_version.startswith("4.0.") and int(aboot_version.split(".")[2]) < 7) + or (aboot_version.startswith("4.1.") and int(aboot_version.split(".")[2]) < 1) or ( - aboot_version.startswith("6.0.") - and int(aboot_version.split(".")[2]) < 9 - or aboot_version.startswith("6.1.") - and int(aboot_version.split(".")[2]) < 7 + (aboot_version.startswith("6.0.") and int(aboot_version.split(".")[2]) < 9) + or (aboot_version.startswith("6.1.") and int(aboot_version.split(".")[2]) < 7) ) ) if incorrect_aboot_version: diff --git a/asynceapi/__init__.py b/asynceapi/__init__.py index d6586cf9b..6d5a23bf6 100644 --- a/asynceapi/__init__.py +++ b/asynceapi/__init__.py @@ -9,4 +9,4 @@ from .device import Device from .errors import EapiCommandError -__all__ = ["Device", "SessionConfig", "EapiCommandError"] +__all__ = ["Device", "EapiCommandError", "SessionConfig"] diff --git a/pyproject.toml b/pyproject.toml index 6d2b30b03..0bdccf2fc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -76,7 +76,7 @@ dev = [ "pytest-metadata>=3.0.0", "pytest>=7.4.0", "respx>=0.21.1", - "ruff>=0.5.4,<0.8.0", + "ruff>=0.5.4,<0.9.0", "tox>=4.10.0,<5.0.0", "types-PyYAML", "types-pyOpenSSL", diff --git a/tests/units/reporter/conftest.py b/tests/units/reporter/conftest.py index ae7d3dfea..d0eed3639 100644 --- a/tests/units/reporter/conftest.py +++ b/tests/units/reporter/conftest.py @@ -5,4 +5,4 @@ from tests.units.result_manager.conftest import list_result_factory, result_manager, result_manager_factory, test_result_factory -__all__ = ["result_manager", "result_manager_factory", "list_result_factory", "test_result_factory"] +__all__ = ["list_result_factory", "result_manager", "result_manager_factory", "test_result_factory"]