mirror of
https://github.com/home-assistant/core.git
synced 2025-08-03 20:55:10 +02:00
Add pylint rule for cached_property (#127482)
This commit is contained in:
@@ -19,6 +19,12 @@ class ObsoleteImportMatch:
|
||||
|
||||
|
||||
_OBSOLETE_IMPORT: dict[str, list[ObsoleteImportMatch]] = {
|
||||
"functools": [
|
||||
ObsoleteImportMatch(
|
||||
reason="replaced by propcache.cached_property",
|
||||
constant=re.compile(r"^cached_property$"),
|
||||
),
|
||||
],
|
||||
"homeassistant.backports.enum": [
|
||||
ObsoleteImportMatch(
|
||||
reason="We can now use the Python 3.11 provided enum.StrEnum instead",
|
||||
@@ -27,10 +33,7 @@ _OBSOLETE_IMPORT: dict[str, list[ObsoleteImportMatch]] = {
|
||||
],
|
||||
"homeassistant.backports.functools": [
|
||||
ObsoleteImportMatch(
|
||||
reason=(
|
||||
"We can now use the Python 3.12 provided "
|
||||
"functools.cached_property instead"
|
||||
),
|
||||
reason="replaced by propcache.cached_property",
|
||||
constant=re.compile(r"^cached_property$"),
|
||||
),
|
||||
],
|
||||
|
Reference in New Issue
Block a user