-
Notifications
You must be signed in to change notification settings - Fork 4
/
tox.ini
39 lines (35 loc) · 1.16 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
[tox]
no_package = True
skip_missing_interpreters = True
env_list = format, lint
min_version = 4.0.0
[testenv]
install_command = pip install {opts} {packages}
set_env =
PYTHONBREAKPOINT=pdb.set_trace
PY_COLORS=1
pass_env =
PYTHONPATH
[testenv:format]
description = Apply coding style standards to code
deps = -r {tox_root}/requirements-dev.txt
commands =
licenseheaders -t {tox_root}/.copyright.tmpl -cy -o 'Canonical, Ltd' -d {tox_root}/k8s_test_harness
isort {tox_root}/k8s_test_harness --profile=black
black {tox_root}/k8s_test_harness
[testenv:lint]
description = Check code against coding style standards
deps = -r {tox_root}/requirements-dev.txt
commands =
codespell {tox_root}/k8s_test_harness
flake8 {tox_root}/k8s_test_harness
licenseheaders -t {tox_root}/.copyright.tmpl -cy -o 'Canonical, Ltd' -d {tox_root}/k8s_test_harness --dry
isort {tox_root}/k8s_test_harness --profile=black --check
black {tox_root}/k8s_test_harness --check --diff
[flake8]
max-line-length = 120
select = E,W,F,C,N
# E231 rule is not aware of f-strings
ignore = W503,E231
exclude = venv,.git,.tox,.tox_env,.venv,build,dist,*.egg_info
show-source = true