Skip to content

Commit

Permalink
Update pre-commit hooks (#7561)
Browse files Browse the repository at this point in the history
* chore: update pre-commit hooks

updates:
- [github.com/pre-commit/pre-commit-hooks: v4.5.0 → v5.0.0](pre-commit/pre-commit-hooks@v4.5.0...v5.0.0)
- [github.com/python-jsonschema/check-jsonschema: 0.27.4 → 0.30.0](python-jsonschema/check-jsonschema@0.27.4...0.30.0)
- [github.com/codespell-project/codespell: v2.2.6 → v2.3.0](codespell-project/codespell@v2.2.6...v2.3.0)
- [github.com/pre-commit/mirrors-mypy: v1.8.0 → v1.14.1](pre-commit/mirrors-mypy@v1.8.0...v1.14.1)
- [github.com/astral-sh/ruff-pre-commit: v0.2.0 → v0.8.6](astral-sh/ruff-pre-commit@v0.2.0...v0.8.6)
- [github.com/scientific-python/cookie: 2024.01.24 → 2024.08.19](scientific-python/cookie@2024.01.24...2024.08.19)

* lint

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* more ruff fixes

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
jtpio and pre-commit-ci[bot] authored Jan 7, 2025
1 parent 4680e1a commit 99af31e
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 10 deletions.
12 changes: 6 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ci:

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v5.0.0
hooks:
- id: check-case-conflict
- id: check-ast
Expand All @@ -21,12 +21,12 @@ repos:
- id: trailing-whitespace

- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.27.4
rev: 0.30.0
hooks:
- id: check-github-workflows

- repo: https://github.com/codespell-project/codespell
rev: 'v2.2.6'
rev: 'v2.3.0'
hooks:
- id: codespell
args: ['-L', 'hart,noteable', '--skip', "*.spec.ts"]
Expand All @@ -38,7 +38,7 @@ repos:
)$
- repo: https://github.com/pre-commit/mirrors-mypy
rev: "v1.8.0"
rev: "v1.14.1"
hooks:
- id: mypy
files: "^notebook"
Expand All @@ -54,7 +54,7 @@ repos:
- id: rst-inline-touching-normal

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.2.0
rev: v0.8.6
hooks:
- id: ruff
types_or: [ python, jupyter ]
Expand All @@ -65,7 +65,7 @@ repos:
exclude: '^docs/source/examples/Notebook/Importing Notebooks.ipynb'

- repo: https://github.com/scientific-python/cookie
rev: '2024.01.24'
rev: '2024.08.19'
hooks:
- id: sp-repo-review
additional_dependencies: ['repo-review[cli]']
Expand Down
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
version_ns = {}
exec(compile(open(_version_py).read(), _version_py, "exec"), version_ns) # noqa: S102, SIM115
# The short X.Y version.
version = "%i.%i" % version_ns["version_info"][:2]
version = "{}.{}".format(*version_ns["version_info"][:2])
# The full version, including alpha/beta/rc tags.
release = version_ns["__version__"]

Expand Down
1 change: 1 addition & 0 deletions notebook/__main__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""CLI entry point for notebook."""

import sys

from notebook.app import main
Expand Down
1 change: 1 addition & 0 deletions notebook/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Version info for notebook."""

# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
import re
Expand Down
1 change: 1 addition & 0 deletions notebook/app.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Jupyter notebook application."""

from __future__ import annotations

import os
Expand Down
4 changes: 2 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def mkdir(tmp_path, *parts):
labextensions_dir = pytest.fixture(lambda tmp_path: mkdir(tmp_path, "labextensions_dir"))


@pytest.fixture()
@pytest.fixture
def make_notebook_app( # PLR0913
jp_root_dir,
jp_template_dir,
Expand Down Expand Up @@ -131,7 +131,7 @@ def _make_notebook_app(**kwargs):
return _make_notebook_app


@pytest.fixture()
@pytest.fixture
def notebookapp(jp_serverapp, make_notebook_app):
app = make_notebook_app()
app._link_jupyter_server_extension(jp_serverapp)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from notebook.app import JupyterNotebookApp, NotebookHandler, TreeHandler


@pytest.fixture()
@pytest.fixture
def notebooks(jp_create_notebook, notebookapp):
nbpaths = (
"notebook1.ipynb",
Expand Down

0 comments on commit 99af31e

Please sign in to comment.