-
Notifications
You must be signed in to change notification settings - Fork 586
/
tox.ini
75 lines (69 loc) · 2.67 KB
/
tox.ini
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
[tox]
envlist = config,flake8,bashate
skipsdist = True
[testenv]
whitelist_externals =
bash
[testenv:config]
commands =
/bin/bash -c 'set -euo pipefail && . ./conf/production.env.example'
/bin/bash -c 'set -euo pipefail && . ./conf/development.env.example'
[testenv:bashate]
deps = bashate==0.5.1
commands =
# Run bashate check for all bash scripts
# Ignores the following rules:
# E003: Indent not multiple of 4 (we use multiples of 2)
# E006: Line longer than 79 columns
bash -c "grep --recursive --binary-files=without-match \
--files-with-match '^.!.*\(ba\)\?sh$' \
--exclude-dir .tox \
--exclude-dir .git \
{toxinidir} | xargs bashate --error . --verbose --ignore=E003,E006"
[testenv:flake8]
deps =
flake8
flake8-debugger
commands = flake8 {posargs}
[testenv:isort]
deps = isort==4.2.15
commands =
bash -c "find {toxinidir} \
-type d \
\( \
-path {toxinidir}/.git -o \
-path {toxinidir}/.tox -o \
-path {toxinidir}/.venv -o \
-path {toxinidir}/plugins -o \
-path {toxinidir}/node_modules \
\) -prune -o \
-name '*.py' \
-print | xargs isort {posargs:--check-only} --verbose"
[flake8]
exclude = .venv,venv,.tox,dist,doc,build,*.egg,docs,setup.py,*/migrations/
ignore = E121,E123,E125,E126,E127,E128,E131,E222,E226,E231,E251,E261,E265,E302,E305,E402,E714,E722,F401,F403,F405,F841,W391,W605
max-line-length = 160
# E121 continuation line under-indented for hanging indent
# E123 closing bracket does not match indentation of opening bracket's line
# E125 continuation line with same indent as next logical line
# E126 continuation line over-indented for hanging indent
# E127 continuation line over-indented for visual indent
# E128 continuation line under-indented for visual indent
# E131 continuation line unaligned for hanging indent
# E222 multiple spaces after operator
# E226 missing whitespace around arithmetic operator
# E231 missing whitespace after
# E251 unexpected spaces around keyword / parameter equals
# E261 at least two spaces before inline comment
# E265 block comment should start with '# '
# E302 expected 2 blank lines, found 1
# E305 expected 2 blank lines after class or function definition, found 1
# E402 module level import not at top of file
# E714 test for object identity should be 'is not'
# E722 do not use bare except
# F401 Imported but unused
# F403 'from module import *' used; unable to detect undefined names
# F405 foo may be undefined, or defined from star imports
# F841 local variable 'foo' is assigned to but never used
# W391 blank line at end of file
# W605 invalid escape sequence