Skip to content

Commit 99af31e

Browse files
Update pre-commit hooks (#7561)
* 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>
1 parent 4680e1a commit 99af31e

File tree

7 files changed

+13
-10
lines changed

7 files changed

+13
-10
lines changed

.pre-commit-config.yaml

+6-6
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ ci:
44

55
repos:
66
- repo: https://github.com/pre-commit/pre-commit-hooks
7-
rev: v4.5.0
7+
rev: v5.0.0
88
hooks:
99
- id: check-case-conflict
1010
- id: check-ast
@@ -21,12 +21,12 @@ repos:
2121
- id: trailing-whitespace
2222

2323
- repo: https://github.com/python-jsonschema/check-jsonschema
24-
rev: 0.27.4
24+
rev: 0.30.0
2525
hooks:
2626
- id: check-github-workflows
2727

2828
- repo: https://github.com/codespell-project/codespell
29-
rev: 'v2.2.6'
29+
rev: 'v2.3.0'
3030
hooks:
3131
- id: codespell
3232
args: ['-L', 'hart,noteable', '--skip', "*.spec.ts"]
@@ -38,7 +38,7 @@ repos:
3838
)$
3939
4040
- repo: https://github.com/pre-commit/mirrors-mypy
41-
rev: "v1.8.0"
41+
rev: "v1.14.1"
4242
hooks:
4343
- id: mypy
4444
files: "^notebook"
@@ -54,7 +54,7 @@ repos:
5454
- id: rst-inline-touching-normal
5555

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

6767
- repo: https://github.com/scientific-python/cookie
68-
rev: '2024.01.24'
68+
rev: '2024.08.19'
6969
hooks:
7070
- id: sp-repo-review
7171
additional_dependencies: ['repo-review[cli]']

docs/source/conf.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@
109109
version_ns = {}
110110
exec(compile(open(_version_py).read(), _version_py, "exec"), version_ns) # noqa: S102, SIM115
111111
# The short X.Y version.
112-
version = "%i.%i" % version_ns["version_info"][:2]
112+
version = "{}.{}".format(*version_ns["version_info"][:2])
113113
# The full version, including alpha/beta/rc tags.
114114
release = version_ns["__version__"]
115115

notebook/__main__.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""CLI entry point for notebook."""
2+
23
import sys
34

45
from notebook.app import main

notebook/_version.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Version info for notebook."""
2+
23
# Copyright (c) Jupyter Development Team.
34
# Distributed under the terms of the Modified BSD License.
45
import re

notebook/app.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Jupyter notebook application."""
2+
23
from __future__ import annotations
34

45
import os

tests/conftest.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def mkdir(tmp_path, *parts):
3232
labextensions_dir = pytest.fixture(lambda tmp_path: mkdir(tmp_path, "labextensions_dir"))
3333

3434

35-
@pytest.fixture()
35+
@pytest.fixture
3636
def make_notebook_app( # PLR0913
3737
jp_root_dir,
3838
jp_template_dir,
@@ -131,7 +131,7 @@ def _make_notebook_app(**kwargs):
131131
return _make_notebook_app
132132

133133

134-
@pytest.fixture()
134+
@pytest.fixture
135135
def notebookapp(jp_serverapp, make_notebook_app):
136136
app = make_notebook_app()
137137
app._link_jupyter_server_extension(jp_serverapp)

tests/test_app.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from notebook.app import JupyterNotebookApp, NotebookHandler, TreeHandler
77

88

9-
@pytest.fixture()
9+
@pytest.fixture
1010
def notebooks(jp_create_notebook, notebookapp):
1111
nbpaths = (
1212
"notebook1.ipynb",

0 commit comments

Comments
 (0)