-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
71 lines (65 loc) · 1.64 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
67
68
69
70
71
#https://pre-commit.com/hooks.html
repos:
# Code Formatter
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: trailing-whitespace
stages: [commit]
- id: check-ast
stages: [commit]
- id: end-of-file-fixer
stages: [commit]
- id: check-docstring-first
stages: [commit]
- id: check-added-large-files
stages: [commit]
- id: check-yaml
stages: [commit]
- id: check-toml
stages: [commit]
- id: debug-statements
stages: [commit]
- id: name-tests-test
stages: [commit]
exclude: ^tests/(fixtures|mocks)/
- id: double-quote-string-fixer
stages: [commit]
- id: requirements-txt-fixer
stages: [commit]
# Formmater
- repo: https://github.com/ambv/black
rev: 23.3.0
hooks:
- id: black
args: [-S]
language_version: python3.10
stages: [commit]
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
args: ["--profile", "black", "--filter-files"]
stages: [commit]
# Lintter
- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
hooks:
- id: flake8
additional_dependencies: [flake8-docstrings]
stages: [commit]
- repo: https://github.com/myint/autoflake
rev: 'v2.0.2' # Use the sha / tag you want to point at
hooks:
- id: autoflake
stages: [commit]
# Tests
- repo: local
hooks:
- id: pytest
name: pytest
entry: bash -c 'make test'
language: system
types: [python]
pass_filenames: false
stages: [push]