Move overlapping pylint rules to ruff, disable mypy overlap (#94359)

This commit is contained in:
Franck Nijhof 2023-06-27 17:42:46 +02:00 committed by GitHub
parent 7c676c0a7d
commit 3e85a29b86
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
88 changed files with 537 additions and 357 deletions

View file

@ -643,15 +643,14 @@ class GTFSDepartureSensor(SensorEntity):
# Define the state as a UTC timestamp with ISO 8601 format
if not self._departure:
self._state = None
elif self._agency:
self._state = self._departure["departure_time"].replace(
tzinfo=dt_util.get_time_zone(self._agency.agency_timezone)
)
else:
if self._agency:
self._state = self._departure["departure_time"].replace(
tzinfo=dt_util.get_time_zone(self._agency.agency_timezone)
)
else:
self._state = self._departure["departure_time"].replace(
tzinfo=dt_util.UTC
)
self._state = self._departure["departure_time"].replace(
tzinfo=dt_util.UTC
)
# Assign attributes, icon and name
self.update_attributes()