-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
48 lines (43 loc) · 1.16 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
# It is possible to use hooks from the pre-commit python library directly
# See https://betterprogramming.pub/build-a-pre-commit-workflow-to-check-and-fix-your-python-code-automatically-313deb5a5701
repos:
- repo: https://github.com/PyCQA/autoflake
rev: v2.2.0
hooks:
- id: autoflake
name: Remove unused variables and imports
language: python
args:
[
"--in-place",
"--remove-all-unused-imports",
"--remove-unused-variables",
"--expand-star-imports",
"--ignore-init-module-imports",
]
files: \.py$
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
- id: isort
name: Sorting import statements
args:
[
"--profile=black"
]
- repo: https://github.com/econchick/interrogate
rev: 1.5.0
hooks:
- id: interrogate
exclude: >-
(?x)(
^tests/| # Exclude tests directory
.*__init__\.py$ # Exclude __init__.py files
)
args: [-vv, -i, --fail-under=80]
name: Check if functions/classes have docstrings
- repo: https://github.com/ambv/black
rev: 23.7.0
hooks:
- id: black
name: Black Python code formatting