Fix incorrect reference to json WriteError (#88161)

This commit is contained in:
epenet
2023-02-15 10:40:26 +01:00
committed by GitHub
parent 6c430e03bc
commit a1b7842df2
2 changed files with 7 additions and 6 deletions

View File

@@ -16,7 +16,11 @@ from homeassistant.helpers.json import (
json_encoder_default as default_hass_orjson_encoder,
)
from .file import write_utf8_file, write_utf8_file_atomic
from .file import ( # pylint: disable=unused-import # noqa: F401
WriteError,
write_utf8_file,
write_utf8_file_atomic,
)
_LOGGER = logging.getLogger(__name__)
@@ -25,10 +29,6 @@ class SerializationError(HomeAssistantError):
"""Error serializing the data to JSON."""
class WriteError(HomeAssistantError):
"""Error writing the data."""
def load_json(filename: str, default: list | dict | None = None) -> list | dict:
"""Load JSON data from a file and return as dict or list.