Migrate legacy typehints in core to PEP-526 (#26403)
* Migrate legacy typehints in core to PEP-526 * Fix one type
This commit is contained in:
parent
2dc90be94f
commit
2f0eb07624
45 changed files with 221 additions and 263 deletions
|
@ -2,7 +2,7 @@
|
|||
from collections import OrderedDict
|
||||
import fnmatch
|
||||
import re
|
||||
from typing import Any, Dict, Optional, Pattern # noqa: F401
|
||||
from typing import Any, Dict, Optional, Pattern
|
||||
|
||||
from homeassistant.core import split_entity_id
|
||||
|
||||
|
@ -17,12 +17,12 @@ class EntityValues:
|
|||
glob: Optional[Dict] = None,
|
||||
) -> None:
|
||||
"""Initialize an EntityConfigDict."""
|
||||
self._cache = {} # type: Dict[str, Dict]
|
||||
self._cache: Dict[str, Dict] = {}
|
||||
self._exact = exact
|
||||
self._domain = domain
|
||||
|
||||
if glob is None:
|
||||
compiled = None # type: Optional[Dict[Pattern[str], Any]]
|
||||
compiled: Optional[Dict[Pattern[str], Any]] = None
|
||||
else:
|
||||
compiled = OrderedDict()
|
||||
for key, value in glob.items():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue