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:
Franck Nijhof
2019-09-04 05:36:04 +02:00
committed by Paulus Schoutsen
parent 2dc90be94f
commit 2f0eb07624
45 changed files with 221 additions and 263 deletions

View File

@@ -91,7 +91,7 @@ class Entity:
entity_id = None # type: str
# Owning hass instance. Will be set by EntityPlatform
hass = None # type: Optional[HomeAssistant]
hass: Optional[HomeAssistant] = None
# Owning platform instance. Will be set by EntityPlatform
platform = None
@@ -109,10 +109,10 @@ class Entity:
parallel_updates = None
# Entry in the entity registry
registry_entry = None # type: Optional[RegistryEntry]
registry_entry: Optional[RegistryEntry] = None
# Hold list for functions to call on remove.
_on_remove = None # type: Optional[List[CALLBACK_TYPE]]
_on_remove: Optional[List[CALLBACK_TYPE]] = None
# Context
_context = None