1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 21:06:19 +00:00

Inverse json import logic (#88099)

* Fix helpers and util

* Adjust components

* Move back errors

* Add report

* mypy

* mypy

* Assert deprecation messages

* Move test_json_loads_object

* Adjust tests

* Fix rebase

* Adjust pylint plugin

* Fix plugin

* Adjust references

* Adjust backup tests
This commit is contained in:
epenet
2023-02-16 11:37:57 +01:00
committed by GitHub
parent 580869a9a6
commit ba23816a0c
44 changed files with 291 additions and 197 deletions

View File

@@ -350,6 +350,14 @@ _OBSOLETE_IMPORT: dict[str, list[ObsoleteImportMatch]] = {
constant=re.compile(r"^DISABLED_(\w*)$"),
),
],
"homeassistant.helpers.json": [
ObsoleteImportMatch(
reason="moved to homeassistant.util.json",
constant=re.compile(
r"^JSON_DECODE_EXCEPTIONS|JSON_ENCODE_EXCEPTIONS|json_loads$"
),
),
],
"homeassistant.util": [
ObsoleteImportMatch(
reason="replaced by unit_conversion.***Converter",
@@ -362,6 +370,12 @@ _OBSOLETE_IMPORT: dict[str, list[ObsoleteImportMatch]] = {
constant=re.compile(r"^IMPERIAL_SYSTEM$"),
),
],
"homeassistant.util.json": [
ObsoleteImportMatch(
reason="moved to homeassistant.helpers.json",
constant=re.compile(r"^save_json|find_paths_unserializable_data$"),
),
],
}