Enable inheritance checks on ExtraStoredData (#90021)

This commit is contained in:
epenet 2023-03-21 09:51:05 +01:00 committed by GitHub
parent 43ce6f843c
commit 292feb4e24
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

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)

View File

@ -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] = [