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 [