mirror of
https://github.com/home-assistant/core.git
synced 2025-07-18 02:37:08 +00:00
Remvove deprecated core constants (#131803)
This commit is contained in:
parent
28ec8272ee
commit
be81fd86d3
@ -84,7 +84,6 @@ from .exceptions import (
|
|||||||
)
|
)
|
||||||
from .helpers.deprecation import (
|
from .helpers.deprecation import (
|
||||||
DeferredDeprecatedAlias,
|
DeferredDeprecatedAlias,
|
||||||
DeprecatedConstantEnum,
|
|
||||||
EnumWithDeprecatedMembers,
|
EnumWithDeprecatedMembers,
|
||||||
all_with_deprecated_constants,
|
all_with_deprecated_constants,
|
||||||
check_if_deprecated_constant,
|
check_if_deprecated_constant,
|
||||||
@ -177,14 +176,6 @@ class EventStateReportedData(EventStateEventData):
|
|||||||
old_last_reported: datetime.datetime
|
old_last_reported: datetime.datetime
|
||||||
|
|
||||||
|
|
||||||
# SOURCE_* are deprecated as of Home Assistant 2022.2, use ConfigSource instead
|
|
||||||
_DEPRECATED_SOURCE_DISCOVERED = DeprecatedConstantEnum(
|
|
||||||
ConfigSource.DISCOVERED, "2025.1"
|
|
||||||
)
|
|
||||||
_DEPRECATED_SOURCE_STORAGE = DeprecatedConstantEnum(ConfigSource.STORAGE, "2025.1")
|
|
||||||
_DEPRECATED_SOURCE_YAML = DeprecatedConstantEnum(ConfigSource.YAML, "2025.1")
|
|
||||||
|
|
||||||
|
|
||||||
def _deprecated_core_config() -> Any:
|
def _deprecated_core_config() -> Any:
|
||||||
# pylint: disable-next=import-outside-toplevel
|
# pylint: disable-next=import-outside-toplevel
|
||||||
from . import core_config
|
from . import core_config
|
||||||
|
@ -68,7 +68,6 @@ from .common import (
|
|||||||
async_mock_service,
|
async_mock_service,
|
||||||
help_test_all,
|
help_test_all,
|
||||||
import_and_test_deprecated_alias,
|
import_and_test_deprecated_alias,
|
||||||
import_and_test_deprecated_constant_enum,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
PST = dt_util.get_time_zone("America/Los_Angeles")
|
PST = dt_util.get_time_zone("America/Los_Angeles")
|
||||||
@ -2980,22 +2979,6 @@ def test_all() -> None:
|
|||||||
help_test_all(ha)
|
help_test_all(ha)
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize(
|
|
||||||
("enum"),
|
|
||||||
[
|
|
||||||
ha.ConfigSource.DISCOVERED,
|
|
||||||
ha.ConfigSource.YAML,
|
|
||||||
ha.ConfigSource.STORAGE,
|
|
||||||
],
|
|
||||||
)
|
|
||||||
def test_deprecated_constants(
|
|
||||||
caplog: pytest.LogCaptureFixture,
|
|
||||||
enum: ha.ConfigSource,
|
|
||||||
) -> None:
|
|
||||||
"""Test deprecated constants."""
|
|
||||||
import_and_test_deprecated_constant_enum(caplog, ha, enum, "SOURCE_", "2025.1")
|
|
||||||
|
|
||||||
|
|
||||||
def test_deprecated_config(caplog: pytest.LogCaptureFixture) -> None:
|
def test_deprecated_config(caplog: pytest.LogCaptureFixture) -> None:
|
||||||
"""Test deprecated Config class."""
|
"""Test deprecated Config class."""
|
||||||
import_and_test_deprecated_alias(caplog, ha, "Config", Config, "2025.11")
|
import_and_test_deprecated_alias(caplog, ha, "Config", Config, "2025.11")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user