Fix implicit-return in wsdot (#122935)
parent
c7f863a141
commit
4fda025106
|
@ -6,6 +6,7 @@ from datetime import datetime, timedelta, timezone
|
|||
from http import HTTPStatus
|
||||
import logging
|
||||
import re
|
||||
from typing import Any
|
||||
|
||||
import requests
|
||||
import voluptuous as vol
|
||||
|
@ -125,7 +126,7 @@ class WashingtonStateTravelTimeSensor(WashingtonStateTransportSensor):
|
|||
self._state = self._data.get(ATTR_CURRENT_TIME)
|
||||
|
||||
@property
|
||||
def extra_state_attributes(self):
|
||||
def extra_state_attributes(self) -> dict[str, Any] | None:
|
||||
"""Return other details about the sensor state."""
|
||||
if self._data is not None:
|
||||
attrs = {}
|
||||
|
@ -140,6 +141,7 @@ class WashingtonStateTravelTimeSensor(WashingtonStateTransportSensor):
|
|||
self._data.get(ATTR_TIME_UPDATED)
|
||||
)
|
||||
return attrs
|
||||
return None
|
||||
|
||||
|
||||
def _parse_wsdot_timestamp(timestamp):
|
||||
|
|
Loading…
Reference in New Issue