-
Notifications
You must be signed in to change notification settings - Fork 3
/
.pre-commit-config.yaml
141 lines (141 loc) · 4.45 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
---
# See https://pre-commit.com for more information
default_language_version:
# default exe name
python: python
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.2.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-json
- id: check-executables-have-shebangs
- id: mixed-line-ending
- id: pretty-format-json
args:
- --autofix
- repo: https://github.com/asottile/reorder_python_imports
rev: v3.1.0
hooks:
- id: reorder-python-imports
- repo: https://github.com/psf/black
rev: 22.3.0
hooks:
- id: black
name: black
language: python
types: [python]
args:
- "--line-length=80"
- repo: https://github.com/asottile/pyupgrade
rev: v2.32.1
hooks:
- id: pyupgrade
args: [--py37-plus]
- repo: https://github.com/adrienverge/yamllint
rev: v1.26.3
hooks:
- id: yamllint
language: python
types: [file, yaml]
args:
- -d
- "{extends: default, rules: {line-length: disable}}"
- repo: https://github.com/openstack-dev/bashate
rev: 2.1.0
hooks:
- id: bashate
# Run bashate check for all bash scripts
# Ignores the following rules:
# E006: Line longer than 79 columns (as many scripts use jinja
# templating, this is very difficult)
# E040: Syntax error determined using `bash -n` (as many scripts
# use jinja templating, this will often fail and the syntax
# error will be discovered in execution anyway)
entry: bashate --error . --verbose --ignore=E006,E040
- repo: https://gitlab.com/pycqa/flake8
rev: 3.9.2
hooks:
- id: flake8
language: system
types: [python]
args:
- "--ignore=E203, E231, E501, W503, SC100, SC200"
- repo: https://github.com/pycqa/pylint
rev: v2.14.0
hooks:
- id: pylint
language: system
types: [python]
args:
- --rcfile=pylintrc
- "--jobs" # spawning multiple processes
- "0" # 0 will auto-detect the number of processors available to use
- --max-nested-blocks
- "10"
- --max-branches
- "16"
- --max-statements
- "100"
- --min-similarity-lines
- "30"
- --disable=missing-function-docstring # C0116
- --disable=line-too-long # C0301
- --disable=wrong-import-order # C0411
- --disable=wrong-import-position # C0413
- --disable=import-outside-toplevel # C0415
- --disable=import-error # E0401
- --disable=no-name-in-module # E0611
- --disable=no-member # E1101
- --disable=too-many-function-args # E1121
- --disable=consider-using-from-import # E0012
- --disable=c-extension-no-member # I1101
- --disable=too-many-instance-attributes # R0902
- --disable=too-many-locals # R0914
- --disable=protected-access # W0212
- --disable=fixme # W0511
- --disable=global-statement # W0603
- --disable=global-at-module-level # W0604
- --disable=broad-except # W0703
- --disable=logging-format-interpolation # W1202
- --disable=logging-fstring-interpolation # W1203
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.960
hooks:
- id: mypy
language: python
args:
- --no-strict-optional
- --ignore-missing-imports
- --scripts-are-modules
- --follow-imports=skip
- --disallow-untyped-defs
- --show-error-codes
- --warn-unused-ignores
- --python-version=3.7
additional_dependencies:
- tokenize-rt
- sqlalchemy-stubs
- dataclassy
- types-PyYAML
- types-requests
- types-python-dateutil
types: [python]
- repo: https://github.com/pycqa/pydocstyle
rev: 6.1.1
hooks:
- id: pydocstyle
language: system
types: [python]
args:
- --ignore=D212,D203
- repo: local
# https://github.com/pre-commit/pre-commit/issues/875 - debug python version
hooks:
- id: tests
name: run pytests
entry: python -m pytest -v --hypothesis-show-statistics
language: system
types: [python]
files: ^python/glsuplib/tests