Skip to content

Commit faec9ae

Browse files
iMicknlCopilot
andcommitted
Update test files to clarify ruff noqa comments and improve readability (#1917)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 9d73c6a commit faec9ae

File tree

7 files changed

+8
-14
lines changed

7 files changed

+8
-14
lines changed

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ select = [
7575
]
7676
ignore = ["E501"] # Line too long
7777

78+
[tool.ruff.lint.per-file-ignores]
79+
"tests/**" = ["S101"] # Allow assert in tests
80+
7881
[tool.ruff.lint.pydocstyle]
7982
convention = "google" # Accepts: "google", "numpy", or "pep257".
8083

tests/test_auth.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
"""Tests for authentication module."""
22

3+
# ruff: noqa: S105, S106
4+
# S105/S106: Test credentials use dummy values.
5+
36
from __future__ import annotations
47

58
import base64

tests/test_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""Unit tests for the high-level OverkizClient behaviour and responses."""
22

3-
# ruff: noqa: S101, ASYNC230
4-
# S101: Tests use assert statements
3+
# ruff: noqa: ASYNC230, S106
4+
# S106: Test credentials use dummy values.
55
# ASYNC230: Blocking open() is acceptable for reading test fixtures
66

77
from __future__ import annotations

tests/test_enums.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
"""Tests for enum helper behaviour and expected values."""
22

3-
# ruff: noqa: S101
4-
# Tests use assert statements
5-
63
from pyoverkiz.enums import (
74
EventName,
85
ExecutionSubType,

tests/test_models.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
"""Unit tests for models (Device, State and States helpers)."""
22

3-
# ruff: noqa: S101
4-
# Tests use assert statements
5-
63
from __future__ import annotations
74

85
import humps

tests/test_obfuscate.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
"""Tests for the obfuscation utilities used in fixtures and logging."""
22

3-
# ruff: noqa: S101
4-
# Tests use assert statements
5-
63
import pytest
74

85
from pyoverkiz.obfuscate import obfuscate_email, obfuscate_sensitive_data

tests/test_utils.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
"""Tests for utility helper functions like server generation and gateway checks."""
22

3-
# ruff: noqa: S101
4-
# Tests use assert statements
5-
63
import pytest
74

85
from pyoverkiz.utils import create_local_server_config, is_overkiz_gateway

0 commit comments

Comments
 (0)