mirror of
https://github.com/home-assistant/core.git
synced 2025-08-09 15:45:08 +02:00
Rephrase comment
This commit is contained in:
@@ -394,8 +394,7 @@ _OBSOLETE_IMPORT: dict[str, list[ObsoleteImportMatch]] = {
|
|||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
|
||||||
# Should be gradually synchronised with pyproject.toml
|
# Black list of imports that should be using the namespace
|
||||||
# [tool.ruff.lint.flake8-import-conventions.extend-aliases]
|
|
||||||
_FORCE_NAMESPACE_IMPORT: dict[tuple[str, str], str] = {
|
_FORCE_NAMESPACE_IMPORT: dict[tuple[str, str], str] = {
|
||||||
("homeassistant.helpers.area_registry", "async_get"): "ar.async_get",
|
("homeassistant.helpers.area_registry", "async_get"): "ar.async_get",
|
||||||
("homeassistant.helpers.device_registry", "async_get"): "dr.async_get",
|
("homeassistant.helpers.device_registry", "async_get"): "dr.async_get",
|
||||||
@@ -457,7 +456,7 @@ class HassImportsFormatChecker(BaseChecker):
|
|||||||
if self.current_package is None:
|
if self.current_package is None:
|
||||||
return
|
return
|
||||||
for module, _alias in node.names:
|
for module, _alias in node.names:
|
||||||
if module.startswith("{self.current_package}."):
|
if module.startswith(f"{self.current_package}."):
|
||||||
self.add_message("hass-relative-import", node=node)
|
self.add_message("hass-relative-import", node=node)
|
||||||
continue
|
continue
|
||||||
if module.startswith("homeassistant.components.") and module.endswith(
|
if module.startswith("homeassistant.components.") and module.endswith(
|
||||||
|
Reference in New Issue
Block a user