-
Notifications
You must be signed in to change notification settings - Fork 30
/
.pre-commit-config.yaml
30 lines (30 loc) · 1008 Bytes
/
.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
# This config is used by pre-commit to run hooks on files before committing them to git
# To use it install pre-commit with:
# `pip install pre-commit`
# and run
# `pre-commit install`
# in the root of the repository
# From that point onwards, pre-commit will run the hooks on every commit.
# If pre-commit does some modification, the commit will fail. Add the
# changes done by pre-commit and commit again.
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
# Black to format code with a consistent style
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 24.2.0
hooks:
- id: black-jupyter
# jupyter notebook cleans
- repo: local
hooks:
- id: jupyter-nb-clear-output
name: jupyter-nb-clear-output
files: \.ipynb$
stages: [commit]
language: system
entry: jupyter nbconvert --ClearOutputPreprocessor.enabled=True --inplace