mirror of
https://github.com/jupyter/notebook.git
synced 2025-01-30 12:11:32 +08:00
Update pre-commit hooks (#7561)
* chore: update pre-commit hooks updates: - [github.com/pre-commit/pre-commit-hooks: v4.5.0 → v5.0.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.5.0...v5.0.0) - [github.com/python-jsonschema/check-jsonschema: 0.27.4 → 0.30.0](https://github.com/python-jsonschema/check-jsonschema/compare/0.27.4...0.30.0) - [github.com/codespell-project/codespell: v2.2.6 → v2.3.0](https://github.com/codespell-project/codespell/compare/v2.2.6...v2.3.0) - [github.com/pre-commit/mirrors-mypy: v1.8.0 → v1.14.1](https://github.com/pre-commit/mirrors-mypy/compare/v1.8.0...v1.14.1) - [github.com/astral-sh/ruff-pre-commit: v0.2.0 → v0.8.6](https://github.com/astral-sh/ruff-pre-commit/compare/v0.2.0...v0.8.6) - [github.com/scientific-python/cookie: 2024.01.24 → 2024.08.19](https://github.com/scientific-python/cookie/compare/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>
This commit is contained in:
parent
4680e1a675
commit
99af31ec21
@ -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]']
|
||||
|
@ -109,7 +109,7 @@ _version_py = os.path.join(here, "../../notebook/_version.py")
|
||||
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__"]
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
"""CLI entry point for notebook."""
|
||||
|
||||
import sys
|
||||
|
||||
from notebook.app import main
|
||||
|
@ -1,4 +1,5 @@
|
||||
"""Version info for notebook."""
|
||||
|
||||
# Copyright (c) Jupyter Development Team.
|
||||
# Distributed under the terms of the Modified BSD License.
|
||||
import re
|
||||
|
@ -1,4 +1,5 @@
|
||||
"""Jupyter notebook application."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import os
|
||||
|
@ -32,7 +32,7 @@ workspaces_dir = pytest.fixture(lambda tmp_path: mkdir(tmp_path, "workspaces"))
|
||||
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( # PLR0913
|
||||
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)
|
||||
|
@ -6,7 +6,7 @@ from tornado.httpclient import HTTPClientError
|
||||
from notebook.app import JupyterNotebookApp, NotebookHandler, TreeHandler
|
||||
|
||||
|
||||
@pytest.fixture()
|
||||
@pytest.fixture
|
||||
def notebooks(jp_create_notebook, notebookapp):
|
||||
nbpaths = (
|
||||
"notebook1.ipynb",
|
||||
|
Loading…
Reference in New Issue
Block a user