Update Union typing (4) [Py310] (#86427)

This commit is contained in:
Marc Mueller 2023-01-23 09:04:40 +01:00 committed by GitHub
parent b0ed0d5d41
commit 8abce25948
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 39 additions and 37 deletions

View file

@ -2,7 +2,7 @@
from __future__ import annotations
from dataclasses import asdict, dataclass
from typing import Final, Union, cast
from typing import Final, cast
from homeassistant.components.stream import Orientation
from homeassistant.core import HomeAssistant
@ -33,7 +33,7 @@ class CameraPreferences:
self._hass = hass
# The orientation prefs are stored in in the entity registry options
# The preload_stream prefs are stored in this Store
self._store = Store[dict[str, dict[str, Union[bool, Orientation]]]](
self._store = Store[dict[str, dict[str, bool | Orientation]]](
hass, STORAGE_VERSION, STORAGE_KEY
)
self._dynamic_stream_settings_by_entity_id: dict[