Fix implicit-return in irish_rail_transport (#122916)

pull/107749/head
epenet 2024-07-31 20:50:31 +02:00 committed by GitHub
parent b31263b747
commit d878d744e7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 1 deletions

View File

@ -3,6 +3,7 @@
from __future__ import annotations from __future__ import annotations
from datetime import timedelta from datetime import timedelta
from typing import Any
from pyirishrail.pyirishrail import IrishRailRTPI from pyirishrail.pyirishrail import IrishRailRTPI
import voluptuous as vol import voluptuous as vol
@ -104,7 +105,7 @@ class IrishRailTransportSensor(SensorEntity):
return self._state return self._state
@property @property
def extra_state_attributes(self): def extra_state_attributes(self) -> dict[str, Any] | None:
"""Return the state attributes.""" """Return the state attributes."""
if self._times: if self._times:
next_up = "None" next_up = "None"
@ -127,6 +128,7 @@ class IrishRailTransportSensor(SensorEntity):
ATTR_NEXT_UP: next_up, ATTR_NEXT_UP: next_up,
ATTR_TRAIN_TYPE: self._times[0][ATTR_TRAIN_TYPE], ATTR_TRAIN_TYPE: self._times[0][ATTR_TRAIN_TYPE],
} }
return None
@property @property
def native_unit_of_measurement(self): def native_unit_of_measurement(self):