Use PEP 526 type annotations, add some type hints (#26464)
* Add some more type hints to helpers.event * Change most type comments to variable types * Remove some superfluous type hints
This commit is contained in:
parent
5b3004c7b0
commit
33e1b44b3a
35 changed files with 152 additions and 174 deletions
|
@ -256,7 +256,7 @@ def get_next_departure(
|
|||
|
||||
_LOGGER.debug("Timetable: %s", sorted(timetable.keys()))
|
||||
|
||||
item = {} # type: dict
|
||||
item = {}
|
||||
for key in sorted(timetable.keys()):
|
||||
if dt_util.parse_datetime(key) > now:
|
||||
item = timetable[key]
|
||||
|
@ -393,11 +393,11 @@ class GTFSDepartureSensor(Entity):
|
|||
self._available = False
|
||||
self._icon = ICON
|
||||
self._name = ""
|
||||
self._state = None # type: Optional[str]
|
||||
self._attributes = {} # type: dict
|
||||
self._state: Optional[str] = None
|
||||
self._attributes = {}
|
||||
|
||||
self._agency = None
|
||||
self._departure = {} # type: dict
|
||||
self._departure = {}
|
||||
self._destination = None
|
||||
self._origin = None
|
||||
self._route = None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue