Skip to content

Commit 4650dbd

Browse files
committed
Enable ruff ERA rule and fix commented-out code
- Add TAHOMA_BOX_C_IO enum entry with value 17 (was commented out with conflicting value 12, which is already used by another entry) - Remove unreachable test case (204 is treated as success by the response handler, so the error fixture can never trigger) - Reword format comment to avoid false positive detection
1 parent 764581f commit 4650dbd

File tree

4 files changed

+4
-7
lines changed

4 files changed

+4
-7
lines changed

pyoverkiz/enums/gateway.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ class GatewaySubType(UnknownEnumMixin, IntEnum):
9494
TAHOMA_PRO = 14
9595
TAHOMA_SECURITY_SHORT_CHANNEL = 15
9696
TAHOMA_SECURITY_PRO = 16
97-
# TAHOMA_BOX_C_IO = 12 # Note: This is likely 17, but tahomalink.com lists it as 12
97+
TAHOMA_BOX_C_IO = 17
9898

9999
@property
100100
def beautify_name(self) -> str:

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,8 @@ select = [
114114
"RET",
115115
# flake8-pie
116116
"PIE",
117+
# eradicate
118+
"ERA",
117119
]
118120
ignore = [
119121
"E501", # Line too long

tests/test_client.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -469,11 +469,6 @@ async def test_get_diagnostic_data_without_masking(self, client: OverkizClient):
469469
exceptions.ResourceAccessDeniedError,
470470
400,
471471
),
472-
# (
473-
# "local/204-no-corresponding-execId.json",
474-
# exceptions.OverkizError,
475-
# 204,
476-
# ),
477472
(
478473
"local/400-bad-parameters.json",
479474
exceptions.OverkizError,

utils/generate_enums.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
from pyoverkiz.models import UIProfileDefinition, ValuePrototype
2222

2323
# Hardcoded protocols that may not be available on all servers
24-
# Format: (name, prefix, id, label)
24+
# Each tuple contains: name, prefix, id, label
2525
ADDITIONAL_PROTOCOLS: list[tuple[str, str, int | None, str | None]] = [
2626
("HLRR_WIFI", "hlrrwifi", None, None),
2727
("MODBUSLINK", "modbuslink", 44, "ModbusLink"), # via Atlantic Cozytouch

0 commit comments

Comments
 (0)