-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
36 lines (35 loc) · 1.53 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
# see https://pre-commit.com for more information
# see https://pre-commit.com/hooks.html for more hooks
# see https://www.python.org/dev/peps/pep-0008/ for PEP8 standard
# isort, black, flake8 for PEP8 https://rednafi.github.io/digressions/python/2020/04/06/python-precommit.html
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
hooks:
- id: trailing-whitespace # trims trailing whitespace
args: [--markdown-linebreak-ext=md]
types: [python]
- id: check-case-conflict # check for system dependent case conflicts
types: [python]
- id: check-yaml # check if YAML files can be compiled
- id: double-quote-string-fixer # change double quotes to single quotes
- id: end-of-file-fixer # add missing empty lines at EOF
exclude: 'docstring_coverage.svg' # must be ignored to prevent an endless loop of conflicting with each other
- id: check-ast # check whether files parse as valid python
types: [python]
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.9.0
hooks:
- id: python-use-type-annotations # https://florimond.dev/en/posts/2018/07/why-i-started-using-python-type-annotations-and-why-you-should-too/
types: [python]
- repo: https://github.com/pycqa/isort
rev: 5.10.1
hooks:
- id: isort
name: isort
args: ["--line-length", "140"]
# - repo: https://gitlab.com/pycqa/flake8
# rev: 3.9.2
# hooks:
# - id: flake8
# types: [python]