From a876f6e7118946134338ab7605d385c6d09109a6 Mon Sep 17 00:00:00 2001 From: Xuehai Pan Date: Sat, 26 Oct 2024 20:38:40 +0800 Subject: [PATCH] chore(pre-commit): update pre-commit hooks --- .pre-commit-config.yaml | 10 +++++----- nvitop/api/process.py | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 78514e3d..d2381b89 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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 @@ -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] @@ -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 diff --git a/nvitop/api/process.py b/nvitop/api/process.py index dfae15a8..d06b56f7 100644 --- a/nvitop/api/process.py +++ b/nvitop/api/process.py @@ -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 [