-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
51 lines (44 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
44
45
46
47
48
49
50
51
# tox (https://tox.readthedocs.io/) is a tool for running tests
# in multiple virtualenvs. This configuration file will run the
# test suite on all supported python versions. To use it, "pip install tox"
# and then run "tox" from this directory.
[tox]
envlist = py{311}, flake8, black, mypy
skipsdist=True
[flake8]
exclude = .git, ./venv/, ./.tox/, __pycache__
ignore = D202, D203,D212,D213,D404,W503,ANN101,D104
max-line-length = 120
per-file-ignores =
tests/*:ANN
[testenv:flake8]
skip_install = true
deps =
flake8
flake8-docstrings
flake8-annotations
commands = flake8 .
[testenv:mypy]
skip_install = true
deps =
-rrequirements.txt
mypy
types-requests
# 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 validator/
[testenv:black]
skip_install = true
deps =
black
commands = black . -l 120 --check
[testenv]
deps =
-rrequirements.txt
.[test]
commands =
py.test -x --cov=validator tests
[gh-actions]
python =
3.11: flake8, py38, mypy, black