-
Notifications
You must be signed in to change notification settings - Fork 2
/
.pre-commit-config.yaml
48 lines (48 loc) · 1.81 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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.4.0
hooks:
- id: check-added-large-files # Prevent giant files from being committed. In kB.
args: [--maxkb=1024]
- repo: https://github.com/pycqa/isort
rev: 5.7.0
hooks:
- id: isort # Sorts imports. "import ..." imports go first in alphabetical order, "from ... import ..." go after in alphabetical order.
name: isort (python)
args: ["--profile", "black"]
- repo: https://github.com/asottile/pyupgrade
rev: v2.10.0
hooks:
- id: pyupgrade # Automatically upgrade syntax for newer versions of the language.
args: [--py38-plus]
- repo: https://github.com/psf/black
rev: 20.8b1
hooks:
- id: black # A Python code formatter.
- repo: https://gitlab.com/pycqa/flake8
rev: 3.8.4
hooks:
- id: flake8 # Tool for style guide enforcement (https://flake8.pycqa.org/). Unused, undefined, repeated keys in dict, etc.
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.812
hooks:
- id: mypy # Checks programs that have type annotations conforming to PEP 484.
- repo: https://github.com/pycqa/pydocstyle
rev: 5.1.1
hooks:
- id: pydocstyle # Checks compliance with Python docstring conventions.
- repo: https://github.com/nbQA-dev/nbQA
rev: 0.5.9
hooks: # Same checks for Jupyter Notebooks.
- id: nbqa-isort
additional_dependencies: [isort==5.7.0]
- id: nbqa-pyupgrade
additional_dependencies: [pyupgrade==2.10.0]
args: ["--profile", "black"]
- id: nbqa-black
additional_dependencies: [black==20.8b1]
- id: nbqa-flake8
args: ["--extend-ignore=E402"]
additional_dependencies: [flake8==3.8.4]
- id: nbqa-mypy
additional_dependencies: ["mypy==v0.812"]