Enable inheritance checks on ExtraStoredData (#90021)

This commit is contained in:
epenet authored and GitHub committed 2023-03-21 09:51:05 +01:00
1 parent 43ce6f843c
commit 292feb4e24
2 files changed
+2 -1

No files matched your search

+1 -1
View File
@@ -132,7 +132,7 @@ class ZWaveNodeFirmwareUpdate(UpdateEntity):
self._attr_device_info = get_device_info(driver, node)
@property
def extra_restore_state_data(self) -> ExtraStoredData:
def extra_restore_state_data(self) -> ZWaveNodeFirmwareUpdateExtraStoredData:
"""Return ZWave Node Firmware Update specific state data to be restored."""
return ZWaveNodeFirmwareUpdateExtraStoredData(self._latest_version_firmware)
@@ -680,6 +680,7 @@ _RESTORE_ENTITY_MATCH: list[TypeHintMatch] = [
TypeHintMatch(
function_name="extra_restore_state_data",
return_type=["ExtraStoredData", None],
check_return_type_inheritance=True,
),
]
_TOGGLE_ENTITY_MATCH: list[TypeHintMatch] = [