Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update pre-commit hooks #7561

Merged
merged 4 commits into from
Jan 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading