chore(pre-commit): update pre-commit hooks

This commit is contained in:
Xuehai Pan 2025-10-07 19:13:59 +08:00
parent 8522195960
commit a5f8a525c7
3 changed files with 4 additions and 4 deletions

View file

@ -26,7 +26,7 @@ repos:
fail_fast: true
- id: debug-statements
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.12.12
rev: v0.13.3
hooks:
- id: ruff-check
args: [--fix, --exit-non-zero-on-fix]
@ -38,7 +38,7 @@ repos:
- id: codespell
additional_dependencies: [".[toml]"]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.17.1
rev: v1.18.2
hooks:
- id: mypy
exclude: |

View file

@ -735,7 +735,7 @@ class Snapshot:
def keys(self) -> Iterable[str]:
# pylint: disable-next=line-too-long
"""Support ``**`` dictionary unpack ``{**snapshot}`` / ``dict(**snapshot)`` syntax and ``dict(snapshot)`` dictionary conversion."""
return KeysView(self) # type: ignore[arg-type]
return KeysView(self)
Method = TypeVar('Method', bound=Callable[..., Any])

View file

@ -403,7 +403,7 @@ class KeyBuffer: # pylint: disable=too-many-instance-attributes
if self.passive_key in self.pointer:
self.result = self.pointer[self.passive_key] # type: ignore[assignment]
else:
self.result = self.pointer # type: ignore[unreachable]
self.result = self.pointer
self.finished_parsing = True
else:
self.finished_parsing = True