Fix implicit-return in wsdot (#122935)

This commit is contained in:
epenet 2024-07-31 20:47:33 +02:00 committed by GitHub
parent c7f863a141
commit 4fda025106
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

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