-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtox.ini
More file actions
69 lines (63 loc) · 1.9 KB
/
Copy pathtox.ini
File metadata and controls
69 lines (63 loc) · 1.9 KB
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
[tox]
# Test matrix defined as a Bash-interpolated string, where tox implicitly
# expands "py" to "python" and delimits the subsequent two digits with a dot to
# associate each resulting test configuration with the basename of an external
# command running an externally installed Python interpreter.
#
# For example, setting "envlist = py27,py38" produces a test matrix exercising
# the externally installed "python2.7" and "python3.8" commands. See also:
# https://tox.readthedocs.io/en/latest/config.html#generating-environments-conditional-settings
envlist = py3{5,6,7,8}
# Human-readable string synopsizing the current test configuration.
description = Exercise "{toxinidir}" with "{basepython} -m pytest".
[testenv:venv]
deps =
.
commands = {posargs}
# Autoformatter
[testenv:black]
basepython = python3
skip_install = true
deps =
black>=19.3b0
commands =
black --line-length 100 src/
# Linters
[testenv:flake8]
basepython = python3
skip_install = true
deps =
flake8
flake8-bugbear
flake8-colors
flake8-docstrings>=1.3.1
flake8-import-order>=0.9
flake8-typing-imports>=1.1
pep8-naming
commands =
flake8 src/flake8/ tests/ setup.py
# Flake8 Configuration
[flake8]
# Ignore some flake8-docstrings errors
# NOTE(sigmavirus24): While we're still using flake8 2.x, this ignore line
# defaults to selecting all other errors so we do not need select=E,F,W,I,D
# Once Flake8 3.0 is released and in a good state, we can use both and it will
# work well \o/
max-line-length = 160
ignore = D203, W503, E203, E231, E302
exclude =
.tox,
.git,
__pycache__,
docs/source/conf.py,
build,
dist,
tests/fixtures/*,
*.pyc,
*.egg-info,
.cache,
.eggs
max-complexity = 10
import-order-style = google
application-import-names = flake8
format = ${cyan}%(path)s${reset}:${yellow_bold}%(row)d${reset}:${green_bold}%(col)d${reset}: ${red_bold}%(code)s${reset} %(text)s