From 28e72753ad251ddf8bab549179625a15a26fa8f5 Mon Sep 17 00:00:00 2001
From: epenet <6771947+epenet@users.noreply.github.com>
Date: Thu, 27 Jun 2024 06:31:22 +0200
Subject: [PATCH] Prevent importing PLATFORM_SCHEMA/_BASE from config
 validation (#120571)

---
 pylint/plugins/hass_imports.py | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/pylint/plugins/hass_imports.py b/pylint/plugins/hass_imports.py
index b4d30be483d..3ec8b6c3cd9 100644
--- a/pylint/plugins/hass_imports.py
+++ b/pylint/plugins/hass_imports.py
@@ -360,6 +360,12 @@ _OBSOLETE_IMPORT: dict[str, list[ObsoleteImportMatch]] = {
             constant=re.compile(r"^RESULT_TYPE_(\w*)$"),
         ),
     ],
+    "homeassistant.helpers.config_validation": [
+        ObsoleteImportMatch(
+            reason="should be imported from homeassistant/components/<platform>",
+            constant=re.compile(r"^PLATFORM_SCHEMA(_BASE)?$"),
+        ),
+    ],
     "homeassistant.helpers.device_registry": [
         ObsoleteImportMatch(
             reason="replaced by DeviceEntryDisabler enum",
-- 
GitLab