mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 03:07:37 +00:00
Add RestoreNumber to number checks in pylint (#76933)
This commit is contained in:
parent
673a72503d
commit
35d01d7939
@ -577,6 +577,20 @@ _ENTITY_MATCH: list[TypeHintMatch] = [
|
|||||||
has_async_counterpart=True,
|
has_async_counterpart=True,
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
|
_RESTORE_ENTITY_MATCH: list[TypeHintMatch] = [
|
||||||
|
TypeHintMatch(
|
||||||
|
function_name="async_get_last_state",
|
||||||
|
return_type=["State", None],
|
||||||
|
),
|
||||||
|
TypeHintMatch(
|
||||||
|
function_name="async_get_last_extra_data",
|
||||||
|
return_type=["ExtraStoredData", None],
|
||||||
|
),
|
||||||
|
TypeHintMatch(
|
||||||
|
function_name="extra_restore_state_data",
|
||||||
|
return_type=["ExtraStoredData", None],
|
||||||
|
),
|
||||||
|
]
|
||||||
_TOGGLE_ENTITY_MATCH: list[TypeHintMatch] = [
|
_TOGGLE_ENTITY_MATCH: list[TypeHintMatch] = [
|
||||||
TypeHintMatch(
|
TypeHintMatch(
|
||||||
function_name="is_on",
|
function_name="is_on",
|
||||||
@ -1786,6 +1800,10 @@ _INHERITANCE_MATCH: dict[str, list[ClassTypeHintMatch]] = {
|
|||||||
base_class="Entity",
|
base_class="Entity",
|
||||||
matches=_ENTITY_MATCH,
|
matches=_ENTITY_MATCH,
|
||||||
),
|
),
|
||||||
|
ClassTypeHintMatch(
|
||||||
|
base_class="RestoreEntity",
|
||||||
|
matches=_RESTORE_ENTITY_MATCH,
|
||||||
|
),
|
||||||
ClassTypeHintMatch(
|
ClassTypeHintMatch(
|
||||||
base_class="NumberEntity",
|
base_class="NumberEntity",
|
||||||
matches=[
|
matches=[
|
||||||
@ -1829,6 +1847,19 @@ _INHERITANCE_MATCH: dict[str, list[ClassTypeHintMatch]] = {
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
ClassTypeHintMatch(
|
||||||
|
base_class="RestoreNumber",
|
||||||
|
matches=[
|
||||||
|
TypeHintMatch(
|
||||||
|
function_name="extra_restore_state_data",
|
||||||
|
return_type="NumberExtraStoredData",
|
||||||
|
),
|
||||||
|
TypeHintMatch(
|
||||||
|
function_name="async_get_last_number_data",
|
||||||
|
return_type=["NumberExtraStoredData", None],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
],
|
],
|
||||||
"remote": [
|
"remote": [
|
||||||
ClassTypeHintMatch(
|
ClassTypeHintMatch(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user