mirror of
https://github.com/home-assistant/core.git
synced 2025-07-29 18:28:14 +02:00
Device tracker component & platform validation. No more home_range. (#2908)
* Device tracker component & platform validation. No more home_range. * Mock, bluetooth * Renamed _CONFIG_SCHEMA. Raise warning for #1606 * test duplicates * Fix assert * Coverage * Typing * T fixes
This commit is contained in:
committed by
Teagan Glenn
parent
16e0187fcc
commit
55d305359e
@ -1,24 +1,13 @@
|
||||
"""Typing Helpers for Home-Assistant."""
|
||||
from typing import Dict, Any
|
||||
from typing import Dict, Any, Tuple
|
||||
|
||||
# NOTE: NewType added to typing in 3.5.2 in June, 2016; Since 3.5.2 includes
|
||||
# security fixes everyone on 3.5 should upgrade "soon"
|
||||
try:
|
||||
from typing import NewType
|
||||
except ImportError:
|
||||
NewType = None
|
||||
import homeassistant.core
|
||||
|
||||
# pylint: disable=invalid-name
|
||||
if NewType:
|
||||
ConfigType = NewType('ConfigType', Dict[str, Any])
|
||||
|
||||
# Custom type for recorder Queries
|
||||
QueryType = NewType('QueryType', Any)
|
||||
GPSType = Tuple[float, float]
|
||||
ConfigType = Dict[str, Any]
|
||||
HomeAssistantType = homeassistant.core.HomeAssistant
|
||||
|
||||
# Duplicates for 3.5.1
|
||||
# pylint: disable=invalid-name
|
||||
else:
|
||||
ConfigType = Dict[str, Any] # type: ignore
|
||||
|
||||
# Custom type for recorder Queries
|
||||
QueryType = Any # type: ignore
|
||||
# Custom type for recorder Queries
|
||||
QueryType = Any
|
||||
|
Reference in New Issue
Block a user