Type hint improvements (#32905)

* Complete helpers.entity_component type hints

* Add discovery info type
This commit is contained in:
Ville Skyttä 2020-03-18 19:27:25 +02:00 committed by GitHub
parent 7c79adad8f
commit 05abf37046
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 120 additions and 76 deletions

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)