mirror of
https://github.com/home-assistant/core.git
synced 2025-11-08 18:39:30 +00:00
Add and fix type hints (#36501)
* Fix exceptions.Unauthorized.permission type * Use auth.permission consts more * Auth typing improvements * Helpers typing improvements * Calculate self.state only once
This commit is contained in:
@@ -79,6 +79,7 @@ from homeassistant.util.unit_system import IMPERIAL_SYSTEM, METRIC_SYSTEM, UnitS
|
||||
|
||||
# Typing imports that create a circular dependency
|
||||
if TYPE_CHECKING:
|
||||
from homeassistant.auth import AuthManager
|
||||
from homeassistant.config_entries import ConfigEntries
|
||||
from homeassistant.components.http import HomeAssistantHTTP
|
||||
|
||||
@@ -174,6 +175,7 @@ class CoreState(enum.Enum):
|
||||
class HomeAssistant:
|
||||
"""Root object of the Home Assistant home automation."""
|
||||
|
||||
auth: "AuthManager"
|
||||
http: "HomeAssistantHTTP" = None # type: ignore
|
||||
config_entries: "ConfigEntries" = None # type: ignore
|
||||
|
||||
|
||||
Reference in New Issue
Block a user