Add common entity module to pylint plugin (#138706)
* Add common entity module to pylint plugin * Fix pylint errors
This commit is contained in:
parent
d8d054e7dd
commit
7e388f69b0
|
@ -106,7 +106,7 @@ class ISYNodeEntity(ISYEntity):
|
||||||
return getattr(self._node, TAG_ENABLED, True)
|
return getattr(self._node, TAG_ENABLED, True)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def extra_state_attributes(self) -> dict:
|
def extra_state_attributes(self) -> dict[str, Any]:
|
||||||
"""Get the state attributes for the device.
|
"""Get the state attributes for the device.
|
||||||
|
|
||||||
The 'aux_properties' in the pyisy Node class are combined with the
|
The 'aux_properties' in the pyisy Node class are combined with the
|
||||||
|
@ -189,7 +189,7 @@ class ISYProgramEntity(ISYEntity):
|
||||||
self._actions = actions
|
self._actions = actions
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def extra_state_attributes(self) -> dict:
|
def extra_state_attributes(self) -> dict[str, Any]:
|
||||||
"""Get the state attributes for the device."""
|
"""Get the state attributes for the device."""
|
||||||
attr = {}
|
attr = {}
|
||||||
if self._actions:
|
if self._actions:
|
||||||
|
|
|
@ -61,7 +61,7 @@ class SwitchbotEntity(
|
||||||
return self.coordinator.device.parsed_data
|
return self.coordinator.device.parsed_data
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def extra_state_attributes(self) -> Mapping[Any, Any]:
|
def extra_state_attributes(self) -> Mapping[str, Any]:
|
||||||
"""Return the state attributes."""
|
"""Return the state attributes."""
|
||||||
return {"last_run_success": self._last_run_success}
|
return {"last_run_success": self._last_run_success}
|
||||||
|
|
||||||
|
|
|
@ -1410,6 +1410,16 @@ _INHERITANCE_MATCH: dict[str, list[ClassTypeHintMatch]] = {
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
"entity": [
|
||||||
|
ClassTypeHintMatch(
|
||||||
|
base_class="Entity",
|
||||||
|
matches=_ENTITY_MATCH,
|
||||||
|
),
|
||||||
|
ClassTypeHintMatch(
|
||||||
|
base_class="RestoreEntity",
|
||||||
|
matches=_RESTORE_ENTITY_MATCH,
|
||||||
|
),
|
||||||
|
],
|
||||||
"fan": [
|
"fan": [
|
||||||
ClassTypeHintMatch(
|
ClassTypeHintMatch(
|
||||||
base_class="Entity",
|
base_class="Entity",
|
||||||
|
|
Loading…
Reference in New Issue