Skip to content

Commit

Permalink
ci: update pre-commit hooks and notebooks
Browse files Browse the repository at this point in the history
- Update pre-commit hooks:
  - pre-commit/pre-commit-hooks from v4.6.0 to v5.0.0
  - astral-sh/ruff-pre-commit from v0.5.1 to v0.7.0
  - python-jsonschema/check-jsonschema from 0.29.2 to 0.29.4
- Add mypy pre-commit hook
- Update notebooks:
  - Improve nbconvert plugin configuration description
  - Update Python version in usage notebook from 3.11.4 to 3.12.3
  - Remove unused interpreter hash
  - Simplify kernel name to .venv
  • Loading branch information
Liu Xue Yan committed Oct 21, 2024
1 parent c048733 commit db45508
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
12 changes: 9 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: check-case-conflict
- id: check-added-large-files
Expand All @@ -19,7 +19,7 @@ repos:
- id: check-docstring-first

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.1
rev: v0.7.0
hooks:
- id: ruff
types_or: [python, pyi, jupyter]
Expand All @@ -32,8 +32,14 @@ repos:
hooks:
- id: nbstripout

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.12.1
hooks:
- id: mypy
args: [--config-file, .mypy.ini, --ignore-missing-imports]

- repo: https://github.com/python-jsonschema/check-jsonschema
rev: "0.29.2"
rev: "0.29.4"
hooks:
- id: check-github-workflows
- id: check-readthedocs
9 changes: 3 additions & 6 deletions notebooks/usage.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Add the plugin into configuration's `plugins` attribute\n",
"Add the `nbconvert` into configuration file (`mkdocs.yml`)'s `plugins` list\n",
"\n",
"```yaml\n",
"plugins:\n",
Expand Down Expand Up @@ -127,11 +127,8 @@
],
"metadata": {
"file_extension": ".py",
"interpreter": {
"hash": "1b489b747beea828bea5943723d3eee92f25d87b9fc00ed10205e87b9c039aa4"
},
"kernelspec": {
"display_name": "Python 3.8.10 64-bit ('venv': venv)",
"display_name": ".venv",
"language": "python",
"name": "python3"
},
Expand All @@ -145,7 +142,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.4"
"version": "3.12.3"
},
"mimetype": "text/x-python",
"name": "python",
Expand Down

0 comments on commit db45508

Please sign in to comment.