-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
61 lines (54 loc) · 1.71 KB
/
.pre-commit-config.yaml
File metadata and controls
61 lines (54 loc) · 1.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# pre-commit config. Auto-run on PRs by pre-commit.ci (see ci: block below);
# run locally with `pre-commit run --all-files` after `pip install pre-commit`.
ci:
# Auto-fix PRs where possible; tag the commit so it's clearly bot-authored.
autofix_commit_msg: |
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
autofix_prs: true
autoupdate_branch: ""
autoupdate_commit_msg: "[pre-commit.ci] pre-commit autoupdate"
autoupdate_schedule: monthly
skip: []
submodules: false
fail_fast: false
default_language_version:
python: python3
minimum_pre_commit_version: 3.0.0
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: check-yaml
- id: check-toml
- id: end-of-file-fixer
exclude: \.ipynb$
- id: mixed-line-ending
args: [--fix=lf]
- id: trailing-whitespace
exclude: \.ipynb$
- id: check-added-large-files
args: [--maxkb=5000]
exclude: \.ipynb$
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.12
hooks:
- id: ruff-check
args: [--fix]
- id: ruff-format
# Notebook cells use a chained fluent API; ruff-format collapses
# short chains onto one line which hurts readability. Lint notebooks
# via nbqa-ruff (below) instead.
exclude: \.ipynb$
- repo: https://github.com/nbQA-dev/nbQA
rev: 1.9.1
hooks:
- id: nbqa-ruff
args: [--fix]
- repo: local
hooks:
- id: strip-widget-metadata
name: Strip Jupyter widget metadata from notebooks
entry: python scripts/strip_widget_metadata.py
language: system
files: \.ipynb$