Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update ruff requirement from <0.8.0,>=0.5.4 to >=0.5.4,<0.9.0 #932

Merged
merged 2 commits into from
Nov 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion anta/cli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def wrap() -> None:

cli = build_cli(exc)

__all__ = ["cli", "anta"]
__all__ = ["anta", "cli"]

if __name__ == "__main__":
cli()
2 changes: 1 addition & 1 deletion anta/result_manager/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 4 additions & 8 deletions anta/tests/field_notices.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion asynceapi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
from .device import Device
from .errors import EapiCommandError

__all__ = ["Device", "SessionConfig", "EapiCommandError"]
__all__ = ["Device", "EapiCommandError", "SessionConfig"]
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion tests/units/reporter/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Loading