Adjust docstrings for ruff D404 (#89077)

This commit is contained in:
epenet
2023-03-03 11:26:13 +01:00
committed by GitHub
parent a5cf8210ae
commit 4a3c0cd0a8
79 changed files with 79 additions and 79 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
"""This package contains components that can be plugged into Home Assistant.
"""Contains components that can be plugged into Home Assistant.
Component design guidelines:
- Each component defines a constant DOMAIN that is equal to its filename.
@@ -40,7 +40,7 @@ def get_scanner(
class ActiontecDeviceScanner(DeviceScanner):
"""This class queries an actiontec router for connected devices."""
"""Class which queries an actiontec router for connected devices."""
def __init__(self, config: ConfigType) -> None:
"""Initialize the scanner."""
+1 -1
View File
@@ -9,7 +9,7 @@ from .const import API_TEMP_UNITS
class UnsupportedProperty(HomeAssistantError):
"""This entity does not support the requested Smart Home API property."""
"""Does not support the requested Smart Home API property."""
class NoTokenAvailable(HomeAssistantError):
@@ -33,7 +33,7 @@ def get_scanner(hass: HomeAssistant, config: ConfigType) -> ArrisDeviceScanner:
class ArrisDeviceScanner(DeviceScanner):
"""This class queries a Arris TG2492LG router for connected devices."""
"""Class which queries a Arris TG2492LG router for connected devices."""
def __init__(self, connect_box: ConnectBox) -> None:
"""Initialize the scanner."""
@@ -42,7 +42,7 @@ def get_scanner(hass: HomeAssistant, config: ConfigType) -> ArubaDeviceScanner |
class ArubaDeviceScanner(DeviceScanner):
"""This class queries a Aruba Access Point for connected devices."""
"""Class which queries a Aruba Access Point for connected devices."""
def __init__(self, config):
"""Initialize the scanner."""
@@ -42,7 +42,7 @@ Device = namedtuple("Device", ["mac", "name", "ip", "last_update"])
class BboxDeviceScanner(DeviceScanner):
"""This class scans for devices connected to the bbox."""
"""Scanner for devices connected to the bbox."""
def __init__(self, config):
"""Get host from config."""
@@ -35,7 +35,7 @@ def get_scanner(
class BTHomeHub5DeviceScanner(DeviceScanner):
"""This class queries a BT Home Hub 5."""
"""Class which queries a BT Home Hub 5."""
def __init__(self, config):
"""Initialise the scanner."""
@@ -54,7 +54,7 @@ _Device = namedtuple("_Device", ["ip_address", "mac", "host", "status", "name"])
class BTSmartHubScanner(DeviceScanner):
"""This class queries a BT Smart Hub."""
"""Class which queries a BT Smart Hub."""
def __init__(self, smarthub_client):
"""Initialise the scanner."""
@@ -39,7 +39,7 @@ def get_scanner(hass: HomeAssistant, config: ConfigType) -> CiscoDeviceScanner |
class CiscoDeviceScanner(DeviceScanner):
"""This class queries a wireless router running Cisco IOS firmware."""
"""Class which queries a wireless router running Cisco IOS firmware."""
def __init__(self, config):
"""Initialize the scanner."""
@@ -56,7 +56,7 @@ def get_scanner(hass: HomeAssistant, config: ConfigType) -> CiscoMEDeviceScanner
class CiscoMEDeviceScanner(DeviceScanner):
"""This class scans for devices associated to a Cisco ME controller."""
"""Scanner for devices associated to a Cisco ME controller."""
def __init__(self, controller):
"""Initialize the scanner."""
@@ -55,7 +55,7 @@ def get_scanner(hass: HomeAssistant, config: ConfigType) -> DdWrtDeviceScanner |
class DdWrtDeviceScanner(DeviceScanner):
"""This class queries a wireless router running DD-WRT firmware."""
"""Class which queries a wireless router running DD-WRT firmware."""
def __init__(self, config):
"""Initialize the DD-WRT scanner."""
@@ -110,7 +110,7 @@ class DemoManager:
class DemoGeolocationEvent(GeolocationEvent):
"""This represents a demo geolocation event."""
"""Represents a demo geolocation event."""
_attr_should_poll = False
@@ -1,4 +1,4 @@
"""This library brings support for forked_daapd to Home Assistant."""
"""Support forked_daapd media player."""
from __future__ import annotations
import asyncio
@@ -67,7 +67,7 @@ def get_scanner(hass: HomeAssistant, config: ConfigType) -> FortiOSDeviceScanner
class FortiOSDeviceScanner(DeviceScanner):
"""This class queries a FortiOS unit for connected devices."""
"""Class which queries a FortiOS unit for connected devices."""
def __init__(self, fgt) -> None:
"""Initialize the scanner."""
+1 -1
View File
@@ -1,4 +1,4 @@
"""This component provides basic support for Foscam IP cameras."""
"""Component providing basic support for Foscam IP cameras."""
from __future__ import annotations
import asyncio
@@ -68,7 +68,7 @@ def _async_add_entities(
class FritzBoxTracker(FritzDeviceBase, ScannerEntity):
"""This class queries a FRITZ!Box device."""
"""Class which queries a FRITZ!Box device."""
def __init__(self, avm_wrapper: AvmWrapper, device: FritzDevice) -> None:
"""Initialize a FRITZ!Box device."""
@@ -19,7 +19,7 @@ MIN_TIME_PHONEBOOK_UPDATE = timedelta(hours=6)
class FritzBoxPhonebook:
"""This connects to a FritzBox router and downloads its phone book."""
"""Connects to a FritzBox router and downloads its phone book."""
fph: FritzPhonebook
phonebook_dict: dict[str, list[str]]
@@ -77,7 +77,7 @@ async def async_setup_entry(
class GdacsEvent(GeolocationEvent):
"""This represents an external event with GDACS feed data."""
"""Represents an external event with GDACS feed data."""
_attr_should_poll = False
_attr_source = SOURCE
+1 -1
View File
@@ -39,7 +39,7 @@ async def async_setup_entry(
class GdacsSensor(SensorEntity):
"""This is a status sensor for the GDACS integration."""
"""Status sensor for the GDACS integration."""
_attr_should_poll = False
@@ -142,7 +142,7 @@ class GeoJsonFeedEntityManager:
class GeoJsonLocationEvent(GeolocationEvent):
"""This represents an external event with GeoJSON data."""
"""Represents an external event with GeoJSON data."""
_attr_should_poll = False
_attr_source = SOURCE
@@ -65,7 +65,7 @@ async def async_setup_entry(
class GeonetnzQuakesEvent(GeolocationEvent):
"""This represents an external event with GeoNet NZ Quakes feed data."""
"""Represents an external event with GeoNet NZ Quakes feed data."""
_attr_icon = "mdi:pulse"
_attr_should_poll = False
@@ -40,7 +40,7 @@ async def async_setup_entry(
class GeonetnzQuakesSensor(SensorEntity):
"""This is a status sensor for the GeoNet NZ Quakes integration."""
"""Status sensor for the GeoNet NZ Quakes integration."""
_attr_should_poll = False
@@ -54,7 +54,7 @@ async def async_setup_entry(
class GeonetnzVolcanoSensor(SensorEntity):
"""This represents an external event with GeoNet NZ Volcano feed data."""
"""Represents an external event with GeoNet NZ Volcano feed data."""
_attr_should_poll = False
@@ -1,4 +1,4 @@
"""This platform allows several binary sensor to be grouped into one binary sensor."""
"""Platform allowing several binary sensor to be grouped into one binary sensor."""
from __future__ import annotations
import voluptuous as vol
+1 -1
View File
@@ -1,4 +1,4 @@
"""This platform allows several cover to be grouped into one cover."""
"""Platform allowing several cover to be grouped into one cover."""
from __future__ import annotations
from typing import Any
+1 -1
View File
@@ -1,4 +1,4 @@
"""This platform allows several fans to be grouped into one fan."""
"""Platform allowing several fans to be grouped into one fan."""
from __future__ import annotations
from functools import reduce
+1 -1
View File
@@ -1,4 +1,4 @@
"""This platform allows several lights to be grouped into one light."""
"""Platform allowing several lights to be grouped into one light."""
from __future__ import annotations
from collections import Counter
+1 -1
View File
@@ -1,4 +1,4 @@
"""This platform allows several locks to be grouped into one lock."""
"""Platform allowing several locks to be grouped into one lock."""
from __future__ import annotations
import logging
@@ -1,4 +1,4 @@
"""This platform allows several media players to be grouped into one media player."""
"""Platform allowing several media players to be grouped into one media player."""
from __future__ import annotations
from contextlib import suppress
+1 -1
View File
@@ -1,4 +1,4 @@
"""This platform allows several sensors to be grouped into one sensor to provide numeric combinations."""
"""Platform allowing several sensors to be grouped into one sensor to provide numeric combinations."""
from __future__ import annotations
from collections.abc import Callable
+1 -1
View File
@@ -1,4 +1,4 @@
"""This platform allows several switches to be grouped into one switch."""
"""Platform allowing several switches to be grouped into one switch."""
from __future__ import annotations
import logging
@@ -45,7 +45,7 @@ Device = namedtuple("Device", ["mac", "name"])
class HitronCODADeviceScanner(DeviceScanner):
"""This class scans for devices using the CODA's web interface."""
"""Scanner for devices using the CODA's web interface."""
def __init__(self, config):
"""Initialize the scanner."""
@@ -141,7 +141,7 @@ class IgnSismologiaFeedEntityManager:
class IgnSismologiaLocationEvent(GeolocationEvent):
"""This represents an external event with IGN Sismologia feed data."""
"""Represents an external event with IGN Sismologia feed data."""
_attr_icon = "mdi:pulse"
_attr_should_poll = False
+1 -1
View File
@@ -72,7 +72,7 @@ async def async_setup_entry(
class IntellifireFan(IntellifireEntity, FanEntity):
"""This is Fan entity for the fireplace."""
"""Fan entity for the fireplace."""
entity_description: IntellifireFanEntityDescription
_attr_supported_features = FanEntityFeature.SET_SPEED
@@ -49,7 +49,7 @@ INTELLIFIRE_LIGHTS: tuple[IntellifireLightEntityDescription, ...] = (
class IntellifireLight(IntellifireEntity, LightEntity):
"""This is a Light entity for the fireplace."""
"""Light entity for the fireplace."""
entity_description: IntellifireLightEntityDescription
_attr_color_mode = ColorMode.BRIGHTNESS
@@ -35,7 +35,7 @@ def get_scanner(
class LinksysSmartWifiDeviceScanner(DeviceScanner):
"""This class queries a Linksys Access Point."""
"""Class which queries a Linksys Access Point."""
def __init__(self, config):
"""Initialize the scanner."""
+1 -1
View File
@@ -42,7 +42,7 @@ def setup(hass: HomeAssistant, config: ConfigType) -> bool:
class LircInterface(threading.Thread):
"""This interfaces with the lirc daemon to read IR commands.
"""Interfaces with the lirc daemon to read IR commands.
When using lirc in blocking mode, sometimes repeated commands get produced
in the next read of a command so we use a thread here to just wait
@@ -46,7 +46,7 @@ def get_scanner(hass: HomeAssistant, config: ConfigType) -> LuciDeviceScanner |
class LuciDeviceScanner(DeviceScanner):
"""This class scans for devices connected to an OpenWrt router."""
"""Scanner for devices connected to an OpenWrt router."""
def __init__(self, config):
"""Initialize the scanner."""
@@ -1,4 +1,4 @@
"""This platform enables the possibility to control a MQTT alarm."""
"""Control a MQTT alarm."""
from __future__ import annotations
import functools
@@ -132,7 +132,7 @@ def signal_device_update(mac_address) -> str:
class NmapDeviceScanner:
"""This class scans for devices using nmap."""
"""Scanner for devices using nmap."""
def __init__(
self, hass: HomeAssistant, entry: ConfigEntry, devices: NmapTrackedDevices
@@ -177,7 +177,7 @@ class NswRuralFireServiceFeedEntityManager:
class NswRuralFireServiceLocationEvent(GeolocationEvent):
"""This represents an external event with NSW Rural Fire Service data."""
"""Represents an external event with NSW Rural Fire Service data."""
_attr_should_poll = False
_attr_source = SOURCE
@@ -20,7 +20,7 @@ async def async_get_scanner(
class OPNSenseDeviceScanner(DeviceScanner):
"""This class queries a router running OPNsense."""
"""Class which queries a router running OPNsense."""
def __init__(self, client, interfaces):
"""Initialize the scanner."""
@@ -149,7 +149,7 @@ class QldBushfireFeedEntityManager:
class QldBushfireLocationEvent(GeolocationEvent):
"""This represents an external event with Qld Bushfire feed data."""
"""Represents an external event with Qld Bushfire feed data."""
_attr_icon = "mdi:fire"
_attr_should_poll = False
@@ -40,7 +40,7 @@ def get_scanner(
class QuantumGatewayDeviceScanner(DeviceScanner):
"""This class queries a Quantum Gateway."""
"""Class which queries a Quantum Gateway."""
def __init__(self, config):
"""Initialize the scanner."""
@@ -1,4 +1,4 @@
"""This platform provides binary sensors for key RainMachine data."""
"""Binary sensors for key RainMachine data."""
from dataclasses import dataclass
from homeassistant.components.binary_sensor import (
@@ -1,4 +1,4 @@
"""This platform provides support for sensor data from RainMachine."""
"""Support for sensor data from RainMachine."""
from __future__ import annotations
from dataclasses import dataclass
@@ -1,4 +1,4 @@
"""This component provides support for RainMachine programs and zones."""
"""Component providing support for RainMachine programs and zones."""
from __future__ import annotations
import asyncio
@@ -1,4 +1,4 @@
"""This component provides support for Reolink binary sensors."""
"""Component providing support for Reolink binary sensors."""
from __future__ import annotations
from collections.abc import Callable
+1 -1
View File
@@ -1,4 +1,4 @@
"""This component provides support for Reolink IP cameras."""
"""Component providing support for Reolink IP cameras."""
from __future__ import annotations
import logging
+1 -1
View File
@@ -1,4 +1,4 @@
"""This component encapsulates the NVR/camera API and subscription."""
"""Module which encapsulates the NVR/camera API and subscription."""
from __future__ import annotations
import asyncio
+1 -1
View File
@@ -1,4 +1,4 @@
"""This component provides support for Reolink number entities."""
"""Component providing support for Reolink number entities."""
from __future__ import annotations
from collections.abc import Callable
@@ -1,4 +1,4 @@
"""This component provides HA sensor support for Ring Door Bell/Chimes."""
"""Component providing HA sensor support for Ring Door Bell/Chimes."""
from __future__ import annotations
from dataclasses import dataclass
+1 -1
View File
@@ -1,4 +1,4 @@
"""This component provides support to the Ring Door Bell camera."""
"""Component providing support to the Ring Door Bell camera."""
from __future__ import annotations
from datetime import timedelta
+1 -1
View File
@@ -1,4 +1,4 @@
"""This component provides HA switch support for Ring Door Bell/Chimes."""
"""Component providing HA switch support for Ring Door Bell/Chimes."""
from datetime import timedelta
import logging
from typing import Any
+1 -1
View File
@@ -1,4 +1,4 @@
"""This component provides HA sensor support for Ring Door Bell/Chimes."""
"""Component providing HA sensor support for Ring Door Bell/Chimes."""
from __future__ import annotations
from dataclasses import dataclass
+1 -1
View File
@@ -1,4 +1,4 @@
"""This component provides HA Siren support for Ring Chimes."""
"""Component providing HA Siren support for Ring Chimes."""
import logging
from typing import Any
+1 -1
View File
@@ -1,4 +1,4 @@
"""This component provides HA switch support for Ring Door Bell/Chimes."""
"""Component providing HA switch support for Ring Door Bell/Chimes."""
from datetime import timedelta
import logging
from typing import Any
@@ -39,7 +39,7 @@ async def async_get_scanner(
class SkyHubDeviceScanner(DeviceScanner):
"""This class queries a Sky Hub router."""
"""Class which queries a Sky Hub router."""
def __init__(self, hub):
"""Initialise the scanner."""
@@ -1,4 +1,4 @@
"""This integration provides support for Stookalert Binary Sensor."""
"""Support for Stookalert Binary Sensor."""
from __future__ import annotations
from datetime import timedelta
@@ -1,4 +1,4 @@
"""This integration provides support for Stookwijzer Sensor."""
"""Support for Stookwijzer Sensor."""
from __future__ import annotations
from datetime import timedelta
@@ -36,7 +36,7 @@ def get_scanner(
class SwisscomDeviceScanner(DeviceScanner):
"""This class queries a router running Swisscom Internet-Box firmware."""
"""Class which queries a router running Swisscom Internet-Box firmware."""
def __init__(self, config):
"""Initialize the scanner."""
@@ -80,7 +80,7 @@ def get_scanner(
class SynologySrmDeviceScanner(DeviceScanner):
"""This class scans for devices connected to a Synology SRM router."""
"""Scanner for devices connected to a Synology SRM router."""
def __init__(self, config):
"""Initialize the scanner."""
@@ -48,7 +48,7 @@ Device = namedtuple("Device", ["mac", "name"])
class TadoDeviceScanner(DeviceScanner):
"""This class gets geofenced devices from Tado."""
"""Scanner for geofenced devices from Tado."""
def __init__(self, hass, config):
"""Initialize the scanner."""
@@ -46,7 +46,7 @@ def get_scanner(hass: HomeAssistant, config: ConfigType) -> ThomsonDeviceScanner
class ThomsonDeviceScanner(DeviceScanner):
"""This class queries a router running THOMSON firmware."""
"""Class which queries a router running THOMSON firmware."""
def __init__(self, config):
"""Initialize the scanner."""
@@ -49,7 +49,7 @@ def get_scanner(hass: HomeAssistant, config: ConfigType) -> TomatoDeviceScanner:
class TomatoDeviceScanner(DeviceScanner):
"""This class queries a wireless router running Tomato firmware."""
"""Class which queries a wireless router running Tomato firmware."""
def __init__(self, config):
"""Initialize the scanner."""
+1 -1
View File
@@ -1,4 +1,4 @@
"""This component provides HA sensor support for Travis CI framework."""
"""Component providing HA sensor support for Travis CI framework."""
from __future__ import annotations
from datetime import timedelta
@@ -68,7 +68,7 @@ def _refresh_on_access_denied(func):
class UbusDeviceScanner(DeviceScanner):
"""This class queries a wireless router running OpenWrt firmware.
"""Class which queries a wireless router running OpenWrt firmware.
Adapted from Tomato scanner.
"""
@@ -43,7 +43,7 @@ def get_scanner(hass: HomeAssistant, config: ConfigType) -> UnifiDeviceScanner |
class UnifiDeviceScanner(DeviceScanner):
"""This class queries Unifi wireless access point."""
"""Class which queries Unifi wireless access point."""
def __init__(self, config):
"""Initialize the scanner."""
@@ -1,4 +1,4 @@
"""This component provides binary sensors for UniFi Protect."""
"""Component providing binary sensors for UniFi Protect."""
from __future__ import annotations
from copy import copy
@@ -1,4 +1,4 @@
"""This component provides Lights for UniFi Protect."""
"""Component providing Lights for UniFi Protect."""
from __future__ import annotations
import logging
@@ -1,4 +1,4 @@
"""This component provides number entities for UniFi Protect."""
"""Component providing number entities for UniFi Protect."""
from __future__ import annotations
from dataclasses import dataclass
@@ -1,4 +1,4 @@
"""This component provides select entities for UniFi Protect."""
"""Component providing select entities for UniFi Protect."""
from __future__ import annotations
from collections.abc import Callable
@@ -1,4 +1,4 @@
"""This component provides sensors for UniFi Protect."""
"""Component providing sensors for UniFi Protect."""
from __future__ import annotations
from dataclasses import dataclass
@@ -1,4 +1,4 @@
"""This component provides Switches for UniFi Protect."""
"""Component providing Switches for UniFi Protect."""
from __future__ import annotations
from dataclasses import dataclass
@@ -57,7 +57,7 @@ async def async_get_scanner(
class UPCDeviceScanner(DeviceScanner):
"""This class queries a router running UPC ConnectBox firmware."""
"""Class which queries a router running UPC ConnectBox firmware."""
def __init__(self, connect_box: ConnectBox) -> None:
"""Initialize the scanner."""
@@ -195,7 +195,7 @@ class UsgsEarthquakesFeedEntityManager:
class UsgsEarthquakesEvent(GeolocationEvent):
"""This represents an external event with USGS Earthquake data."""
"""Represents an external event with USGS Earthquake data."""
_attr_icon = "mdi:pulse"
_attr_should_poll = False
+1 -1
View File
@@ -1,4 +1,4 @@
"""This component provides support for Xiaomi Cameras."""
"""Component providing support for Xiaomi Cameras."""
from __future__ import annotations
from ftplib import FTP, error_perm
@@ -36,7 +36,7 @@ def get_scanner(hass: HomeAssistant, config: ConfigType) -> XiaomiDeviceScanner
class XiaomiDeviceScanner(DeviceScanner):
"""This class queries a Xiaomi Mi router.
"""Class which queries a Xiaomi Mi router.
Adapted from Luci scanner.
"""
@@ -53,7 +53,7 @@ def get_scanner(
class XiaomiMiioDeviceScanner(DeviceScanner):
"""This class queries a Xiaomi Mi WiFi Repeater."""
"""Class which queries a Xiaomi Mi WiFi Repeater."""
def __init__(self, device):
"""Initialize the scanner."""