Add type hints to here_travel_time (#69216)

* Add type hints to here_travel_time

* Adjust
pull/69219/head
epenet 2022-04-03 22:14:11 +02:00 committed by GitHub
parent 39abf1453c
commit db10c313b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 3 additions and 6 deletions

View File

@ -31,5 +31,5 @@ class HERETravelTimeConfig:
travel_mode: str
route_mode: str
units: str
arrival: time
departure: time
arrival: time | None
departure: time | None

View File

@ -285,6 +285,7 @@ class HERETravelTimeSensor(SensorEntity, CoordinatorEntity):
"""Return the attribution."""
if self.coordinator.data is not None:
return self.coordinator.data.get(ATTR_ATTRIBUTION)
return None
@property
def icon(self) -> str:

View File

@ -2689,9 +2689,6 @@ ignore_errors = true
[mypy-homeassistant.components.hassio.websocket_api]
ignore_errors = true
[mypy-homeassistant.components.here_travel_time.sensor]
ignore_errors = true
[mypy-homeassistant.components.home_plus_control]
ignore_errors = true

View File

@ -57,7 +57,6 @@ IGNORED_MODULES: Final[list[str]] = [
"homeassistant.components.hassio.sensor",
"homeassistant.components.hassio.system_health",
"homeassistant.components.hassio.websocket_api",
"homeassistant.components.here_travel_time.sensor",
"homeassistant.components.home_plus_control",
"homeassistant.components.home_plus_control.api",
"homeassistant.components.icloud",