Add type ignore error codes [helpers] (#66776)

This commit is contained in:
Marc Mueller 2022-02-18 11:31:37 +01:00 committed by GitHub
parent 0188e8b319
commit bfb1abd3a2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 25 additions and 23 deletions

View file

@ -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