Adjust pylint plugin for climate HVACMode (#71727)

Co-authored-by: J. Nick Koston <nick@koston.org>
This commit is contained in:
epenet 2022-05-23 15:59:15 +02:00 committed by GitHub
parent 30bf727dfe
commit 571c90b8cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -62,6 +62,10 @@ _OBSOLETE_IMPORT: dict[str, list[ObsoleteImportMatch]] = {
), ),
], ],
"homeassistant.components.climate": [ "homeassistant.components.climate": [
ObsoleteImportMatch(
reason="replaced by HVACMode enum",
constant=re.compile(r"^HVAC_MODE_(\w*)$"),
),
ObsoleteImportMatch( ObsoleteImportMatch(
reason="replaced by ClimateEntityFeature enum", reason="replaced by ClimateEntityFeature enum",
constant=re.compile(r"^SUPPORT_(\w*)$"), constant=re.compile(r"^SUPPORT_(\w*)$"),
@ -72,6 +76,10 @@ _OBSOLETE_IMPORT: dict[str, list[ObsoleteImportMatch]] = {
reason="replaced by HVACAction enum", reason="replaced by HVACAction enum",
constant=re.compile(r"^CURRENT_HVAC_(\w*)$"), constant=re.compile(r"^CURRENT_HVAC_(\w*)$"),
), ),
ObsoleteImportMatch(
reason="replaced by HVACMode enum",
constant=re.compile(r"^HVAC_MODE_(\w*)$"),
),
ObsoleteImportMatch( ObsoleteImportMatch(
reason="replaced by ClimateEntityFeature enum", reason="replaced by ClimateEntityFeature enum",
constant=re.compile(r"^SUPPORT_(\w*)$"), constant=re.compile(r"^SUPPORT_(\w*)$"),