mirror of
https://github.com/home-assistant/core.git
synced 2025-12-25 05:26:47 +00:00
Migrate issue registry to use singleton helper (#117848)
* Migrate issue registry to use singleton helper The other registries were already migrated, but since this one had a read only flag, it required a slightly different solution since it uses the same hass.data key * refactor
This commit is contained in:
@@ -264,6 +264,13 @@ class Store[_T: Mapping[str, Any] | Sequence[Any]]:
|
||||
"""Return the config path."""
|
||||
return self.hass.config.path(STORAGE_DIR, self.key)
|
||||
|
||||
def make_read_only(self) -> None:
|
||||
"""Make the store read-only.
|
||||
|
||||
This method is irreversible.
|
||||
"""
|
||||
self._read_only = True
|
||||
|
||||
async def async_load(self) -> _T | None:
|
||||
"""Load data.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user