From 82212f61fbe91d1500f77675e04ab8b4083a3389 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 25 Nov 2024 19:40:39 +0000 Subject: [PATCH 1/2] chore(pre-commit.ci): pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/commitizen-tools/commitizen: v3.2.2 → v3.31.0](https://github.com/commitizen-tools/commitizen/compare/v3.2.2...v3.31.0) - [github.com/pre-commit/pre-commit-hooks: v4.5.0 → v5.0.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.5.0...v5.0.0) - [github.com/pre-commit/mirrors-prettier: v3.1.0 → v4.0.0-alpha.8](https://github.com/pre-commit/mirrors-prettier/compare/v3.1.0...v4.0.0-alpha.8) - [github.com/asottile/pyupgrade: v3.15.0 → v3.19.0](https://github.com/asottile/pyupgrade/compare/v3.15.0...v3.19.0) - [github.com/psf/black-pre-commit-mirror: 23.12.1 → 24.10.0](https://github.com/psf/black-pre-commit-mirror/compare/23.12.1...24.10.0) - [github.com/codespell-project/codespell: v2.2.6 → v2.3.0](https://github.com/codespell-project/codespell/compare/v2.2.6...v2.3.0) --- .pre-commit-config.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 33e85663..75102dc9 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,7 +1,7 @@ # See https://pre-commit.com for more information # See https://pre-commit.com/hooks.html for more hooks exclude: "CHANGELOG.md" -default_stages: [commit] +default_stages: [pre-commit] ci: autofix_commit_msg: "chore(pre-commit.ci): auto fixes" @@ -9,12 +9,12 @@ ci: repos: - repo: https://github.com/commitizen-tools/commitizen - rev: v3.2.2 + rev: v3.31.0 hooks: - id: commitizen stages: [commit-msg] - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.5.0 + rev: v5.0.0 hooks: - id: debug-statements - id: check-builtin-literals @@ -29,11 +29,11 @@ repos: - id: trailing-whitespace - id: debug-statements - repo: https://github.com/pre-commit/mirrors-prettier - rev: v3.1.0 + rev: v4.0.0-alpha.8 hooks: - id: prettier - repo: https://github.com/asottile/pyupgrade - rev: v3.15.0 + rev: v3.19.0 hooks: - id: pyupgrade - repo: https://github.com/PyCQA/isort @@ -41,10 +41,10 @@ repos: hooks: - id: isort - repo: https://github.com/psf/black-pre-commit-mirror - rev: 23.12.1 + rev: 24.10.0 hooks: - id: black - repo: https://github.com/codespell-project/codespell - rev: v2.2.6 + rev: v2.3.0 hooks: - id: codespell From 4a1de20d1ea714c36ce511008e23c20cc647238e Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 25 Nov 2024 19:40:50 +0000 Subject: [PATCH 2/2] chore(pre-commit.ci): auto fixes --- switchbot/__init__.py | 1 + switchbot/adv_parsers/blind_tilt.py | 1 + switchbot/adv_parsers/bot.py | 1 + switchbot/adv_parsers/bulb.py | 1 + switchbot/adv_parsers/ceiling_light.py | 1 + switchbot/adv_parsers/contact.py | 1 + switchbot/adv_parsers/curtain.py | 1 + switchbot/adv_parsers/humidifier.py | 1 + switchbot/adv_parsers/light_strip.py | 1 + switchbot/adv_parsers/lock.py | 1 + switchbot/adv_parsers/meter.py | 1 + switchbot/adv_parsers/motion.py | 1 + switchbot/adv_parsers/plug.py | 1 + switchbot/adv_parsers/relay_switch.py | 1 + switchbot/devices/base_cover.py | 1 + switchbot/devices/blind_tilt.py | 1 + switchbot/devices/bot.py | 1 + switchbot/devices/curtain.py | 1 + switchbot/devices/device.py | 1 + switchbot/devices/humidifier.py | 1 + switchbot/devices/lock.py | 1 + switchbot/devices/plug.py | 1 + switchbot/enum.py | 1 + switchbot/models.py | 1 + 24 files changed, 24 insertions(+) diff --git a/switchbot/__init__.py b/switchbot/__init__.py index acb5353a..de1adff3 100644 --- a/switchbot/__init__.py +++ b/switchbot/__init__.py @@ -1,4 +1,5 @@ """Library to handle connection with Switchbot.""" + from __future__ import annotations from bleak_retry_connector import ( diff --git a/switchbot/adv_parsers/blind_tilt.py b/switchbot/adv_parsers/blind_tilt.py index f95fa793..b88ad7ed 100644 --- a/switchbot/adv_parsers/blind_tilt.py +++ b/switchbot/adv_parsers/blind_tilt.py @@ -1,4 +1,5 @@ """Library to handle connection with Switchbot.""" + from __future__ import annotations diff --git a/switchbot/adv_parsers/bot.py b/switchbot/adv_parsers/bot.py index 147f04cc..a7e25ca4 100644 --- a/switchbot/adv_parsers/bot.py +++ b/switchbot/adv_parsers/bot.py @@ -1,4 +1,5 @@ """Library to handle connection with Switchbot.""" + from __future__ import annotations diff --git a/switchbot/adv_parsers/bulb.py b/switchbot/adv_parsers/bulb.py index e31dc172..7c03b368 100644 --- a/switchbot/adv_parsers/bulb.py +++ b/switchbot/adv_parsers/bulb.py @@ -1,4 +1,5 @@ """Bulb parser.""" + from __future__ import annotations diff --git a/switchbot/adv_parsers/ceiling_light.py b/switchbot/adv_parsers/ceiling_light.py index ca1ef2ff..a8914cb2 100644 --- a/switchbot/adv_parsers/ceiling_light.py +++ b/switchbot/adv_parsers/ceiling_light.py @@ -1,4 +1,5 @@ """Ceiling Light adv parser.""" + from __future__ import annotations import logging diff --git a/switchbot/adv_parsers/contact.py b/switchbot/adv_parsers/contact.py index d3c1f3cd..0368af37 100644 --- a/switchbot/adv_parsers/contact.py +++ b/switchbot/adv_parsers/contact.py @@ -1,4 +1,5 @@ """Contact sensor parser.""" + from __future__ import annotations diff --git a/switchbot/adv_parsers/curtain.py b/switchbot/adv_parsers/curtain.py index 336c714e..b04f288b 100644 --- a/switchbot/adv_parsers/curtain.py +++ b/switchbot/adv_parsers/curtain.py @@ -1,4 +1,5 @@ """Library to handle connection with Switchbot.""" + from __future__ import annotations diff --git a/switchbot/adv_parsers/humidifier.py b/switchbot/adv_parsers/humidifier.py index 2c782151..c4598ce6 100644 --- a/switchbot/adv_parsers/humidifier.py +++ b/switchbot/adv_parsers/humidifier.py @@ -1,4 +1,5 @@ """Humidifier adv parser.""" + from __future__ import annotations import logging diff --git a/switchbot/adv_parsers/light_strip.py b/switchbot/adv_parsers/light_strip.py index 8953e2ec..8802327f 100644 --- a/switchbot/adv_parsers/light_strip.py +++ b/switchbot/adv_parsers/light_strip.py @@ -1,4 +1,5 @@ """Light strip adv parser.""" + from __future__ import annotations diff --git a/switchbot/adv_parsers/lock.py b/switchbot/adv_parsers/lock.py index 30f99644..dacdd32a 100644 --- a/switchbot/adv_parsers/lock.py +++ b/switchbot/adv_parsers/lock.py @@ -1,4 +1,5 @@ """Lock parser.""" + from __future__ import annotations import logging diff --git a/switchbot/adv_parsers/meter.py b/switchbot/adv_parsers/meter.py index 72c8e7ab..ac7ecaf2 100644 --- a/switchbot/adv_parsers/meter.py +++ b/switchbot/adv_parsers/meter.py @@ -1,4 +1,5 @@ """Meter parser.""" + from __future__ import annotations import struct diff --git a/switchbot/adv_parsers/motion.py b/switchbot/adv_parsers/motion.py index 5031fe3d..6d2bc6f3 100644 --- a/switchbot/adv_parsers/motion.py +++ b/switchbot/adv_parsers/motion.py @@ -1,4 +1,5 @@ """Motion sensor parser.""" + from __future__ import annotations diff --git a/switchbot/adv_parsers/plug.py b/switchbot/adv_parsers/plug.py index 4665b77e..c4eefca8 100644 --- a/switchbot/adv_parsers/plug.py +++ b/switchbot/adv_parsers/plug.py @@ -1,4 +1,5 @@ """Library to handle connection with Switchbot.""" + from __future__ import annotations diff --git a/switchbot/adv_parsers/relay_switch.py b/switchbot/adv_parsers/relay_switch.py index fb631f64..9bea09bc 100644 --- a/switchbot/adv_parsers/relay_switch.py +++ b/switchbot/adv_parsers/relay_switch.py @@ -1,4 +1,5 @@ """Relay Switch adv parser.""" + from __future__ import annotations diff --git a/switchbot/devices/base_cover.py b/switchbot/devices/base_cover.py index d5cdcb86..2efe4072 100644 --- a/switchbot/devices/base_cover.py +++ b/switchbot/devices/base_cover.py @@ -1,4 +1,5 @@ """Library to handle connection with Switchbot.""" + from __future__ import annotations import logging diff --git a/switchbot/devices/blind_tilt.py b/switchbot/devices/blind_tilt.py index ab69e0d2..a32b88ca 100644 --- a/switchbot/devices/blind_tilt.py +++ b/switchbot/devices/blind_tilt.py @@ -1,4 +1,5 @@ """Library to handle connection with Switchbot.""" + from __future__ import annotations import logging diff --git a/switchbot/devices/bot.py b/switchbot/devices/bot.py index 1b356952..0099a6db 100644 --- a/switchbot/devices/bot.py +++ b/switchbot/devices/bot.py @@ -1,4 +1,5 @@ """Library to handle connection with Switchbot.""" + from __future__ import annotations import logging diff --git a/switchbot/devices/curtain.py b/switchbot/devices/curtain.py index 52ba7bf0..ac0a8d13 100644 --- a/switchbot/devices/curtain.py +++ b/switchbot/devices/curtain.py @@ -1,4 +1,5 @@ """Library to handle connection with Switchbot.""" + from __future__ import annotations import logging diff --git a/switchbot/devices/device.py b/switchbot/devices/device.py index 622db640..b618e6d4 100644 --- a/switchbot/devices/device.py +++ b/switchbot/devices/device.py @@ -1,4 +1,5 @@ """Library to handle connection with Switchbot.""" + from __future__ import annotations import asyncio diff --git a/switchbot/devices/humidifier.py b/switchbot/devices/humidifier.py index 456afbd6..f4915cfe 100644 --- a/switchbot/devices/humidifier.py +++ b/switchbot/devices/humidifier.py @@ -1,4 +1,5 @@ """Library to handle connection with Switchbot.""" + from __future__ import annotations import time diff --git a/switchbot/devices/lock.py b/switchbot/devices/lock.py index 6742123e..8c4fe319 100644 --- a/switchbot/devices/lock.py +++ b/switchbot/devices/lock.py @@ -1,4 +1,5 @@ """Library to handle connection with Switchbot Lock.""" + from __future__ import annotations import asyncio diff --git a/switchbot/devices/plug.py b/switchbot/devices/plug.py index 76cef258..e3ca6164 100644 --- a/switchbot/devices/plug.py +++ b/switchbot/devices/plug.py @@ -1,4 +1,5 @@ """Library to handle connection with Switchbot.""" + from __future__ import annotations import time diff --git a/switchbot/enum.py b/switchbot/enum.py index 81561425..9eb76c24 100644 --- a/switchbot/enum.py +++ b/switchbot/enum.py @@ -1,4 +1,5 @@ """Enum backports from standard lib.""" + from __future__ import annotations from enum import Enum diff --git a/switchbot/models.py b/switchbot/models.py index 2507562e..0405f8c7 100644 --- a/switchbot/models.py +++ b/switchbot/models.py @@ -1,4 +1,5 @@ """Library to handle connection with Switchbot.""" + from __future__ import annotations from dataclasses import dataclass