Skip to content

Commit

Permalink
chore(pre-commit): update pre-commit hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
XuehaiPan committed Oct 26, 2024
1 parent 878200d commit a876f6e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ ci:
autofix_prs: true
autofix_commit_msg: "fix: [pre-commit.ci] auto fixes [...]"
autoupdate_commit_msg: "chore(pre-commit): [pre-commit.ci] autoupdate"
default_stages: [commit, push, manual]
default_stages: [pre-commit, pre-push, manual]
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: check-symlinks
- id: destroyed-symlinks
Expand All @@ -25,7 +25,7 @@ repos:
- id: debug-statements
- id: double-quote-string-fixer
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.8
rev: v0.7.1
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
Expand All @@ -34,11 +34,11 @@ repos:
hooks:
- id: isort
- repo: https://github.com/psf/black
rev: 24.8.0
rev: 24.10.0
hooks:
- id: black
- repo: https://github.com/asottile/pyupgrade
rev: v3.17.0
rev: v3.19.0
hooks:
- id: pyupgrade
args: [--py37-plus] # sync with requires-python
Expand Down
2 changes: 1 addition & 1 deletion nvitop/api/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -1017,7 +1017,7 @@ def take_snapshots( # batched version of `as_snapshot`
"""
cache: dict[int, Snapshot] = {}
context: Callable[[], contextlib.AbstractContextManager[None]] = (
cls.failsafe if failsafe else contextlib.nullcontext # type: ignore[assignment]
cls.failsafe if failsafe else contextlib.nullcontext
)
with context():
return [
Expand Down

0 comments on commit a876f6e

Please sign in to comment.