-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy path.pre-commit-config.yaml
48 lines (43 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
46
47
48
default_language_version:
python: python3
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
# list of supported hooks: https://pre-commit.com/hooks.html
- id: trailing-whitespace
- id: end-of-file-fixer
- id: debug-statements
- id: detect-private-key
# Code formatting
- repo: https://github.com/psf/black
rev: 24.1.1
hooks:
- id: black
# Import sorting
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
- id: isort
args: ["--profile", "black"]
# Flake8 analysis
- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
hooks:
- id: flake8
args: [--config=tox.ini]
# Docstring style check
- repo: https://github.com/PyCQA/pydocstyle
rev: 6.3.0
hooks:
- id: pydocstyle
args: [--config=tox.ini]
exclude: 'tests/'
# Notebook formatting, import sorting, flake8
- repo: https://github.com/nbQA-dev/nbQA
rev: 1.7.0
hooks:
- id: nbqa-black
- id: nbqa-isort
- id: nbqa-flake8
args: ['--extend-ignore=E402,E501']