-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
44 lines (40 loc) · 1.19 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
repos:
# Fix end of files
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: trailing-whitespace
exclude: 'docs/database'
- id: end-of-file-fixer
exclude: 'docs/database'
- id: mixed-line-ending
exclude: 'docs/database'
args:
- '--fix=lf'
# Black formatting
- repo: https://github.com/psf/black
rev: 23.7.0
hooks:
- id: black
# Remove unused imports/variables
- repo: https://github.com/myint/autoflake
rev: v2.2.1
hooks:
- id: autoflake
args:
- "--in-place"
- "--remove-all-unused-imports"
- "--remove-unused-variable"
# Sort imports
- repo: https://github.com/pycqa/isort
rev: "5.12.0"
hooks:
- id: isort
args:
- --profile
- black
- repo: https://github.com/pycqa/flake8
rev: '6.1.0'
hooks:
- id: flake8
additional_dependencies: [Flake8-pyproject, flake8-docstrings, flake8-absolute-import, flake8-absolute-import, flake8-bugbear, flake8-builtins, flake8-isort, flake8-multiline-containers, flake8-mutable, flake8-pep3101, flake8-print, flake8-variables-names, flake8-qgis]