mirror of
https://github.com/home-assistant/core.git
synced 2025-11-12 20:40:18 +00:00
Add type ignore error codes [helpers] (#66776)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user