Skip to content

Commit

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

updates:
- [github.com/python-jsonschema/check-jsonschema: 0.27.4 → 0.28.1](python-jsonschema/check-jsonschema@0.27.4...0.28.1)
- [github.com/pre-commit/mirrors-mypy: v1.8.0 → v1.9.0](pre-commit/mirrors-mypy@v1.8.0...v1.9.0)
- [github.com/astral-sh/ruff-pre-commit: v0.2.0 → v0.3.5](astral-sh/ruff-pre-commit@v0.2.0...v0.3.5)
- [github.com/scientific-python/cookie: 2024.01.24 → 2024.03.10](scientific-python/cookie@2024.01.24...2024.03.10)

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

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

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
pre-commit-ci[bot] authored Apr 3, 2024
1 parent 4791c59 commit c55de2b
Show file tree
Hide file tree
Showing 13 changed files with 40 additions and 33 deletions.
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ repos:
- id: trailing-whitespace

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

Expand Down Expand Up @@ -56,7 +56,7 @@ repos:
- id: rst-inline-touching-normal

- repo: https://github.com/pre-commit/mirrors-mypy
rev: "v1.8.0"
rev: "v1.9.0"
hooks:
- id: mypy
files: "^nbformat"
Expand All @@ -65,7 +65,7 @@ repos:
["jsonschema>=2.6", "traitlets>=5.13", "jupyter_core>5.4"]

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.2.0
rev: v0.3.5
hooks:
- id: ruff
types_or: [python, jupyter]
Expand All @@ -76,7 +76,7 @@ repos:
types_or: [python, jupyter]

- repo: https://github.com/scientific-python/cookie
rev: "2024.01.24"
rev: "2024.03.10"
hooks:
- id: sp-repo-review
additional_dependencies: ["repo-review[cli]"]
1 change: 1 addition & 0 deletions nbformat/_struct.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Can probably be replaced by types.SimpleNamespace from Python 3.3
"""

from __future__ import annotations

from typing import Any, Dict
Expand Down
1 change: 1 addition & 0 deletions nbformat/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""The version information for nbformat."""

# Use "hatchling version xx.yy.zz" to handle version changes
from __future__ import annotations

Expand Down
1 change: 1 addition & 0 deletions nbformat/corpus/words.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Generate a corpus id."""

from __future__ import annotations

import uuid
Expand Down
1 change: 1 addition & 0 deletions nbformat/json_compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Common validator wrapper to provide a uniform usage of other schema validation
libraries.
"""

# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
from __future__ import annotations
Expand Down
1 change: 1 addition & 0 deletions nbformat/notebooknode.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""NotebookNode - adding attribute access to dicts"""

from __future__ import annotations

from collections.abc import Mapping
Expand Down
4 changes: 2 additions & 2 deletions nbformat/v2/nbxml.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""REMOVED: Read and write notebook files as XML.
"""
"""REMOVED: Read and write notebook files as XML."""

from __future__ import annotations

REMOVED_MSG = """\
Expand Down
3 changes: 1 addition & 2 deletions nbformat/v3/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""The main API for the v3 notebook format.
"""
"""The main API for the v3 notebook format."""

# Copyright (c) IPython Development Team.
# Distributed under the terms of the Modified BSD License.
Expand Down
1 change: 1 addition & 0 deletions nbformat/validator.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Notebook format validators."""

# Copyright (c) IPython Development Team.
# Distributed under the terms of the Modified BSD License.
from __future__ import annotations
Expand Down
1 change: 1 addition & 0 deletions nbformat/warnings.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Warnings that can be emitted by nbformat.
"""

from __future__ import annotations


Expand Down
46 changes: 23 additions & 23 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
{
"name": "nbformat-schema",
"version": "5.10.3",
"description": "JSON schemata for Jupyter notebook formats",
"main": "index.js",
"files": [
"nbformat/v3/nbformat.v3.schema.json",
"nbformat/v4/nbformat.v4.schema.json"
],
"repository": {
"type": "git",
"url": "git+https://github.com/jupyter/nbformat.git"
},
"keywords": [
"jupyter",
"notebook",
"json-schema"
],
"author": "Project Jupyter Contributors",
"license": "BSD-3-Clause",
"bugs": {
"url": "https://github.com/jupyter/nbformat/issues"
},
"homepage": "https://nbformat.readthedocs.io"
"name": "nbformat-schema",
"version": "5.10.3",
"description": "JSON schemata for Jupyter notebook formats",
"main": "index.js",
"files": [
"nbformat/v3/nbformat.v3.schema.json",
"nbformat/v4/nbformat.v4.schema.json"
],
"repository": {
"type": "git",
"url": "git+https://github.com/jupyter/nbformat.git"
},
"keywords": [
"jupyter",
"notebook",
"json-schema"
],
"author": "Project Jupyter Contributors",
"license": "BSD-3-Clause",
"bugs": {
"url": "https://github.com/jupyter/nbformat/issues"
},
"homepage": "https://nbformat.readthedocs.io"
}
4 changes: 2 additions & 2 deletions tests/v4/test_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,6 @@ def test_latest_matches_nbformat(self):
os.path.join(BASE_PATH, "nbformat.v4.schema.json"), encoding="utf-8"
) as schema_file:
schema = json.load(schema_file)
assert schema["description"] == "Jupyter Notebook v{major}.{minor} JSON schema.".format(
major=nbformat, minor=nbformat_minor
assert (
schema["description"] == f"Jupyter Notebook v{nbformat}.{nbformat_minor} JSON schema."
)
1 change: 1 addition & 0 deletions tests/v4/test_nbbase.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Tests for the Python API for composing notebook elements"""

from __future__ import annotations

from nbformat.v4.nbbase import (
Expand Down

0 comments on commit c55de2b

Please sign in to comment.