Skip to content

Commit 763aa6a

Browse files
authored
Update pre-commit hooks and enable renovate for it (#178)
1 parent f65ad37 commit 763aa6a

File tree

6 files changed

+18
-17
lines changed

6 files changed

+18
-17
lines changed

.github/renovate.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,8 @@
2828
"automerge": true
2929
}
3030
],
31+
"pre-commit": {
32+
"enabled": true
33+
},
3134
"rebaseWhen": "behind-base-branch"
3235
}

.pre-commit-config.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
repos:
33
- repo: https://github.com/astral-sh/ruff-pre-commit
4-
rev: v0.6.4
4+
rev: v0.14.5
55
hooks:
66
- id: ruff
77
name: 🐶 Ruff lint
@@ -13,15 +13,15 @@ repos:
1313
name: 🐶 Ruff format
1414

1515
- repo: https://github.com/asottile/pyupgrade
16-
rev: v3.17.0
16+
rev: v3.21.1
1717
hooks:
1818
- id: pyupgrade
1919
name: ⬆️ Upgrade Python syntax
2020
args:
2121
- --py312-plus
2222

2323
- repo: https://github.com/pre-commit/pre-commit-hooks
24-
rev: v4.6.0
24+
rev: v6.0.0
2525
hooks:
2626
- id: check-added-large-files
2727
name: 🗜️ Check for added large files
@@ -86,20 +86,20 @@ repos:
8686
- id: trailing-whitespace
8787
name: ✄ Trim trailing whitespace
8888

89-
- repo: https://github.com/pre-commit/mirrors-prettier
90-
rev: v3.1.0
89+
- repo: https://github.com/rbubley/mirrors-prettier
90+
rev: v3.6.2
9191
hooks:
9292
- id: prettier
9393
name: 💄 Ensuring files are prettier
9494
additional_dependencies:
95-
- prettier@3.3.3
96-
- prettier-plugin-sort-json@3.1.0
95+
- prettier@3.6.2
96+
- prettier-plugin-sort-json@4.1.1
9797
exclude_types:
9898
- python
9999
exclude: ^uv.lock$
100100

101101
- repo: https://github.com/adrienverge/yamllint.git
102-
rev: v1.35.1
102+
rev: v1.37.1
103103
hooks:
104104
- id: yamllint
105105
name: 🎗 Check YAML files with yamllint

go2rtc_client/exceptions.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,13 @@ def __str__(self) -> str:
4545
)
4646

4747

48-
def handle_error[**_P, _R](
49-
func: Callable[_P, Coroutine[Any, Any, _R]],
50-
) -> Callable[_P, Coroutine[Any, Any, _R]]:
48+
def handle_error[**P, R](
49+
func: Callable[P, Coroutine[Any, Any, R]],
50+
) -> Callable[P, Coroutine[Any, Any, R]]:
5151
"""Wrap aiohttp and mashumaro errors."""
5252

5353
@wraps(func)
54-
async def _func(*args: _P.args, **kwargs: _P.kwargs) -> _R:
54+
async def _func(*args: P.args, **kwargs: P.kwargs) -> R:
5555
try:
5656
return await func(*args, **kwargs)
5757
except (

go2rtc_client/ws/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@
1111
)
1212

1313
__all__ = [
14+
"Go2RtcWsClient",
1415
"ReceiveMessages",
1516
"SendMessages",
16-
"Go2RtcWsClient",
17+
"WebRTCAnswer",
1718
"WebRTCCandidate",
1819
"WebRTCOffer",
19-
"WebRTCAnswer",
2020
"WsError",
2121
]

go2rtc_client/ws/messages.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from mashumaro.mixins.orjson import DataClassORJSONMixin
1111
from mashumaro.types import Discriminator
1212
from webrtc_models import (
13-
RTCIceServer, # noqa: TCH002 # Mashumaro needs the import to generate the correct code
13+
RTCIceServer, # noqa: TC002 # Mashumaro needs the import to generate the correct code
1414
)
1515

1616

pyproject.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,6 @@ asyncio_mode = "auto"
162162

163163
[tool.ruff.lint]
164164
ignore = [
165-
"ANN101", # Self... explanatory
166-
"ANN102", # cls... just as useless
167165
"ANN401", # Opinioated warning on disallowing dynamically typed expressions
168166
"COM812", # Recommended to disable due conflicts with ruff format
169167
"D203", # Conflicts with other rules

0 commit comments

Comments
 (0)