Skip to content

Commit

Permalink
chore: add pyupgrade to pre-commit (#71)
Browse files Browse the repository at this point in the history
  • Loading branch information
bdraco authored Jan 22, 2025
1 parent 6ed7384 commit fc3dc36
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ repos:
hooks:
- id: prettier
args: ["--tab-width", "2"]
- repo: https://github.com/asottile/pyupgrade
rev: v3.19.1
hooks:
- id: pyupgrade
args: [--py311-plus]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.9.2
hooks:
Expand Down
2 changes: 1 addition & 1 deletion src/bleak_esphome/backend/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ async def _async_wrap_bluetooth_operation(
try:
return await func(self, *args, **kwargs)
except TimeoutAPIError as err:
raise asyncio.TimeoutError(str(err)) from err
raise TimeoutError(str(err)) from err
except BluetoothConnectionDroppedError as ex:
_LOGGER.debug(
"%s: BLE device disconnected during %s operation",
Expand Down

0 comments on commit fc3dc36

Please sign in to comment.