mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 21:06:19 +00:00
Update pylint plugin to validate _async_has_devices (#66512)
This commit is contained in:
@@ -44,6 +44,8 @@ _MODULE_FILTERS: dict[str, re.Pattern] = {
|
||||
"device_tracker": re.compile(r"^homeassistant\.components\.\w+\.(device_tracker)$"),
|
||||
# diagnostics matches only in the package root (diagnostics.py)
|
||||
"diagnostics": re.compile(r"^homeassistant\.components\.\w+\.(diagnostics)$"),
|
||||
# config_flow matches only in the package root (config_flow.py)
|
||||
"config_flow": re.compile(r"^homeassistant\.components\.\w+\.(config_flow)$")
|
||||
}
|
||||
|
||||
_METHOD_MATCH: list[TypeHintMatch] = [
|
||||
@@ -192,6 +194,14 @@ _METHOD_MATCH: list[TypeHintMatch] = [
|
||||
},
|
||||
return_type=UNDEFINED,
|
||||
),
|
||||
TypeHintMatch(
|
||||
module_filter=_MODULE_FILTERS["config_flow"],
|
||||
function_name="_async_has_devices",
|
||||
arg_types={
|
||||
0: "HomeAssistant",
|
||||
},
|
||||
return_type="bool",
|
||||
),
|
||||
]
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user