-
Notifications
You must be signed in to change notification settings - Fork 29
/
Copy path.pre-commit-config.yaml
68 lines (61 loc) · 2.08 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
57
58
59
60
61
62
63
64
65
66
67
68
---
minimum_pre_commit_version: 1.15.2
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
hooks:
- id: check-merge-conflict # Check for files that contain merge conflict strings.
- id: trailing-whitespace # Trims trailing whitespace.
args: [--markdown-linebreak-ext=md]
- id: mixed-line-ending # Replaces or checks mixed line ending.
args: [--fix=lf]
- id: end-of-file-fixer # Makes sure files end in a newline and only a newline.
- id: check-merge-conflict # Check for files that contain merge conflict strings.
- id: check-ast # Simply check whether files parse as valid python.
# ----- Formatting ------------------------------------------------------------------------------------------------>
- repo: https://github.com/asottile/pyupgrade
rev: v2.29.0
hooks:
- id: pyupgrade
name: Rewrite Code to be Py3.5+
args: [--py38-plus]
- repo: https://github.com/hakancelik96/unimport
rev: "0.9.2"
hooks:
- id: unimport
name: Remove unused imports
args: [--remove]
- repo: https://github.com/asottile/reorder_python_imports
rev: v2.6.0
hooks:
- id: reorder-python-imports
args: [
--py38-plus,
]
- repo: https://github.com/psf/black
rev: 21.9b0
hooks:
- id: black
args: [--line-length=120, --target-version=py38]
- repo: https://github.com/asottile/blacken-docs
rev: v1.11.0
hooks:
- id: blacken-docs
args: [--skip-errors]
files: ^.*\.py$
additional_dependencies: [black==21.9b0]
- repo: https://github.com/pycqa/flake8
rev: '4.0.1'
hooks:
- id: flake8
exclude: ^.github/workflows/.*$
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.910
hooks:
- id: mypy
files: ^.*\.py$
args: []
additional_dependencies:
- pandas-stubs
- types-attrs
# <---- Formatting -------------------------------------------------------------------------------------------------