Prevent importing PLATFORM_SCHEMA/_BASE from config validation (#120571)

This commit is contained in:
epenet 2024-06-27 06:31:22 +02:00 committed by GitHub
parent a5a631148e
commit 28e72753ad
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -360,6 +360,12 @@ _OBSOLETE_IMPORT: dict[str, list[ObsoleteImportMatch]] = {
constant=re.compile(r"^RESULT_TYPE_(\w*)$"), 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": [ "homeassistant.helpers.device_registry": [
ObsoleteImportMatch( ObsoleteImportMatch(
reason="replaced by DeviceEntryDisabler enum", reason="replaced by DeviceEntryDisabler enum",