Update pylint plugin to use TriggerActionType (#76819)
This commit is contained in:
parent
7ec54edc69
commit
91005f4694
2 changed files with 16 additions and 2 deletions
|
@ -337,8 +337,8 @@ _FUNCTION_MATCH: dict[str, list[TypeHintMatch]] = {
|
|||
arg_types={
|
||||
0: "HomeAssistant",
|
||||
1: "ConfigType",
|
||||
# 2: "AutomationActionType", # AutomationActionType is deprecated -> TriggerActionType
|
||||
# 3: "AutomationTriggerInfo", # AutomationTriggerInfo is deprecated -> TriggerInfo
|
||||
2: "TriggerActionType",
|
||||
3: "TriggerInfo",
|
||||
},
|
||||
return_type="CALLBACK_TYPE",
|
||||
),
|
||||
|
|
|
@ -38,6 +38,20 @@ _OBSOLETE_IMPORT: dict[str, list[ObsoleteImportMatch]] = {
|
|||
constant=re.compile(r"^FORMAT_(\w*)$"),
|
||||
),
|
||||
],
|
||||
"homeassistant.components.automation": [
|
||||
ObsoleteImportMatch(
|
||||
reason="replaced by TriggerActionType from helpers.trigger",
|
||||
constant=re.compile(r"^AutomationActionType$")
|
||||
),
|
||||
ObsoleteImportMatch(
|
||||
reason="replaced by TriggerData from helpers.trigger",
|
||||
constant=re.compile(r"^AutomationTriggerData$")
|
||||
),
|
||||
ObsoleteImportMatch(
|
||||
reason="replaced by TriggerInfo from helpers.trigger",
|
||||
constant=re.compile(r"^AutomationTriggerInfo$")
|
||||
),
|
||||
],
|
||||
"homeassistant.components.binary_sensor": [
|
||||
ObsoleteImportMatch(
|
||||
reason="replaced by BinarySensorDeviceClass enum",
|
||||
|
|
Loading…
Add table
Reference in a new issue