-
Notifications
You must be signed in to change notification settings - Fork 476
/
tox.ini
43 lines (37 loc) · 1.14 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
[tox]
project = detect_secrets
# These should match the ci python env list
envlist = py{39,310,311,312},mypy
skip_missing_interpreters = true
[testenv]
passenv = SSH_AUTH_SOCK
# NO_PROXY is needed to call requests API within a forked process
# when using macOS and python version 3.7
setenv =
NO_PROXY = '*'
deps = -rrequirements-dev.txt
whitelist_externals = coverage
commands =
coverage erase
coverage run -m pytest --strict {posargs:tests}
# I don't want to write `pragma: no cover` for `for` loops that don't have
# a case that doesn't enter the `for` loop. -_-"
coverage report --show-missing --include=tests/* --fail-under 99
coverage report --show-missing --include=testing/* --fail-under 100
coverage report --show-missing --skip-covered --include=detect_secrets/* --fail-under 95
pre-commit run --all-files
[testenv:mypy]
passenv = SSH_AUTH_SOCK
deps = -rrequirements-dev.txt
commands =
mypy detect_secrets
mypy testing
[testenv:venv]
envdir = venv
commands =
pre-commit install -f --install-hooks
[testenv:pre-commit]
deps = pre-commit >= 1.16.1
commands = pre-commit {posargs}
[pep8]
ignore = E501