-
-
Notifications
You must be signed in to change notification settings - Fork 328
/
.pre-commit-config.yaml
59 lines (59 loc) · 1.71 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
exclude: "__snapshots__/.*$"
default_install_hook_types: [pre-commit, pre-push]
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-yaml
stages: [commit]
- id: check-added-large-files
args: ['--maxkb=300']
fail_fast: false
stages: [commit]
- id: pretty-format-json
args: ['--autofix', '--no-sort-keys']
- id: end-of-file-fixer
exclude_types: ["csv", "json"]
stages: [commit]
- id: trailing-whitespace
stages: [commit]
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
args: ["--profile", "black"]
stages: [commit]
- repo: https://github.com/psf/black
rev: 23.3.0
hooks:
- id: black
fail_fast: true
stages: [commit]
- repo: https://github.com/pycqa/flake8
rev: 6.0.0
hooks:
- id: flake8
args:
- "--ignore=E501,W503,E203,E741,F541" # Line too long, Line break occurred before a binary operator, Whitespace before ':'
fail_fast: true
stages: [commit]
- repo: local
hooks:
- id: pytest-on-commit
name: Running single sample test
entry: python3 -m pytest -rfpsxEX --disable-warnings --verbose -k sample1
language: system
pass_filenames: false
always_run: true
fail_fast: true
stages: [commit]
- repo: local
hooks:
- id: pytest-on-push
name: Running all tests before push...
entry: python3 -m pytest -rfpsxEX --disable-warnings --verbose --durations=3
language: system
pass_filenames: false
always_run: true
fail_fast: true
stages: [push]