Skip to content

Commit

Permalink
Merge branch 'master' into de_dupe
Browse files Browse the repository at this point in the history
  • Loading branch information
bdraco authored Dec 20, 2024
2 parents 6eebc53 + 8f3172a commit 1ec3edc
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 9 deletions.
23 changes: 16 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,26 @@ repos:
hooks:
- id: prettier
- repo: https://github.com/asottile/pyupgrade
rev: v3.19.0
rev: v3.19.1
hooks:
- id: pyupgrade
- repo: https://github.com/PyCQA/isort
rev: 5.13.2
args: [--py311-plus]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.4
hooks:
- id: isort
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 24.10.0
- id: ruff
args: [--fix]
- id: ruff-format
- repo: https://github.com/cdce8p/python-typing-update
rev: v0.7.0
hooks:
- id: black
- id: python-typing-update
stages: [manual]
args:
- --py311-plus
- --force
- --keep-updates
files: ^(switchbot)/.+\.py$
- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
hooks:
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
author="Daniel Hjelseth Hoyer",
url="https://github.com/sblibs/pySwitchbot/",
license="MIT",
python_requires=">=3.11",
classifiers=[
"Development Status :: 3 - Alpha",
"Environment :: Other Environment",
Expand Down
5 changes: 3 additions & 2 deletions switchbot/devices/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
import time
from dataclasses import replace
from enum import Enum
from typing import Any, Callable, TypeVar, cast
from typing import Any, TypeVar, cast
from collections.abc import Callable
from uuid import UUID

import aiohttp
Expand Down Expand Up @@ -509,7 +510,7 @@ async def _execute_command_locked(self, key: str, command: bytes) -> bytes:
timeout_expired = False
try:
notify_msg = await self._notify_future
except asyncio.TimeoutError:
except TimeoutError:
timeout_expired = True
raise
finally:
Expand Down

0 comments on commit 1ec3edc

Please sign in to comment.