Fix implicit-return in wsdot (#122935)

pull/107749/head
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
1 changed files with 3 additions and 1 deletions

View File

@ -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):