-
Notifications
You must be signed in to change notification settings - Fork 386
/
.pre-commit-config.yaml
45 lines (38 loc) · 1.1 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
44
45
# Install the pre-commit hooks below with
# 'pre-commit install'
# Auto-update the version of the hooks with
# 'pre-commit autoupdate'
# Run the hooks on all files with
# 'pre-commit run --all'
# NB: In this config we exclude the example and tests notebooks
# from the code hooks (black, flake8, etc) as we want to keep
# the text representation of the test notebooks unchanged
exclude: >
(?x)^(
demo/.*|
tests/data/notebooks/.*|
)$
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-json
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
# isort needs the 'black' profile when used in combination with black
# See https://github.com/PyCQA/isort/issues/1518
- id: isort
args: ["--profile", "black"]
- repo: https://github.com/psf/black
rev: 23.11.0
hooks:
- id: black
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.5
hooks:
- id: ruff
args: ["--fix", "--show-fixes"]