This repository has been archived by the owner on Jun 8, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 157
/
.pre-commit-config.yaml
71 lines (69 loc) · 2.58 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
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
default_language_version:
python: python3.8
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: 38b88246ccc552bffaaf54259d064beeee434539 # frozen: v4.0.1
hooks:
- id: trailing-whitespace
types: [file, python]
- id: end-of-file-fixer
types: [file, python]
- id: check-ast # Simply check whether files parse as valid python.
types: [file, python]
- id: check-docstring-first
types: [file, python]
- id: check-json
types: [file, json]
- id: check-added-large-files
types: [file]
- id: check-yaml
types: [file, yaml]
- id: debug-statements
types: [file, python]
- id: name-tests-test
files: ^tests/
types: [file, python]
- id: double-quote-string-fixer
types: [file, python]
- id: requirements-txt-fixer
files: ^requirements
types: [file, plain-text]
- id: check-case-conflict # Check for files with names that would conflict on a case-insensitive filesystem like MacOS HFS+ or Windows FAT.
types: [file, python]
- id: check-merge-conflict
- id: detect-private-key
- id: fix-encoding-pragma
files: ^(tests/|mgm_hurry)* # All files in tests/ and all files matching mgm_hurry*
types: [file, python]
# flake8 mainly for style smells
- repo: https://gitlab.com/pycqa/flake8
rev: dcd740bc0ebaf2b3d43e59a0060d157c97de13f3 # frozen: 3.9.2
hooks:
- id: flake8
types: [python]
files: '.*?(mgm)|(MoniGoMani).*?\.py$' # all python files containing mgm or monigomani
exclude: ^.*?(PairList|Strategy|TotalOverallSignalImportanceCalculator)\.py$ # except *PairList.py and *Strategy.py
args:
- --select=F,E112,E113,E304,E501,E502,E701,E702,E703,E71,E72,E731,W191,W6
- --max-line-length=240
- --statistics
- repo: local
hooks:
- id: pylint
name: pylint
entry: pylint
language: system
types: [python]
files: '.*?(mgm)|(MoniGoMani).*?\.py$' # all python files containing mgm or monigomani
exclude: ^.*?(PairList|Strategy|TotalOverallSignalImportanceCalculator)\.py$ # except *PairList.py and *Strategy.py
args:
- --disable=C,R,W0613,W0511,W0212,W0201,W0311,W0106,W0603,W0621,W0703,E1136
- id: pytest
name: pytest
entry: pytest
language: system
types: [python]
files: '.*?(mgm).*?(_test)\.py$'
verbose: true