Add ruff linting

Configure ruff in pyproject.toml and apply its fixes: modern annotations
(X | None, builtin generics, collections.abc), sorted imports, explicit
stacklevel in test warnings.
This commit is contained in:
Fuxino
2026-10-16 13:47:24 +02:00
parent 7dbb1bcaee
commit 17c104c6c8
6 changed files with 65 additions and 57 deletions
+6
View File
@@ -57,6 +57,12 @@ warn_unused_ignores = true
module = ["paramiko", "systemd", "dbus"]
ignore_missing_imports = true
[tool.ruff]
line-length = 120
[tool.ruff.lint]
select = ["E", "F", "W", "I", "B", "UP"]
[tool.pytest.ini_options]
testpaths = ["tests"]
# Import the repo copy, not an installed one