From e06a2a53c47bf2ac1d79837a27fd3add8ac77a8d Mon Sep 17 00:00:00 2001 From: Maciej Bieniek Date: Thu, 20 May 2021 14:06:44 +0200 Subject: [PATCH] Add constructor return type in integrations L-N (#50888) * Add constructor return type in integrations L-N * Small fix --- homeassistant/components/light/__init__.py | 2 +- homeassistant/components/lovelace/resources.py | 2 +- homeassistant/components/lyric/api.py | 2 +- homeassistant/components/media_player/__init__.py | 2 +- homeassistant/components/media_source/local_source.py | 4 ++-- homeassistant/components/media_source/models.py | 4 ++-- homeassistant/components/melcloud/__init__.py | 2 +- homeassistant/components/melcloud/climate.py | 2 +- homeassistant/components/meteo_france/config_flow.py | 2 +- homeassistant/components/meteo_france/sensor.py | 4 ++-- homeassistant/components/meteo_france/weather.py | 2 +- homeassistant/components/minio/__init__.py | 2 +- homeassistant/components/minio/minio_helper.py | 2 +- homeassistant/components/mobile_app/entity.py | 2 +- homeassistant/components/modbus/climate.py | 2 +- homeassistant/components/modbus/cover.py | 2 +- homeassistant/components/modbus/switch.py | 2 +- homeassistant/components/mysensors/device.py | 2 +- homeassistant/components/neato/__init__.py | 2 +- homeassistant/components/neato/api.py | 2 +- homeassistant/components/nest/__init__.py | 2 +- homeassistant/components/nest/api.py | 2 +- homeassistant/components/nest/camera_sdm.py | 2 +- homeassistant/components/nest/climate_sdm.py | 2 +- homeassistant/components/nest/device_info.py | 2 +- homeassistant/components/nest/sensor_sdm.py | 2 +- homeassistant/components/netatmo/api.py | 2 +- homeassistant/components/netatmo/config_flow.py | 2 +- homeassistant/components/netatmo/data_handler.py | 2 +- homeassistant/components/netatmo/light.py | 2 +- homeassistant/components/netatmo/media_source.py | 2 +- homeassistant/components/nightscout/config_flow.py | 2 +- homeassistant/components/nilu/air_quality.py | 2 +- homeassistant/components/notion/__init__.py | 2 +- homeassistant/components/notion/sensor.py | 2 +- homeassistant/components/nsw_fuel_station/sensor.py | 2 +- homeassistant/components/nut/config_flow.py | 2 +- homeassistant/components/nws/__init__.py | 2 +- homeassistant/components/nzbget/coordinator.py | 2 +- homeassistant/components/nzbget/sensor.py | 2 +- homeassistant/components/nzbget/switch.py | 2 +- 41 files changed, 44 insertions(+), 44 deletions(-) diff --git a/homeassistant/components/light/__init__.py b/homeassistant/components/light/__init__.py index caf3ac209cb..8cb35a8bffe 100644 --- a/homeassistant/components/light/__init__.py +++ b/homeassistant/components/light/__init__.py @@ -488,7 +488,7 @@ class Profile: class Profiles: """Representation of available color profiles.""" - def __init__(self, hass: HomeAssistant): + def __init__(self, hass: HomeAssistant) -> None: """Initialize profiles.""" self.hass = hass self.data: dict[str, Profile] = {} diff --git a/homeassistant/components/lovelace/resources.py b/homeassistant/components/lovelace/resources.py index 6a97d5c4192..2a098361962 100644 --- a/homeassistant/components/lovelace/resources.py +++ b/homeassistant/components/lovelace/resources.py @@ -52,7 +52,7 @@ class ResourceStorageCollection(collection.StorageCollection): CREATE_SCHEMA = vol.Schema(RESOURCE_CREATE_FIELDS) UPDATE_SCHEMA = vol.Schema(RESOURCE_UPDATE_FIELDS) - def __init__(self, hass: HomeAssistant, ll_config: LovelaceConfig): + def __init__(self, hass: HomeAssistant, ll_config: LovelaceConfig) -> None: """Initialize the storage collection.""" super().__init__( storage.Store(hass, RESOURCES_STORAGE_VERSION, RESOURCE_STORAGE_KEY), diff --git a/homeassistant/components/lyric/api.py b/homeassistant/components/lyric/api.py index a77c6365baf..4d955165174 100644 --- a/homeassistant/components/lyric/api.py +++ b/homeassistant/components/lyric/api.py @@ -18,7 +18,7 @@ class ConfigEntryLyricClient(LyricClient): self, websession: ClientSession, oauth_session: config_entry_oauth2_flow.OAuth2Session, - ): + ) -> None: """Initialize Honeywell Lyric auth.""" super().__init__(websession) self._oauth_session = oauth_session diff --git a/homeassistant/components/media_player/__init__.py b/homeassistant/components/media_player/__init__.py index 23261ea029e..6fca2a4c3d5 100644 --- a/homeassistant/components/media_player/__init__.py +++ b/homeassistant/components/media_player/__init__.py @@ -1161,7 +1161,7 @@ class BrowseMedia: children: list[BrowseMedia] | None = None, children_media_class: str | None = None, thumbnail: str | None = None, - ): + ) -> None: """Initialize browse media item.""" self.media_class = media_class self.media_content_id = media_content_id diff --git a/homeassistant/components/media_source/local_source.py b/homeassistant/components/media_source/local_source.py index fb5e9094dfb..ab2e18183de 100644 --- a/homeassistant/components/media_source/local_source.py +++ b/homeassistant/components/media_source/local_source.py @@ -30,7 +30,7 @@ class LocalSource(MediaSource): name: str = "Local Media" - def __init__(self, hass: HomeAssistant): + def __init__(self, hass: HomeAssistant) -> None: """Initialize local source.""" super().__init__(DOMAIN) self.hass = hass @@ -183,7 +183,7 @@ class LocalMediaView(HomeAssistantView): url = "/media/{source_dir_id}/{location:.*}" name = "media" - def __init__(self, hass: HomeAssistant, source: LocalSource): + def __init__(self, hass: HomeAssistant, source: LocalSource) -> None: """Initialize the media view.""" self.hass = hass self.source = source diff --git a/homeassistant/components/media_source/models.py b/homeassistant/components/media_source/models.py index aa17fff320e..247361296a1 100644 --- a/homeassistant/components/media_source/models.py +++ b/homeassistant/components/media_source/models.py @@ -29,7 +29,7 @@ class BrowseMediaSource(BrowseMedia): children: list[BrowseMediaSource] | None - def __init__(self, *, domain: str | None, identifier: str | None, **kwargs): + def __init__(self, *, domain: str | None, identifier: str | None, **kwargs) -> None: """Initialize media source browse media.""" media_content_id = f"{URI_SCHEME}{domain or ''}" if identifier: @@ -106,7 +106,7 @@ class MediaSource(ABC): name: str = None - def __init__(self, domain: str): + def __init__(self, domain: str) -> None: """Initialize a media source.""" self.domain = domain if not self.name: diff --git a/homeassistant/components/melcloud/__init__.py b/homeassistant/components/melcloud/__init__.py index 2380d0ea8d7..7b42c1f42e8 100644 --- a/homeassistant/components/melcloud/__init__.py +++ b/homeassistant/components/melcloud/__init__.py @@ -84,7 +84,7 @@ async def async_unload_entry(hass, config_entry): class MelCloudDevice: """MELCloud Device instance.""" - def __init__(self, device: Device): + def __init__(self, device: Device) -> None: """Construct a device wrapper.""" self.device = device self.name = device.name diff --git a/homeassistant/components/melcloud/climate.py b/homeassistant/components/melcloud/climate.py index 49cb0fe462e..42c5ed7ef85 100644 --- a/homeassistant/components/melcloud/climate.py +++ b/homeassistant/components/melcloud/climate.py @@ -100,7 +100,7 @@ async def async_setup_entry( class MelCloudClimate(ClimateEntity): """Base climate device.""" - def __init__(self, device: MelCloudDevice): + def __init__(self, device: MelCloudDevice) -> None: """Initialize the climate.""" self.api = device self._base_device = self.api.device diff --git a/homeassistant/components/meteo_france/config_flow.py b/homeassistant/components/meteo_france/config_flow.py index baaf8e8b99c..26e2ac1bda2 100644 --- a/homeassistant/components/meteo_france/config_flow.py +++ b/homeassistant/components/meteo_france/config_flow.py @@ -113,7 +113,7 @@ class MeteoFranceFlowHandler(config_entries.ConfigFlow, domain=DOMAIN): class MeteoFranceOptionsFlowHandler(config_entries.OptionsFlow): """Handle a option flow.""" - def __init__(self, config_entry: config_entries.ConfigEntry): + def __init__(self, config_entry: config_entries.ConfigEntry) -> None: """Initialize options flow.""" self.config_entry = config_entry diff --git a/homeassistant/components/meteo_france/sensor.py b/homeassistant/components/meteo_france/sensor.py index 802305667fc..b710686554f 100644 --- a/homeassistant/components/meteo_france/sensor.py +++ b/homeassistant/components/meteo_france/sensor.py @@ -78,7 +78,7 @@ async def async_setup_entry( class MeteoFranceSensor(CoordinatorEntity, SensorEntity): """Representation of a Meteo-France sensor.""" - def __init__(self, sensor_type: str, coordinator: DataUpdateCoordinator): + def __init__(self, sensor_type: str, coordinator: DataUpdateCoordinator) -> None: """Initialize the Meteo-France sensor.""" super().__init__(coordinator) self._type = sensor_type @@ -194,7 +194,7 @@ class MeteoFranceRainSensor(MeteoFranceSensor): class MeteoFranceAlertSensor(MeteoFranceSensor): """Representation of a Meteo-France alert sensor.""" - def __init__(self, sensor_type: str, coordinator: DataUpdateCoordinator): + def __init__(self, sensor_type: str, coordinator: DataUpdateCoordinator) -> None: """Initialize the Meteo-France sensor.""" super().__init__(sensor_type, coordinator) dept_code = self.coordinator.data.domain_id diff --git a/homeassistant/components/meteo_france/weather.py b/homeassistant/components/meteo_france/weather.py index f45893ed7ca..d084198bd5b 100644 --- a/homeassistant/components/meteo_france/weather.py +++ b/homeassistant/components/meteo_france/weather.py @@ -68,7 +68,7 @@ async def async_setup_entry( class MeteoFranceWeather(CoordinatorEntity, WeatherEntity): """Representation of a weather condition.""" - def __init__(self, coordinator: DataUpdateCoordinator, mode: str): + def __init__(self, coordinator: DataUpdateCoordinator, mode: str) -> None: """Initialise the platform with a data instance and station name.""" super().__init__(coordinator) self._city_name = self.coordinator.data.position["name"] diff --git a/homeassistant/components/minio/__init__.py b/homeassistant/components/minio/__init__.py index 6e7174b60ee..f33dd6c389c 100644 --- a/homeassistant/components/minio/__init__.py +++ b/homeassistant/components/minio/__init__.py @@ -232,7 +232,7 @@ class MinioListener: prefix: str, suffix: str, events: list[str], - ): + ) -> None: """Create Listener.""" self._queue = queue self._endpoint = endpoint diff --git a/homeassistant/components/minio/minio_helper.py b/homeassistant/components/minio/minio_helper.py index c77e41727a4..b7fb3157c71 100644 --- a/homeassistant/components/minio/minio_helper.py +++ b/homeassistant/components/minio/minio_helper.py @@ -89,7 +89,7 @@ class MinioEventThread(threading.Thread): prefix: str, suffix: str, events: list[str], - ): + ) -> None: """Copy over all Minio client options.""" super().__init__() self._queue = queue diff --git a/homeassistant/components/mobile_app/entity.py b/homeassistant/components/mobile_app/entity.py index 46f4589fa2c..d0de89a94a1 100644 --- a/homeassistant/components/mobile_app/entity.py +++ b/homeassistant/components/mobile_app/entity.py @@ -26,7 +26,7 @@ def unique_id(webhook_id, sensor_unique_id): class MobileAppEntity(RestoreEntity): """Representation of an mobile app entity.""" - def __init__(self, config: dict, device: DeviceEntry, entry: ConfigEntry): + def __init__(self, config: dict, device: DeviceEntry, entry: ConfigEntry) -> None: """Initialize the entity.""" self._config = config self._device = device diff --git a/homeassistant/components/modbus/climate.py b/homeassistant/components/modbus/climate.py index e871a21a8ed..a8a3f2a8557 100644 --- a/homeassistant/components/modbus/climate.py +++ b/homeassistant/components/modbus/climate.py @@ -106,7 +106,7 @@ class ModbusThermostat(ClimateEntity): self, hub: ModbusHub, config: dict[str, Any], - ): + ) -> None: """Initialize the modbus thermostat.""" self._hub: ModbusHub = hub self._name = config[CONF_NAME] diff --git a/homeassistant/components/modbus/cover.py b/homeassistant/components/modbus/cover.py index 7c0e9d33215..e04d4bd8ce3 100644 --- a/homeassistant/components/modbus/cover.py +++ b/homeassistant/components/modbus/cover.py @@ -74,7 +74,7 @@ class ModbusCover(CoverEntity, RestoreEntity): self, hub: ModbusHub, config: dict[str, Any], - ): + ) -> None: """Initialize the modbus cover.""" self._hub: ModbusHub = hub self._coil = config.get(CALL_TYPE_COIL) diff --git a/homeassistant/components/modbus/switch.py b/homeassistant/components/modbus/switch.py index 27e67bf2a3e..1b0cd37eb87 100644 --- a/homeassistant/components/modbus/switch.py +++ b/homeassistant/components/modbus/switch.py @@ -52,7 +52,7 @@ async def async_setup_platform( class ModbusSwitch(SwitchEntity, RestoreEntity): """Base class representing a Modbus switch.""" - def __init__(self, hub: ModbusHub, config: dict): + def __init__(self, hub: ModbusHub, config: dict) -> None: """Initialize the switch.""" self._hub: ModbusHub = hub self._name = config[CONF_NAME] diff --git a/homeassistant/components/mysensors/device.py b/homeassistant/components/mysensors/device.py index b2e03dd037f..c1d8c431bc0 100644 --- a/homeassistant/components/mysensors/device.py +++ b/homeassistant/components/mysensors/device.py @@ -43,7 +43,7 @@ class MySensorsDevice: node_id: int, child_id: int, value_type: int, - ): + ) -> None: """Set up the MySensors device.""" self.gateway_id: GatewayId = gateway_id self.gateway: BaseAsyncGateway = gateway diff --git a/homeassistant/components/neato/__init__.py b/homeassistant/components/neato/__init__.py index b009e876a7b..f61db94332b 100644 --- a/homeassistant/components/neato/__init__.py +++ b/homeassistant/components/neato/__init__.py @@ -108,7 +108,7 @@ async def async_unload_entry(hass: HomeAssistant, entry: ConfigType) -> bool: class NeatoHub: """A My Neato hub wrapper class.""" - def __init__(self, hass: HomeAssistant, neato: Account): + def __init__(self, hass: HomeAssistant, neato: Account) -> None: """Initialize the Neato hub.""" self._hass = hass self.my_neato: Account = neato diff --git a/homeassistant/components/neato/api.py b/homeassistant/components/neato/api.py index 31988fc175e..a22b1b48e74 100644 --- a/homeassistant/components/neato/api.py +++ b/homeassistant/components/neato/api.py @@ -15,7 +15,7 @@ class ConfigEntryAuth(pybotvac.OAuthSession): hass: core.HomeAssistant, config_entry: config_entries.ConfigEntry, implementation: config_entry_oauth2_flow.AbstractOAuth2Implementation, - ): + ) -> None: """Initialize Neato Botvac Auth.""" self.hass = hass self.session = config_entry_oauth2_flow.OAuth2Session( diff --git a/homeassistant/components/nest/__init__.py b/homeassistant/components/nest/__init__.py index d58ad4863ed..5cd84effbc8 100644 --- a/homeassistant/components/nest/__init__.py +++ b/homeassistant/components/nest/__init__.py @@ -106,7 +106,7 @@ async def async_setup(hass: HomeAssistant, config: dict): class SignalUpdateCallback: """An EventCallback invoked when new events arrive from subscriber.""" - def __init__(self, hass: HomeAssistant): + def __init__(self, hass: HomeAssistant) -> None: """Initialize EventCallback.""" self._hass = hass diff --git a/homeassistant/components/nest/api.py b/homeassistant/components/nest/api.py index 3b571354c0f..29f39f5aec3 100644 --- a/homeassistant/components/nest/api.py +++ b/homeassistant/components/nest/api.py @@ -22,7 +22,7 @@ class AsyncConfigEntryAuth(AbstractAuth): oauth_session: config_entry_oauth2_flow.OAuth2Session, client_id: str, client_secret: str, - ): + ) -> None: """Initialize Google Nest Device Access auth.""" super().__init__(websession, API_URL) self._oauth_session = oauth_session diff --git a/homeassistant/components/nest/camera_sdm.py b/homeassistant/components/nest/camera_sdm.py index 66568907aa0..f8f2db506e2 100644 --- a/homeassistant/components/nest/camera_sdm.py +++ b/homeassistant/components/nest/camera_sdm.py @@ -56,7 +56,7 @@ async def async_setup_sdm_entry( class NestCamera(Camera): """Devices that support cameras.""" - def __init__(self, device: Device): + def __init__(self, device: Device) -> None: """Initialize the camera.""" super().__init__() self._device = device diff --git a/homeassistant/components/nest/climate_sdm.py b/homeassistant/components/nest/climate_sdm.py index a90fa06ce1f..ab987ff332f 100644 --- a/homeassistant/components/nest/climate_sdm.py +++ b/homeassistant/components/nest/climate_sdm.py @@ -98,7 +98,7 @@ async def async_setup_sdm_entry( class ThermostatEntity(ClimateEntity): """A nest thermostat climate entity.""" - def __init__(self, device: Device): + def __init__(self, device: Device) -> None: """Initialize ThermostatEntity.""" self._device = device self._device_info = DeviceInfo(device) diff --git a/homeassistant/components/nest/device_info.py b/homeassistant/components/nest/device_info.py index 36419d0dd6b..579733de8ad 100644 --- a/homeassistant/components/nest/device_info.py +++ b/homeassistant/components/nest/device_info.py @@ -18,7 +18,7 @@ class DeviceInfo: device_brand = "Google Nest" - def __init__(self, device: Device): + def __init__(self, device: Device) -> None: """Initialize the DeviceInfo.""" self._device = device diff --git a/homeassistant/components/nest/sensor_sdm.py b/homeassistant/components/nest/sensor_sdm.py index b70d6cd5c57..8182ef3ed95 100644 --- a/homeassistant/components/nest/sensor_sdm.py +++ b/homeassistant/components/nest/sensor_sdm.py @@ -56,7 +56,7 @@ async def async_setup_sdm_entry( class SensorBase(SensorEntity): """Representation of a dynamically updated Sensor.""" - def __init__(self, device: Device): + def __init__(self, device: Device) -> None: """Initialize the sensor.""" self._device = device self._device_info = DeviceInfo(device) diff --git a/homeassistant/components/netatmo/api.py b/homeassistant/components/netatmo/api.py index c13a0b899c7..7a5f018396e 100644 --- a/homeassistant/components/netatmo/api.py +++ b/homeassistant/components/netatmo/api.py @@ -15,7 +15,7 @@ class ConfigEntryNetatmoAuth(pyatmo.auth.NetatmoOAuth2): hass: core.HomeAssistant, config_entry: config_entries.ConfigEntry, implementation: config_entry_oauth2_flow.AbstractOAuth2Implementation, - ): + ) -> None: """Initialize Netatmo Auth.""" self.hass = hass self.session = config_entry_oauth2_flow.OAuth2Session( diff --git a/homeassistant/components/netatmo/config_flow.py b/homeassistant/components/netatmo/config_flow.py index 00899f24566..ea44339b99f 100644 --- a/homeassistant/components/netatmo/config_flow.py +++ b/homeassistant/components/netatmo/config_flow.py @@ -75,7 +75,7 @@ class NetatmoFlowHandler( class NetatmoOptionsFlowHandler(config_entries.OptionsFlow): """Handle Netatmo options.""" - def __init__(self, config_entry: config_entries.ConfigEntry): + def __init__(self, config_entry: config_entries.ConfigEntry) -> None: """Initialize Netatmo options flow.""" self.config_entry = config_entry self.options = dict(config_entry.options) diff --git a/homeassistant/components/netatmo/data_handler.py b/homeassistant/components/netatmo/data_handler.py index 41e7d158c0c..b8f81257eab 100644 --- a/homeassistant/components/netatmo/data_handler.py +++ b/homeassistant/components/netatmo/data_handler.py @@ -52,7 +52,7 @@ SCAN_INTERVAL = 60 class NetatmoDataHandler: """Manages the Netatmo data handling.""" - def __init__(self, hass: HomeAssistant, entry: ConfigEntry): + def __init__(self, hass: HomeAssistant, entry: ConfigEntry) -> None: """Initialize self.""" self.hass = hass self._auth = hass.data[DOMAIN][entry.entry_id][AUTH] diff --git a/homeassistant/components/netatmo/light.py b/homeassistant/components/netatmo/light.py index 08744c462e8..47712e75a0d 100644 --- a/homeassistant/components/netatmo/light.py +++ b/homeassistant/components/netatmo/light.py @@ -80,7 +80,7 @@ class NetatmoLight(NetatmoBase, LightEntity): camera_id: str, camera_type: str, home_id: str, - ): + ) -> None: """Initialize a Netatmo Presence camera light.""" LightEntity.__init__(self) super().__init__(data_handler) diff --git a/homeassistant/components/netatmo/media_source.py b/homeassistant/components/netatmo/media_source.py index db00df5129f..061b2c57971 100644 --- a/homeassistant/components/netatmo/media_source.py +++ b/homeassistant/components/netatmo/media_source.py @@ -41,7 +41,7 @@ class NetatmoSource(MediaSource): name: str = MANUFACTURER - def __init__(self, hass: HomeAssistant): + def __init__(self, hass: HomeAssistant) -> None: """Initialize Netatmo source.""" super().__init__(DOMAIN) self.hass = hass diff --git a/homeassistant/components/nightscout/config_flow.py b/homeassistant/components/nightscout/config_flow.py index c8807f3a2ab..1f3f62835bc 100644 --- a/homeassistant/components/nightscout/config_flow.py +++ b/homeassistant/components/nightscout/config_flow.py @@ -66,7 +66,7 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN): class InputValidationError(exceptions.HomeAssistantError): """Error to indicate we cannot proceed due to invalid input.""" - def __init__(self, base: str): + def __init__(self, base: str) -> None: """Initialize with error base.""" super().__init__() self.base = base diff --git a/homeassistant/components/nilu/air_quality.py b/homeassistant/components/nilu/air_quality.py index d6fcad3ac7e..fb5b4c75798 100644 --- a/homeassistant/components/nilu/air_quality.py +++ b/homeassistant/components/nilu/air_quality.py @@ -158,7 +158,7 @@ class NiluData: class NiluSensor(AirQualityEntity): """Single nilu station air sensor.""" - def __init__(self, api_data: NiluData, name: str, show_on_map: bool): + def __init__(self, api_data: NiluData, name: str, show_on_map: bool) -> None: """Initialize the sensor.""" self._api = api_data self._name = f"{name} {api_data.data.name}" diff --git a/homeassistant/components/notion/__init__.py b/homeassistant/components/notion/__init__.py index a6dfe7e73a9..141086bb2be 100644 --- a/homeassistant/components/notion/__init__.py +++ b/homeassistant/components/notion/__init__.py @@ -141,7 +141,7 @@ class NotionEntity(CoordinatorEntity): system_id: str, name: str, device_class: str, - ): + ) -> None: """Initialize the entity.""" super().__init__(coordinator) self._attrs = {ATTR_ATTRIBUTION: DEFAULT_ATTRIBUTION} diff --git a/homeassistant/components/notion/sensor.py b/homeassistant/components/notion/sensor.py index 8652888d955..2494ed2d2e8 100644 --- a/homeassistant/components/notion/sensor.py +++ b/homeassistant/components/notion/sensor.py @@ -55,7 +55,7 @@ class NotionSensor(NotionEntity, SensorEntity): name: str, device_class: str, unit: str, - ): + ) -> None: """Initialize the entity.""" super().__init__( coordinator, task_id, sensor_id, bridge_id, system_id, name, device_class diff --git a/homeassistant/components/nsw_fuel_station/sensor.py b/homeassistant/components/nsw_fuel_station/sensor.py index 6c8061294e9..9522d6c430f 100644 --- a/homeassistant/components/nsw_fuel_station/sensor.py +++ b/homeassistant/components/nsw_fuel_station/sensor.py @@ -148,7 +148,7 @@ class StationPriceData: class StationPriceSensor(SensorEntity): """Implementation of a sensor that reports the fuel price for a station.""" - def __init__(self, station_data: StationPriceData, fuel_type: str): + def __init__(self, station_data: StationPriceData, fuel_type: str) -> None: """Initialize the sensor.""" self._station_data = station_data self._fuel_type = fuel_type diff --git a/homeassistant/components/nut/config_flow.py b/homeassistant/components/nut/config_flow.py index fc389da5539..0b5ad8bbc1f 100644 --- a/homeassistant/components/nut/config_flow.py +++ b/homeassistant/components/nut/config_flow.py @@ -227,7 +227,7 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN): class OptionsFlowHandler(config_entries.OptionsFlow): """Handle a option flow for nut.""" - def __init__(self, config_entry: config_entries.ConfigEntry): + def __init__(self, config_entry: config_entries.ConfigEntry) -> None: """Initialize options flow.""" self.config_entry = config_entry diff --git a/homeassistant/components/nws/__init__.py b/homeassistant/components/nws/__init__.py index 386a426c1d1..47465739250 100644 --- a/homeassistant/components/nws/__init__.py +++ b/homeassistant/components/nws/__init__.py @@ -57,7 +57,7 @@ class NwsDataUpdateCoordinator(DataUpdateCoordinator): failed_update_interval: datetime.timedelta, update_method: Callable[[], Awaitable] | None = None, request_refresh_debouncer: debounce.Debouncer | None = None, - ): + ) -> None: """Initialize NWS coordinator.""" super().__init__( hass, diff --git a/homeassistant/components/nzbget/coordinator.py b/homeassistant/components/nzbget/coordinator.py index 57e0b9fc395..5851bb21b41 100644 --- a/homeassistant/components/nzbget/coordinator.py +++ b/homeassistant/components/nzbget/coordinator.py @@ -25,7 +25,7 @@ _LOGGER = logging.getLogger(__name__) class NZBGetDataUpdateCoordinator(DataUpdateCoordinator): """Class to manage fetching NZBGet data.""" - def __init__(self, hass: HomeAssistant, *, config: dict, options: dict): + def __init__(self, hass: HomeAssistant, *, config: dict, options: dict) -> None: """Initialize global NZBGet data updater.""" self.nzbget = NZBGetAPI( config[CONF_HOST], diff --git a/homeassistant/components/nzbget/sensor.py b/homeassistant/components/nzbget/sensor.py index 49506f72976..97bced9e9c2 100644 --- a/homeassistant/components/nzbget/sensor.py +++ b/homeassistant/components/nzbget/sensor.py @@ -77,7 +77,7 @@ class NZBGetSensor(NZBGetEntity, SensorEntity): sensor_type: str, sensor_name: str, unit_of_measurement: str | None = None, - ): + ) -> None: """Initialize a new NZBGet sensor.""" self._sensor_type = sensor_type self._unique_id = f"{entry_id}_{sensor_type}" diff --git a/homeassistant/components/nzbget/switch.py b/homeassistant/components/nzbget/switch.py index 605454246eb..4e4cca34aa8 100644 --- a/homeassistant/components/nzbget/switch.py +++ b/homeassistant/components/nzbget/switch.py @@ -41,7 +41,7 @@ class NZBGetDownloadSwitch(NZBGetEntity, SwitchEntity): coordinator: NZBGetDataUpdateCoordinator, entry_id: str, entry_name: str, - ): + ) -> None: """Initialize a new NZBGet switch.""" self._unique_id = f"{entry_id}_download"