Skip to content

Commit 09f5de2

Browse files
authored
Nbclean precommit (#34)
* fix precommit * test nb * updates * add black linelength format to nbs
1 parent 98bb0a0 commit 09f5de2

20 files changed

+2716
-8124
lines changed

.pre-commit-config.yaml

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,37 @@
11

2+
#repos:
23
repos:
34
- repo: https://github.com/astral-sh/ruff-pre-commit
45
rev: v0.9.6
56
hooks:
67
- id: ruff
7-
- id: ruff-format
8+
args: ["--line-length=120"]
9+
files: "\\.py$"
810

911
- repo: https://github.com/nbQA-dev/nbQA
1012
rev: 1.9.1 # Check latest version
1113
hooks:
12-
- id: nbqa-ruff
13-
args: ["format"]
14+
- id: nbqa-flake8
15+
args: ["--max-line-length=120"]
16+
files: "\\.ipynb$"
17+
- id: nbqa-black
18+
args: ["--line-length=120"]
19+
files: "\\.ipynb$"
20+
21+
- repo: https://github.com/psf/black
22+
rev: 23.1.0 # Check for the latest version
23+
hooks:
24+
- id: black
25+
args: ["--line-length", "120"]
26+
27+
- repo: https://github.com/srstevenson/nb-clean
28+
rev: 4.0.1
29+
hooks:
30+
- id: nb-clean
31+
args:
32+
- --remove-empty-cells
33+
- --preserve-cell-metadata
34+
- tags
35+
- slideshow
36+
- --
37+
exclude: "^.*/data/.*$"

0 commit comments

Comments
 (0)