-
Notifications
You must be signed in to change notification settings - Fork 12
/
.pre-commit-config.yaml
42 lines (37 loc) · 1.11 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
repos:
- repo: local
hooks:
# For reformatting code
- id: black
name: black
entry: black
language: python
types: [ python ]
args: [ --line-length=120, --target-version=py38 ]
# For upgrade python code syntax for newer versions of the language
- id: pyupgrade
name: pyupgrade
entry: pyupgrade
language: python
types: [ python ]
# Tool for automatically reordering python imports
- id: reorder-python-imports
name: reorder-python-imports
entry: reorder-python-imports
language: python
types: [ python ]
# Removes unused imports and unused variables from Python code
- id: autoflake
name: autoflake
entry: autoflake
language: python
types: [ python ]
args: [ --in-place, --remove-all-unused-imports, --remove-duplicate-keys ]
# Run python unittest
- id: tests
name: pytest
entry: pipenv run pytest
language: python
'types': [ python ]
pass_filenames: false
stages: [ commit ]