-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
executable file
·49 lines (44 loc) · 1.25 KB
/
.pre-commit-config.yaml
File metadata and controls
executable file
·49 lines (44 loc) · 1.25 KB
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
repos:
- repo: local
hooks:
# For reformatting code
- id: black
name: black
entry: black
language: python
types: [ python ]
args: [ --line-length=99, --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 ]
# flake config
- id: flake8
name: flake8
entry: flake8
language: python
types: [ python ]
# Run python unittest
- id: tests
name: pytest
entry: pytest
language: python
types: [ python ]
pass_filenames: false
args: [ -v ]
stages: [ commit ]