Add type hints to here_travel_time (#69216)
* Add type hints to here_travel_time * Adjustpull/69219/head
parent
39abf1453c
commit
db10c313b5
|
@ -31,5 +31,5 @@ class HERETravelTimeConfig:
|
|||
travel_mode: str
|
||||
route_mode: str
|
||||
units: str
|
||||
arrival: time
|
||||
departure: time
|
||||
arrival: time | None
|
||||
departure: time | None
|
||||
|
|
|
@ -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:
|
||||
|
|
3
mypy.ini
3
mypy.ini
|
@ -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
|
||||
|
||||
|
|
|
@ -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",
|
||||
|
|
Loading…
Reference in New Issue