notebook/.pre-commit-config.yaml

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

86 lines
2.5 KiB
YAML
Raw Normal View History

ci:
autoupdate_schedule: monthly
autoupdate_commit_msg: 'chore: update pre-commit hooks'
2022-04-01 21:48:40 +08:00
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
2023-10-30 04:48:32 +08:00
rev: v4.5.0
2022-04-01 21:48:40 +08:00
hooks:
- id: check-case-conflict
- id: check-ast
- id: check-docstring-first
2022-04-01 21:48:40 +08:00
- id: check-executables-have-shebangs
- id: check-added-large-files
- id: check-case-conflict
- id: check-merge-conflict
- id: check-json
2022-04-01 21:48:40 +08:00
- id: check-toml
- id: check-yaml
- id: debug-statements
- id: end-of-file-fixer
2022-04-01 21:48:40 +08:00
- id: trailing-whitespace
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.27.4
hooks:
- id: check-github-workflows
2022-04-01 21:48:40 +08:00
- repo: https://github.com/codespell-project/codespell
rev: 'v2.2.6'
hooks:
- id: codespell
args: ['-L', 'hart,noteable', '--skip', "*.spec.ts"]
exclude: |
(?x)^(
2023-10-09 22:08:00 +08:00
yarn.lock|
binder/example.ipynb|
docs/source/examples/images/FrontendKernel.graffle/data.plist|
)$
2023-11-05 11:37:46 +08:00
- repo: https://github.com/pre-commit/mirrors-mypy
rev: "v1.8.0"
2023-11-05 11:37:46 +08:00
hooks:
- id: mypy
files: "^notebook"
stages: [manual]
args: ["--install-types", "--non-interactive"]
additional_dependencies: ["traitlets>=5.13", "tornado", "jupyter_server>=2.10", "jupyterlab_server>=2.25", "jupyterlab>=4.3.0a1,<4.4"]
2023-11-05 11:37:46 +08:00
- repo: https://github.com/pre-commit/pygrep-hooks
rev: 'v1.10.0'
hooks:
- id: rst-backticks
- id: rst-directive-colons
- id: rst-inline-touching-normal
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.2.0
2022-10-17 08:28:25 +08:00
hooks:
- id: ruff
2023-11-10 09:53:11 +08:00
types_or: [ python, jupyter ]
exclude: '^docs/source/examples/Notebook/Importing Notebooks.ipynb'
args: ['--fix', '--show-fixes']
2023-10-30 04:48:32 +08:00
- id: ruff-format
2023-11-10 09:53:11 +08:00
types_or: [ python, jupyter ]
exclude: '^docs/source/examples/Notebook/Importing Notebooks.ipynb'
- repo: https://github.com/scientific-python/cookie
rev: '2024.01.24'
hooks:
- id: sp-repo-review
additional_dependencies: ['repo-review[cli]']
2022-04-01 21:48:40 +08:00
- repo: local
hooks:
- id: prettier
name: prettier
entry: 'npm run prettier:files'
language: node
types_or: [json, ts, tsx, javascript, jsx, css, markdown]
2022-10-17 08:28:25 +08:00
stages: [manual]
2022-04-01 21:48:40 +08:00
- id: integrity
name: integrity
entry: 'npm run integrity --force'
language: node
stages: [push]