Enable strict typing for iZone (#195308)

This commit is contained in:
Penny Wood
2026-11-29 16:30:07 +01:00
committed by GitHub
parent 90e4ac35e6
commit caed1d35c8
5 changed files with 18 additions and 6 deletions
+1
View File
@@ -358,6 +358,7 @@ homeassistant.components.isal.*
homeassistant.components.iseo_argo_ble.*
homeassistant.components.islamic_prayer_times.*
homeassistant.components.isy994.*
homeassistant.components.izone.*
homeassistant.components.jellyfin.*
homeassistant.components.jewish_calendar.*
homeassistant.components.jvc_projector.*
+3 -3
View File
@@ -502,12 +502,12 @@ class ZoneDevice(IZoneCoordinatorEntity, ClimateEntity):
return self.controller.temp_max
@property
def airflow_min(self):
def airflow_min(self) -> int:
"""Return the minimum air flow."""
return self._zone.airflow_min
@property
def airflow_max(self):
def airflow_max(self) -> int:
"""Return the maximum air flow."""
return self._zone.airflow_max
@@ -548,7 +548,7 @@ class ZoneDevice(IZoneCoordinatorEntity, ClimateEntity):
await self._async_run_and_update(self._zone.set_mode(Zone.Mode.CLOSE))
@property
def zone_index(self):
def zone_index(self) -> int:
"""Return the zone index for matching to CtrlZone."""
return self._zone.index
@@ -59,7 +59,7 @@ async def async_get_config_entry_diagnostics(
else:
discovery = {"running": False}
return _redact_data(
redacted: dict[str, Any] = _redact_data(
{
"entry": {
**dict(entry.data),
@@ -69,3 +69,4 @@ async def async_get_config_entry_diagnostics(
"controller": controller.dump_state(),
}
)
return redacted
@@ -69,6 +69,6 @@ rules:
stale-devices: done
# Platinum
async-dependency: todo
async-dependency: done
inject-websession: done
strict-typing: todo
strict-typing: done
Generated
+10
View File
@@ -3327,6 +3327,16 @@ disallow_untyped_defs = true
warn_return_any = true
warn_unreachable = true
[mypy-homeassistant.components.izone.*]
check_untyped_defs = true
disallow_incomplete_defs = true
disallow_subclassing_any = true
disallow_untyped_calls = true
disallow_untyped_decorators = true
disallow_untyped_defs = true
warn_return_any = true
warn_unreachable = true
[mypy-homeassistant.components.jellyfin.*]
check_untyped_defs = true
disallow_incomplete_defs = true