-
Notifications
You must be signed in to change notification settings - Fork 5
/
tox.ini
66 lines (57 loc) · 1.58 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
[tox]
envlist = flake8, bandit, pytest, docs, mypy, black
skipdist = True
[flake8]
max-line-length = 80
select = C,E,F,W,B,B950
ignore = E203,E501,W503,ANN101
exclude = .git/, ./venv/, ./.tox/, build/, swift_browser_ui.egg-info/
# Not using type hints in tests, ignore all errors
per-file-ignores =
tests/*:ANN
[testenv:bandit]
skip_install = True
deps = bandit
commands = bandit -r ./swift_browser_ui
[testenv:flake8]
skip_install = True
deps =
flake8
flake8-docstrings
flake8-annotations
commands = flake8 swift_browser_ui tests
[testenv:mypy]
skip_install = true
deps =
-rrequirements.txt
mypy
types-requests
types-certifi
types-redis
# Mypy fails if 3rd party library doesn't have type hints configured.
# Alternative to ignoring imports would be to write custom stub files, which
# could be done at some point.
commands = mypy --ignore-missing-imports --no-namespace-packages swift_browser_ui/
[testenv:docs]
; skip_install = true
deps =
.[docs]
commands = sphinx-build -W -c docs/source -b html docs/source docs/build/html
sphinx-build -W -blinkcheck -d docs/build/doctrees docs/source docs/build/html
[testenv:pytest]
passenv = COVERALLS_REPO_TOKEN
deps =
.[test]
-rrequirements.txt
commands = py.test -x --cov=swift_browser_ui tests/ui_unit tests/sharing tests/request tests/common tests/upload --cov-fail-under=50
[testenv]
deps =
-rrequirements.txt
[testenv:black]
skip_instal = true
deps =
black
commands = black swift_browser_ui tests -l 90 --check
[gh-actions]
python =
3.12: flake8, bandit, pytest, docs, black, mypy