Skip to content

Commit

Permalink
Cleanup: Reformat to satisfy ruff 0.3.0
Browse files Browse the repository at this point in the history
Ruff pushed all their 2023 experimental changes to stable as a
"2024.2" release at end of Feb. So the CI linting broke on 1 Mar.

Mostly it seems to be that a blank line is expected between file
docstring and imports now.
  • Loading branch information
make-all committed Mar 1, 2024
1 parent b763456 commit d0dc800
Show file tree
Hide file tree
Showing 82 changed files with 82 additions and 0 deletions.
1 change: 1 addition & 0 deletions custom_components/tuya_local/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
investigation into Goldair's tuyapi statuses
https://github.com/codetheweb/tuyapi/issues/31.
"""

import logging

from homeassistant.config_entries import ConfigEntry
Expand Down
1 change: 1 addition & 0 deletions custom_components/tuya_local/alarm_control_panel.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Setup for different kinds of Tuya alarm control panels.
"""

import logging

from homeassistant.components.alarm_control_panel import AlarmControlPanelEntity
Expand Down
1 change: 1 addition & 0 deletions custom_components/tuya_local/binary_sensor.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Setup for different kinds of Tuya Binary sensors
"""

import logging

from homeassistant.components.binary_sensor import (
Expand Down
1 change: 1 addition & 0 deletions custom_components/tuya_local/button.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Setup for different kinds of Tuya button devices
"""

import logging

from homeassistant.components.button import ButtonDeviceClass, ButtonEntity
Expand Down
1 change: 1 addition & 0 deletions custom_components/tuya_local/climate.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Setup for different kinds of Tuya climate devices
"""

import logging

from homeassistant.components.climate import (
Expand Down
1 change: 1 addition & 0 deletions custom_components/tuya_local/cover.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Setup for different kinds of Tuya cover devices
"""

import logging

from homeassistant.components.cover import (
Expand Down
1 change: 1 addition & 0 deletions custom_components/tuya_local/diagnostics.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Diagnostics support for tuya-local."""

from __future__ import annotations

from typing import Any
Expand Down
1 change: 1 addition & 0 deletions custom_components/tuya_local/event.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Implementation of Tuya events
"""

import logging

from homeassistant.components.event import EventDeviceClass, EventEntity
Expand Down
1 change: 1 addition & 0 deletions custom_components/tuya_local/fan.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Setup for different kinds of Tuya fan devices
"""

import logging
from typing import Any

Expand Down
1 change: 1 addition & 0 deletions custom_components/tuya_local/helpers/config.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Helper for general config
"""

import logging

from .. import DOMAIN
Expand Down
1 change: 1 addition & 0 deletions custom_components/tuya_local/helpers/device_config.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Config parser for Tuya Local devices.
"""

import logging
from base64 import b64decode, b64encode
from collections.abc import Sequence
Expand Down
1 change: 1 addition & 0 deletions custom_components/tuya_local/helpers/mixin.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Mixins to make writing new platforms easier
"""

import logging

from homeassistant.const import (
Expand Down
1 change: 1 addition & 0 deletions custom_components/tuya_local/humidifier.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Setup for different kinds of Tuya humidifier devices
"""

import logging

from homeassistant.components.humidifier import (
Expand Down
1 change: 1 addition & 0 deletions custom_components/tuya_local/lawn_mower.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Setup for different kinds of Tuya lawn mowers
"""

from homeassistant.components.lawn_mower import LawnMowerEntity
from homeassistant.components.lawn_mower.const import (
SERVICE_DOCK,
Expand Down
1 change: 1 addition & 0 deletions custom_components/tuya_local/light.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Setup for different kinds of Tuya light devices
"""

import logging
from struct import pack, unpack

Expand Down
1 change: 1 addition & 0 deletions custom_components/tuya_local/lock.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Setup for different kinds of Tuya lock devices
"""

from homeassistant.components.lock import LockEntity

from .device import TuyaLocalDevice
Expand Down
1 change: 1 addition & 0 deletions custom_components/tuya_local/number.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Setup for different kinds of Tuya numbers
"""

import logging

from homeassistant.components.number import NumberEntity
Expand Down
1 change: 1 addition & 0 deletions custom_components/tuya_local/remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Implementation of Tuya remote control devices
Based on broadlink integration for code saving under HA storage
"""

import asyncio
import json
import logging
Expand Down
1 change: 1 addition & 0 deletions custom_components/tuya_local/select.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Setup for different kinds of Tuya selects
"""

from homeassistant.components.select import SelectEntity

from .device import TuyaLocalDevice
Expand Down
1 change: 1 addition & 0 deletions custom_components/tuya_local/sensor.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Setup for different kinds of Tuya sensors
"""

import logging

from homeassistant.components.sensor import (
Expand Down
1 change: 1 addition & 0 deletions custom_components/tuya_local/siren.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Setup for Tuya siren devices
"""

from homeassistant.components.siren import SirenEntity, SirenEntityFeature
from homeassistant.components.siren.const import (
ATTR_DURATION,
Expand Down
1 change: 1 addition & 0 deletions custom_components/tuya_local/switch.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Setup for different kinds of Tuya switch devices
"""

from homeassistant.components.switch import SwitchDeviceClass, SwitchEntity

from .device import TuyaLocalDevice
Expand Down
1 change: 1 addition & 0 deletions custom_components/tuya_local/vacuum.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Setup for different kinds of Tuya vacuum cleaners
"""

from homeassistant.components.vacuum import (
SERVICE_CLEAN_SPOT,
SERVICE_RETURN_TO_BASE,
Expand Down
1 change: 1 addition & 0 deletions custom_components/tuya_local/water_heater.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Setup for different kinds of Tuya water heater devices
"""

import logging

from homeassistant.components.water_heater import (
Expand Down
1 change: 1 addition & 0 deletions tests/devices/test_avatto_blinds.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests for the Avatto roller blinds controller."""

from homeassistant.components.cover import CoverDeviceClass, CoverEntityFeature
from homeassistant.components.sensor import SensorDeviceClass
from homeassistant.const import UnitOfTime
Expand Down
1 change: 1 addition & 0 deletions tests/devices/test_avatto_curtain_switch.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests for the Avatto roller blinds controller."""

from homeassistant.components.cover import CoverDeviceClass, CoverEntityFeature

from ..const import AVATTO_CURTAIN_PAYLOAD
Expand Down
1 change: 1 addition & 0 deletions tests/devices/test_bcom_intercom_camera.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests for the bcom intercom camera"""

from ..const import BCOM_CAMERA_PAYLOAD
from .base_device_tests import TuyaDeviceTestCase

Expand Down
1 change: 1 addition & 0 deletions tests/devices/test_digoo_dgsp01_dual_nightlight_switch.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests for the switch entity."""

from homeassistant.components.light import ColorMode, LightEntityFeature
from homeassistant.components.switch import SwitchDeviceClass

Expand Down
1 change: 1 addition & 0 deletions tests/devices/test_digoo_dgsp202.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests for Digoo DSSP202 dual switch with timers and energy monitoring"""

from homeassistant.components.sensor import SensorDeviceClass
from homeassistant.components.switch import SwitchDeviceClass
from homeassistant.const import (
Expand Down
1 change: 1 addition & 0 deletions tests/devices/test_energy_monitoring_powerstrip.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests for the energy monitoring powerstrip."""

from homeassistant.components.sensor import STATE_CLASS_MEASUREMENT, SensorDeviceClass
from homeassistant.components.switch import SwitchDeviceClass
from homeassistant.const import (
Expand Down
1 change: 1 addition & 0 deletions tests/devices/test_es01_powerstrip.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests for the ES01 powerstrip."""

from homeassistant.components.switch import SwitchDeviceClass
from homeassistant.const import UnitOfTime

Expand Down
1 change: 1 addition & 0 deletions tests/devices/test_essentials_purifier.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests for the essentials air purifier."""

from homeassistant.components.button import ButtonDeviceClass
from homeassistant.components.sensor import SensorDeviceClass
from homeassistant.const import (
Expand Down
1 change: 1 addition & 0 deletions tests/devices/test_garage_door_opener.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests for the simple garage door opener."""

from homeassistant.components.cover import CoverDeviceClass, CoverEntityFeature

from ..const import SIMPLE_GARAGE_DOOR_PAYLOAD
Expand Down
1 change: 1 addition & 0 deletions tests/devices/test_grid_connect_double_power_point.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests for the switch entity."""

from homeassistant.components.sensor import SensorDeviceClass
from homeassistant.components.switch import SwitchDeviceClass
from homeassistant.const import (
Expand Down
1 change: 1 addition & 0 deletions tests/devices/test_kogan_garage_door_opener.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests for the simple garage door opener."""

from homeassistant.components.binary_sensor import BinarySensorDeviceClass
from homeassistant.components.cover import CoverDeviceClass, CoverEntityFeature
from homeassistant.components.sensor import SensorDeviceClass
Expand Down
1 change: 1 addition & 0 deletions tests/devices/test_logicom_powerstrip.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests for the Logicom Strippy 4-way+USB powerstrip."""

from homeassistant.components.switch import SwitchDeviceClass
from homeassistant.const import UnitOfTime

Expand Down
1 change: 1 addition & 0 deletions tests/devices/test_m027_curtain.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests for the M027 curtain module."""

from homeassistant.components.cover import CoverDeviceClass, CoverEntityFeature
from homeassistant.const import UnitOfTime

Expand Down
1 change: 1 addition & 0 deletions tests/devices/test_moebot.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
Primarily for testing the STOP command which this device is the first to use,
and the lawn_mower platform.
"""

from homeassistant.components.lawn_mower.const import (
LawnMowerActivity,
LawnMowerEntityFeature,
Expand Down
1 change: 1 addition & 0 deletions tests/devices/test_moes_rgb_socket.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests for the MoesHouse RGB smart socket."""

from homeassistant.components.light import ColorMode, LightEntityFeature
from homeassistant.components.sensor import SensorDeviceClass
from homeassistant.components.switch import SwitchDeviceClass
Expand Down
1 change: 1 addition & 0 deletions tests/devices/test_parkside_plgs2012a1_smart_charger.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests for Parkside PLGS 2012 A1 Smart Charger"""

from homeassistant.components.binary_sensor import BinarySensorDeviceClass
from homeassistant.components.number.const import NumberDeviceClass
from homeassistant.components.sensor import STATE_CLASS_MEASUREMENT, SensorDeviceClass
Expand Down
1 change: 1 addition & 0 deletions tests/devices/test_pc321ty_energy_meter.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests for the PC321-TY Power Clamp Energy meter"""

from homeassistant.components.sensor import (
STATE_CLASS_MEASUREMENT,
STATE_CLASS_TOTAL_INCREASING,
Expand Down
1 change: 1 addition & 0 deletions tests/devices/test_qoto_03_sprinkler.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests for the Quto 03 Sprinkler."""

from homeassistant.components.binary_sensor import BinarySensorDeviceClass
from homeassistant.const import PERCENTAGE, UnitOfTime

Expand Down
1 change: 1 addition & 0 deletions tests/devices/test_qs_c01_curtain.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests for the QS C01 curtain module."""

from homeassistant.components.cover import CoverDeviceClass, CoverEntityFeature
from homeassistant.const import UnitOfTime

Expand Down
1 change: 1 addition & 0 deletions tests/devices/test_sd123_hpr01_presence.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests for SD123 Human Presence Radar HPR01"""

from homeassistant.components.binary_sensor import BinarySensorDeviceClass

from ..const import SD123_PRESENCE_PAYLOAD
Expand Down
1 change: 1 addition & 0 deletions tests/devices/test_simple_blinds.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests for the simple blinds controller."""

from homeassistant.components.cover import CoverDeviceClass, CoverEntityFeature

from ..const import SIMPLE_BLINDS_PAYLOAD
Expand Down
1 change: 1 addition & 0 deletions tests/devices/test_simple_switch_with_timer.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests for a simple switch with timer"""

from homeassistant.components.switch import SwitchDeviceClass
from homeassistant.const import UnitOfTime

Expand Down
1 change: 1 addition & 0 deletions tests/devices/test_simple_switch_with_timerv2.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests for a simple switch with timer"""

from homeassistant.components.switch import SwitchDeviceClass
from homeassistant.const import UnitOfTime

Expand Down
1 change: 1 addition & 0 deletions tests/devices/test_smartplug_encoded.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests for the switch entity."""

from homeassistant.components.switch import SwitchDeviceClass
from homeassistant.const import UnitOfTime

Expand Down
1 change: 1 addition & 0 deletions tests/devices/test_smartplugv1.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests for the switch entity."""

from homeassistant.components.binary_sensor import BinarySensorDeviceClass
from homeassistant.components.sensor import SensorDeviceClass
from homeassistant.components.switch import SwitchDeviceClass
Expand Down
1 change: 1 addition & 0 deletions tests/devices/test_smartplugv2.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests for the switch entity."""

from homeassistant.components.sensor import SensorDeviceClass
from homeassistant.components.switch import SwitchDeviceClass
from homeassistant.const import (
Expand Down
1 change: 1 addition & 0 deletions tests/devices/test_smartplugv2_energy.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests for the switch entity."""

from homeassistant.components.binary_sensor import BinarySensorDeviceClass
from homeassistant.components.sensor import SensorDeviceClass
from homeassistant.components.switch import SwitchDeviceClass
Expand Down
1 change: 1 addition & 0 deletions tests/devices/test_tompd63lw_breaker.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests for the switch entity."""

from homeassistant.components.sensor import SensorDeviceClass
from homeassistant.const import (
UnitOfElectricCurrent,
Expand Down
1 change: 1 addition & 0 deletions tests/devices/test_woox_r4028_powerstrip.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests for the Woox R4028 powerstrip."""

from homeassistant.components.switch import SwitchDeviceClass
from homeassistant.const import UnitOfTime

Expand Down
1 change: 1 addition & 0 deletions tests/devices/test_zx_g30_alarm.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests for the ZX G30 Alarm Control Panel."""

from homeassistant.components.alarm_control_panel import (
AlarmControlPanelEntityFeature as Feature,
)
Expand Down
1 change: 1 addition & 0 deletions tests/test_alarm_control_panel.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests for the alarm_control_panel entity."""

from unittest.mock import AsyncMock, Mock

import pytest
Expand Down
1 change: 1 addition & 0 deletions tests/test_binary_sensor.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests for the binary_sensor entity."""

from unittest.mock import AsyncMock, Mock

import pytest
Expand Down
1 change: 1 addition & 0 deletions tests/test_button.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests for the button entity."""

from unittest.mock import AsyncMock, Mock

import pytest
Expand Down
1 change: 1 addition & 0 deletions tests/test_camera.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests for the camera entity."""

from unittest.mock import AsyncMock, Mock

import pytest
Expand Down
Loading

0 comments on commit d0dc800

Please sign in to comment.