-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
56 lines (55 loc) · 2.14 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
49
50
51
52
53
54
55
56
fail_fast: false
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: debug-statements #Check for debugger imports and breakpoint() in python files .
- id: check-ast #Simply check whether files parse as valid python
- id: fix-byte-order-marker #removes UTF-8 byte order marker
- id: check-json
- id: detect-private-key # detect-private-key is not in repo
- id: check-yaml
- id: check-added-large-files
- id: check-shebang-scripts-are-executable
- id: check-case-conflict #Check for files with names that would conflict on a case-insensitive filesystem like MacOS HFS+ or Windows FAT
- id: end-of-file-fixer #Makes sure files end in a newline and only a newline
- id: trailing-whitespace
- id: mixed-line-ending
- repo: local
hooks:
- id: black # black is a pre-commit hook that runs to check for format issues
name: black
entry: black
language: system
types: [python]
- repo: https://github.com/asottile/blacken-docs
rev: v1.12.1
hooks:
- id: blacken-docs #blacken-docs is a pre-commit hook that runs to check for issues in the docs
additional_dependencies: [black]
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort #isort is a pre-commit hook that runs to check for issues in imports and docstrings
args: ["--profile", "black", "--filter-files"]
- repo: local
hooks:
- id: pylint # pylint is a pre-commit hook that runs as a linter to check for style
name: pylint
entry: pylint
language: system
types: [python]
exclude: ^venv/ ^.git/ ^.vscode/ ^.DS_Store
- repo: local
hooks:
- id: mypy # mypy is a pre-commit hook that runs as a linter to check for type errors
name: mypy
entry: mypy
language: system
types: [python]
exclude: ^venv/ ^.git/ ^.vscode/ ^.DS_Store
- repo: https://github.com/asottile/pyupgrade
rev: v2.37.0
hooks:
- id: pyupgrade #pyupgrade is a pre-commit hook that runs to check for issues in the code
args: [--py36-plus]