Improvement typing (#2735)
* Fix: Circular dependencies of internal files * Change: dt.date for Date and dt.datetime for DateTime * Use NewType if available * FIX: Wrong version test * Remove: Date and DateTime types due to error * Change to HomeAssistantType * General Improvement of Typing * Improve typing config_validation * Improve typing script * General Typing Improvements * Improve NewType check * Improve typing db_migrator * Improve util/__init__ typing * Improve helpers/location typing * Regroup imports and remove pylint: disable=ungrouped-imports * General typing improvements
This commit is contained in:
parent
a3ca3e878b
commit
0377338a81
16 changed files with 139 additions and 66 deletions
|
@ -2,15 +2,20 @@
|
|||
import functools
|
||||
import logging
|
||||
|
||||
# pylint: disable=unused-import
|
||||
from typing import Optional # NOQA
|
||||
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.helpers.typing import HomeAssistantType # NOQA
|
||||
|
||||
from homeassistant.const import ATTR_ENTITY_ID
|
||||
from homeassistant.exceptions import TemplateError
|
||||
from homeassistant.helpers import template
|
||||
from homeassistant.loader import get_component
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
|
||||
HASS = None
|
||||
HASS = None # type: Optional[HomeAssistantType]
|
||||
|
||||
CONF_SERVICE = 'service'
|
||||
CONF_SERVICE_TEMPLATE = 'service_template'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue