From faeac9c548e43822697c7d3ef1e5da4f3ae0f92e Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 23 Jul 2024 10:17:37 -0300 Subject: [PATCH] chore(ci): pre-commit autoupdate (#237) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - https://github.com/astral-sh/ruff-pre-commit/compare/v0.5.2...v0.5.4 - https://github.com/commitizen-tools/commitizen/compare/v3.27.0...v3.28.0 Co-authored-by: Lucas MindĂȘllo de Andrade --- .pre-commit-config.yaml | 4 ++-- midealocal/devices/e2/__init__.py | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6accf789..cd040734 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -16,14 +16,14 @@ repos: - id: no-commit-to-branch args: ["--branch", "main"] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.5.2 + rev: v0.5.4 hooks: - id: ruff args: - --fix - id: ruff-format - repo: https://github.com/commitizen-tools/commitizen - rev: v3.27.0 + rev: v3.28.0 hooks: - id: commitizen stages: [commit-msg] diff --git a/midealocal/devices/e2/__init__.py b/midealocal/devices/e2/__init__.py index 98748e95..ebc874f3 100644 --- a/midealocal/devices/e2/__init__.py +++ b/midealocal/devices/e2/__init__.py @@ -103,8 +103,7 @@ def _normalize_old_protocol(self, value: str | bool | int) -> OldProtocol: if return_value == OldProtocol.auto: result = ( self.subtype <= E2SubType.T82 - or self.subtype == E2SubType.T85 - or self.subtype == E2SubType.T36353 + or self.subtype in [E2SubType.T85, E2SubType.T36353], ) return_value = OldProtocol.true if result else OldProtocol.false if isinstance(value, bool | int):