Skip to content

Commit a8a0af2

Browse files
committed
add pre-commit
1 parent ab70781 commit a8a0af2

File tree

1 file changed

+57
-0
lines changed

1 file changed

+57
-0
lines changed

.pre-commit-config.yaml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
repos:
2+
- repo: https://github.com/PyCQA/isort
3+
rev: 5.8.0
4+
hooks:
5+
- id: isort
6+
language_version: python3.8
7+
-
8+
repo: https://github.com/psf/black
9+
rev: 20.8b1
10+
hooks:
11+
- id: black
12+
args: ['--safe']
13+
language_version: python3.8
14+
-
15+
repo: https://gitlab.com/pycqa/flake8
16+
rev: 3.9.0
17+
hooks:
18+
- id: flake8
19+
language_version: python3.8
20+
args: [
21+
# E501 let black handle all line length decisions
22+
# W503 black conflicts with "line break before operator" rule
23+
# E203 black conflicts with "whitespace before ':'" rule
24+
'--ignore=E501,W503,E203,C901']
25+
-
26+
repo: https://github.com/chewse/pre-commit-mirrors-pydocstyle
27+
# 2.1.1
28+
rev: v2.1.1
29+
hooks:
30+
- id: pydocstyle
31+
language_version: python3.8
32+
exclude: '.*(test|alembic|scripts).*'
33+
args: [
34+
# Check for docstring presence only
35+
'--select=D1',
36+
37+
]
38+
# Don't require docstrings for tests
39+
# '--match=(?!test).*\.py']
40+
# -
41+
# repo: https://github.com/pre-commit/mirrors-mypy
42+
# rev: v0.770
43+
# hooks:
44+
# - id: mypy
45+
# language_version: python3.8
46+
# args: [--no-strict-optional, --ignore-missing-imports]
47+
-
48+
repo: https://github.com/PyCQA/pydocstyle
49+
rev: 6.0.0
50+
hooks:
51+
- id: pydocstyle
52+
language_version: python3.8
53+
exclude: '.*(test|alembic|scripts).*'
54+
#args: [
55+
# Don't require docstrings for tests
56+
#'--match=(?!test|alembic|scripts).*\.py',
57+
#]

0 commit comments

Comments
 (0)