-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.pre-commit-config.yaml
66 lines (62 loc) · 2.22 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
repos:
- repo: https://github.com/psf/black
rev: 19.10b0
hooks:
- id: black
language_version: python3.9
args: ["--safe"]
additional_dependencies:
# To avoid
# ImportError: cannot import name '_unicodefun' from 'click'
# (/home/liporace/.cache/pre-commit/repoesurte4p/py_env-python3.9/
# lib/python3.9/site-packages/click/__init__.py)
- "click==7.1.2"
- repo: https://github.com/PyCQA/isort
# See https://stackoverflow.com/a/75295105/1259982 for
# rev value
rev: 5.11.5
hooks:
- id: isort
args: ["--profile", "black"]
language_version: python3.9
#- repo: https://github.com/PyCQA/pylint
# rev: pylint-2.6.0
# Using local pylint to find project packages
# https://pre-commit.com/#repository-local-hooks
- repo: local
hooks:
- id: pylint
name: pylint # added for local repo option
# Reference to .pylintrc to make sure it is being used.
entry: pylint --rcfile=.pylintrc # added for local repo option
# This is used for remote repo
#language_version: python3.9
language: python
types: [python]
args: [
#"--init-hook=\"from pylint.config import find_pylintrc; import os, sys; sys.path.append(os.path.dirname(find_pylintrc()))\""
# # E501 let black handle all line length decisions
# # W503 black conflicts with "line break before operator" rule
# # E203 black conflicts with "whitespace before ':'" rule
# "--ignore=E501,W503,E203",
]
# This is already checked by pylint
# - repo: https://github.com/PyCQA/pydocstyle
# rev: 5.1.1
# hooks:
# - id: pydocstyle
# language_version: python3.9
# args: [
# # Check for docstring presence only
# "--select=D1",
# # Don't require docstrings for tests and third party files
# '--match=(?!test).*\.py',
# ]
- repo: https://github.com/pre-commit/mirrors-mypy
# rev: v0.770
rev: v0.790
hooks:
- id: mypy
language_version: python3.9
#args are defined in mypy.ini
#args: ["--no-strict-optional", "--ignore-missing-imports"]