-
Notifications
You must be signed in to change notification settings - Fork 8
/
tox.ini
103 lines (93 loc) · 2.2 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
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
[tox]
envlist = py{27,33,34,35,36,37,38,39,310},
py{27,310}-flake8
toxworkdir = /tmp/tox_dose
skip_missing_interpreters = True
minversion = 3.15
; virtualenv 20.5 dropped Python 3.4 support, and it depends on typing
requires =
virtualenv<20.5
typing<3.7
[testenv]
deps =
pytest
setuptools
pytest-cov
commands =
python -m pytest {posargs}
[testenv:py27]
deps =
pytest<5
pytest-cov<3
setuptools<45
[testenv:py33]
; Compiling numpy requires an old glibc header file (xlocale.h),
; this command should enable that process by creating a symbolic link:
; sudo ln -s /usr/include/locale.h /usr/local/include/xlocale.h
; After compiling/installing numpy, the xlocale.h link can be removed:
; sudo unlink /usr/local/include/xlocale.h
deps =
pathlib
pytest<3.3
pytest-cov<2.6
setuptools<40
[testenv:py34]
deps =
attrs<21.1 # Required by pytest
pytest<5
pytest-cov<2.9
setuptools<44
[testenv:py35]
deps =
pytest<6.2
pytest-cov<3
setuptools<45
[testenv:py{27,310}-flake8]
deps = flake8
commands =
- flake8 --version
flake8
[pytest]
addopts =
--cov-config=tox.ini
--cov=dose
[run]
branch = True
omit = */rewritten-readme/*
[report]
show_missing = True
precision = 2
[flake8]
exclude = _legacy.py
max-complexity = 9
select =
; mccabe / pyflakes
; http://flake8.pycqa.org/en/latest/user/error-codes.html
; C901 McCabe complexity (enabled by the "max-complexity" option)
C,
; pyflakes: - future imports as the first statement
; - no star imports "from module import *"
; - no shadowed/undefined/duplicated/unused names
F,
; pycodestyle
; http://pycodestyle.readthedocs.io/en/latest/intro.html#error-codes
; Indentation with 4 spaces (don't check comments/continuation lines)
E111, E112, E113,
; Whitespace before "(" or missing after one of ",;:"
E211, E231,
; Too many blank lines
E303, E304,
; Line length > 79 or has a redundant line break backslash
E501, E502,
; Use "not in" and "is [not]"
E71,
; Avoid confusing single-char names "l"/"O"/"I"
E74,
; Actual errors (syntax, indentation, I/O)
E9,
; Trailing whitespace / empty lines
W2, W3,
; Deprecated stuff
W6,
; Tab character
E101, E223, E224, E242, E273, E274, W191