Add type ignore error codes [helpers] (#66776)
This commit is contained in:
parent
0188e8b319
commit
bfb1abd3a2
12 changed files with 25 additions and 23 deletions
|
@ -255,12 +255,12 @@ class Entity(ABC):
|
|||
# SAFE TO OVERWRITE
|
||||
# The properties and methods here are safe to overwrite when inheriting
|
||||
# this class. These may be used to customize the behavior of the entity.
|
||||
entity_id: str = None # type: ignore
|
||||
entity_id: str = None # type: ignore[assignment]
|
||||
|
||||
# Owning hass instance. Will be set by EntityPlatform
|
||||
# While not purely typed, it makes typehinting more useful for us
|
||||
# and removes the need for constant None checks or asserts.
|
||||
hass: HomeAssistant = None # type: ignore
|
||||
hass: HomeAssistant = None # type: ignore[assignment]
|
||||
|
||||
# Owning platform instance. Will be set by EntityPlatform
|
||||
platform: EntityPlatform | None = None
|
||||
|
@ -770,7 +770,7 @@ class Entity(ABC):
|
|||
@callback
|
||||
def add_to_platform_abort(self) -> None:
|
||||
"""Abort adding an entity to a platform."""
|
||||
self.hass = None # type: ignore
|
||||
self.hass = None # type: ignore[assignment]
|
||||
self.platform = None
|
||||
self.parallel_updates = None
|
||||
self._added = False
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue