Skip to content

Commit 4836930

Browse files
Remove previously deprecated StrEnum backport (home-assistant#146477)
1 parent 4a8faad commit 4836930

File tree

3 files changed

+1
-41
lines changed

3 files changed

+1
-41
lines changed

homeassistant/backports/enum.py

Lines changed: 0 additions & 29 deletions
This file was deleted.

pylint/plugins/hass_imports.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,6 @@ class ObsoleteImportMatch:
2525
constant=re.compile(r"^cached_property$"),
2626
),
2727
],
28-
"homeassistant.backports.enum": [
29-
ObsoleteImportMatch(
30-
reason="We can now use the Python 3.11 provided enum.StrEnum instead",
31-
constant=re.compile(r"^StrEnum$"),
32-
),
33-
],
3428
"homeassistant.backports.functools": [
3529
ObsoleteImportMatch(
3630
reason="replaced by propcache.api.cached_property",

tests/test_backports.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,20 @@
22

33
from __future__ import annotations
44

5-
from enum import StrEnum
65
from functools import cached_property # pylint: disable=hass-deprecated-import
76
from types import ModuleType
87
from typing import Any
98

109
import pytest
1110

12-
from homeassistant.backports import (
13-
enum as backports_enum,
14-
functools as backports_functools,
15-
)
11+
from homeassistant.backports import functools as backports_functools
1612

1713
from .common import import_and_test_deprecated_alias
1814

1915

2016
@pytest.mark.parametrize(
2117
("module", "replacement", "breaks_in_ha_version"),
2218
[
23-
(backports_enum, StrEnum, "2025.5"),
2419
(backports_functools, cached_property, "2025.5"),
2520
],
2621
)

0 commit comments

Comments
 (0)