Enabled all Ruff linter rules and fixed resulting violations.
CI / Formatting (push) Successful in 5s
CI / Linting (push) Successful in 4s
CI / Tests (push) Successful in 28s
CI / Type Checking (push) Successful in 11s
CI / Spelling (push) Successful in 5s

This commit is contained in:
2026-03-29 20:08:30 -04:00
parent 603a927f12
commit abe1444e4c
16 changed files with 188 additions and 125 deletions
+6 -2
View File
@@ -95,7 +95,9 @@ class TestReadCredential:
"""Systemd credential file reading."""
def test_reads_credential_file(
self, tmp_path: Path, monkeypatch: pytest.MonkeyPatch
self,
tmp_path: Path,
monkeypatch: pytest.MonkeyPatch,
) -> None:
"""Reads and strips the credential value from the file."""
(tmp_path / "mytoken").write_text(" secret123 \n")
@@ -108,7 +110,9 @@ class TestReadCredential:
assert _read_credential("anything") is None
def test_returns_none_for_missing_file(
self, tmp_path: Path, monkeypatch: pytest.MonkeyPatch
self,
tmp_path: Path,
monkeypatch: pytest.MonkeyPatch,
) -> None:
"""Returns None when the credential file does not exist."""
monkeypatch.setenv("CREDENTIALS_DIRECTORY", str(tmp_path))