From 325b8b85479ba9154c140923a3ae888269b2ca52 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 17 Jun 2024 17:05:02 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- custom_components/nyc311/__init__.py | 1 + custom_components/nyc311/base_device.py | 5 ++--- custom_components/nyc311/binary_sensor.py | 1 + custom_components/nyc311/calendar.py | 1 + custom_components/nyc311/config_flow.py | 1 + custom_components/nyc311/sensor.py | 1 + 6 files changed, 7 insertions(+), 3 deletions(-) diff --git a/custom_components/nyc311/__init__.py b/custom_components/nyc311/__init__.py index 2c01fcc..19508f8 100644 --- a/custom_components/nyc311/__init__.py +++ b/custom_components/nyc311/__init__.py @@ -1,4 +1,5 @@ """The NYC 311 Public Services Calendar integration.""" + from __future__ import annotations from datetime import timedelta diff --git a/custom_components/nyc311/base_device.py b/custom_components/nyc311/base_device.py index 6e6a775..dd17d4e 100644 --- a/custom_components/nyc311/base_device.py +++ b/custom_components/nyc311/base_device.py @@ -1,4 +1,5 @@ """Base for NYC311 entities.""" + from __future__ import annotations from homeassistant.core import callback @@ -35,9 +36,7 @@ def __init__( def _get_icon(self, active_exception: bool) -> str: """Get icon for a given service / state.""" - return ( - f"{SERVICE_ICONS[self._calendar_entry.service_profile.service_type]}{'' if active_exception else '-off'}" - ) + return f"{SERVICE_ICONS[self._calendar_entry.service_profile.service_type]}{'' if active_exception else '-off'}" async def async_added_to_hass(self) -> None: """Register callbacks.""" diff --git a/custom_components/nyc311/binary_sensor.py b/custom_components/nyc311/binary_sensor.py index 02902bf..aa9df8b 100644 --- a/custom_components/nyc311/binary_sensor.py +++ b/custom_components/nyc311/binary_sensor.py @@ -1,4 +1,5 @@ """Binary sensor API entity.""" + from __future__ import annotations from datetime import date, datetime diff --git a/custom_components/nyc311/calendar.py b/custom_components/nyc311/calendar.py index ff6a3fb..84bbaf5 100644 --- a/custom_components/nyc311/calendar.py +++ b/custom_components/nyc311/calendar.py @@ -1,4 +1,5 @@ """Binary sensor calendar entity.""" + from __future__ import annotations import datetime diff --git a/custom_components/nyc311/config_flow.py b/custom_components/nyc311/config_flow.py index 8b407de..528055e 100644 --- a/custom_components/nyc311/config_flow.py +++ b/custom_components/nyc311/config_flow.py @@ -1,4 +1,5 @@ """Config flow for NYC 311 Public Services Calendar integration.""" + from __future__ import annotations import logging diff --git a/custom_components/nyc311/sensor.py b/custom_components/nyc311/sensor.py index 79a9b55..f657950 100644 --- a/custom_components/nyc311/sensor.py +++ b/custom_components/nyc311/sensor.py @@ -1,4 +1,5 @@ """Implements 'Next Exception' sensors.""" + from __future__ import annotations import logging