Improve entity type hints [n] (#77824)

This commit is contained in:
epenet 2022-09-05 14:53:55 +02:00 committed by GitHub
parent 42393db9f3
commit 420733a064
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 69 additions and 59 deletions

View file

@ -158,7 +158,7 @@ class NMBSLiveBoard(SensorEntity):
return attrs
def update(self):
def update(self) -> None:
"""Set the state equal to the next departure."""
liveboard = self._api_client.get_liveboard(self._station)
@ -278,7 +278,7 @@ class NMBSSensor(SensorEntity):
return "vias" in self._attrs and int(self._attrs["vias"]["number"]) > 0
def update(self):
def update(self) -> None:
"""Set the state to the duration of a connection."""
connections = self._api_client.get_connections(
self._station_from, self._station_to