From 93630cf1f84ea37a58e98c44a9ce377bd194f669 Mon Sep 17 00:00:00 2001 From: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Date: Tue, 16 Aug 2022 11:17:10 +0200 Subject: [PATCH] Add missing entry for `SOURCE_TYPE_*` to hass-imports plugin (#76829) --- pylint/plugins/hass_imports.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pylint/plugins/hass_imports.py b/pylint/plugins/hass_imports.py index caea0451f4d..c7abe0ad6ac 100644 --- a/pylint/plugins/hass_imports.py +++ b/pylint/plugins/hass_imports.py @@ -108,6 +108,18 @@ _OBSOLETE_IMPORT: dict[str, list[ObsoleteImportMatch]] = { constant=re.compile(r"^SUPPORT_(\w*)$"), ), ], + "homeassistant.components.device_tracker": [ + ObsoleteImportMatch( + reason="replaced by SourceType enum", + constant=re.compile(r"^SOURCE_TYPE_\w+$") + ), + ], + "homeassistant.components.device_tracker.const": [ + ObsoleteImportMatch( + reason="replaced by SourceType enum", + constant=re.compile(r"^SOURCE_TYPE_\w+$") + ), + ], "homeassistant.components.fan": [ ObsoleteImportMatch( reason="replaced by FanEntityFeature enum",