-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.pre-commit-config.yaml
43 lines (43 loc) · 1.41 KB
/
.pre-commit-config.yaml
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
fail_fast: false
repos:
# We have black here twice because the first black block runs black on
# Jupyter notebooks. And we don't want to run black on notebooks in the
# research folder because 1) it's slow. 2) it can overwrite a notebook in
# current use causing the session to be lost. 3) there's no reason, those
# notebooks are exploration anyway.
- repo: https://github.com/psf/black
rev: 22.12.0
hooks:
- id: black-jupyter
language_version: python3
exclude: research/
- repo: https://github.com/psf/black
rev: 22.12.0
hooks:
- id: black
- repo: https://github.com/pycqa/flake8
rev: 5.0.4
hooks:
- id: flake8
- repo: https://github.com/asottile/reorder_python_imports
rev: v3.9.0
hooks:
- id: reorder-python-imports
- repo: https://github.com/mwouts/jupytext
rev: v1.14.5
hooks:
- id: jupytext
args: [--from, ipynb, --to, "md"]
# Should run after jupytext so that secrets in ipynb files get properly scanned.
# To reset gitleaks-report.json:
# gitleaks detect -v --redact --report-path tools/gitleaks-report.json
- repo: https://github.com/zricethezav/gitleaks
rev: v8.16.0
hooks:
- id: gitleaks
args: [--baseline-path, tools/gitleaks-report.json]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: debug-statements
- id: forbid-new-submodules