Type hint improvements (#32905)

* Complete helpers.entity_component type hints

* Add discovery info type
This commit is contained in:
Ville Skyttä authored and GitHub committed 2020-03-18 19:27:25 +02:00
1 parent 7c79adad8f
commit 05abf37046
13 files changed
+120 -76

No files matched your search

+6 -2
View File
@@ -19,7 +19,11 @@ from homeassistant.const import (
)
import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.entity import Entity
from homeassistant.helpers.typing import ConfigType, HomeAssistantType
from homeassistant.helpers.typing import (
ConfigType,
DiscoveryInfoType,
HomeAssistantType,
)
from homeassistant.util import slugify
import homeassistant.util.dt as dt_util
@@ -332,7 +336,7 @@ def setup_platform(
hass: HomeAssistantType,
config: ConfigType,
add_entities: Callable[[list], None],
discovery_info: Optional[dict] = None,
discovery_info: Optional[DiscoveryInfoType] = None,
) -> None:
"""Set up the GTFS sensor."""
gtfs_dir = hass.config.path(DEFAULT_PATH)