diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 397ddf61ae..0924c477db 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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 @@ -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"] @@ -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" @@ -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 ] @@ -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]'] diff --git a/docs/source/conf.py b/docs/source/conf.py index 27089c0955..1da6131c4e 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -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__"] diff --git a/notebook/__main__.py b/notebook/__main__.py index c05250a257..403106406c 100644 --- a/notebook/__main__.py +++ b/notebook/__main__.py @@ -1,4 +1,5 @@ """CLI entry point for notebook.""" + import sys from notebook.app import main diff --git a/notebook/_version.py b/notebook/_version.py index 55e5766f7f..864b08edbe 100644 --- a/notebook/_version.py +++ b/notebook/_version.py @@ -1,4 +1,5 @@ """Version info for notebook.""" + # Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. import re diff --git a/notebook/app.py b/notebook/app.py index 9a969b50a7..bfd0dce2b9 100644 --- a/notebook/app.py +++ b/notebook/app.py @@ -1,4 +1,5 @@ """Jupyter notebook application.""" + from __future__ import annotations import os diff --git a/tests/conftest.py b/tests/conftest.py index 1376bd60d5..4cf673508e 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -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, @@ -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) diff --git a/tests/test_app.py b/tests/test_app.py index 93a9a77e68..7b8816c45c 100644 --- a/tests/test_app.py +++ b/tests/test_app.py @@ -6,7 +6,7 @@ from notebook.app import JupyterNotebookApp, NotebookHandler, TreeHandler -@pytest.fixture() +@pytest.fixture def notebooks(jp_create_notebook, notebookapp): nbpaths = ( "notebook1.ipynb",