2019-07-24 15:54:30 +08:00
|
|
|
# Reference: https://github.com/ethereum/py_ecc/blob/d0da74402210ea1503ef83b3c489d5b5eba7f7bf/tox.ini
|
|
|
|
|
|
|
|
[tox]
|
|
|
|
envlist =
|
|
|
|
py37-test
|
2019-08-28 23:39:33 +08:00
|
|
|
py37-interop
|
2019-07-24 15:54:30 +08:00
|
|
|
lint
|
|
|
|
|
2019-08-03 05:38:03 +08:00
|
|
|
[flake8]
|
2019-08-04 00:11:49 +08:00
|
|
|
max-line-length = 100
|
|
|
|
exclude = *_pb2*.py
|
2019-08-04 03:41:52 +08:00
|
|
|
ignore = E203, W503
|
2019-08-04 00:11:49 +08:00
|
|
|
max-complexity = 18
|
|
|
|
select = B,C,E,F,W,T4,B9
|
2019-08-03 05:38:03 +08:00
|
|
|
|
2019-08-03 13:29:21 +08:00
|
|
|
[isort]
|
|
|
|
force_sort_within_sections=True
|
2019-09-24 12:18:31 +08:00
|
|
|
known_third_party=pytest,p2pclient,pexpect
|
2019-08-03 13:29:21 +08:00
|
|
|
multi_line_output=3
|
|
|
|
include_trailing_comma=True
|
|
|
|
force_grid_wrap=0
|
|
|
|
use_parentheses=True
|
2019-08-14 05:36:05 +08:00
|
|
|
line_length=88
|
2019-08-11 16:47:54 +08:00
|
|
|
skip_glob=
|
|
|
|
*_pb2*.py
|
|
|
|
*.pyi
|
2019-08-03 13:29:21 +08:00
|
|
|
|
2019-07-24 15:54:30 +08:00
|
|
|
[testenv]
|
|
|
|
deps =
|
2019-09-23 22:00:40 +08:00
|
|
|
passenv = CI TRAVIS TRAVIS_*
|
2019-07-24 15:54:30 +08:00
|
|
|
extras = test
|
|
|
|
commands =
|
2019-09-24 11:30:52 +08:00
|
|
|
test: pytest tests/
|
2019-07-24 15:54:30 +08:00
|
|
|
basepython =
|
|
|
|
py37: python3.7
|
|
|
|
|
|
|
|
[testenv:lint]
|
|
|
|
basepython = python3
|
|
|
|
extras = dev
|
|
|
|
commands =
|
2019-08-11 16:47:54 +08:00
|
|
|
mypy -p libp2p -p examples --config-file {toxinidir}/mypy.ini
|
2019-09-23 22:00:40 +08:00
|
|
|
black --check libp2p tests tests_interop examples setup.py
|
2019-10-24 15:16:49 +08:00
|
|
|
isort --recursive --check-only --diff libp2p tests tests_interop examples setup.py
|
2019-10-26 18:45:26 +08:00
|
|
|
docformatter --pre-summary-newline --check --recursive libp2p tests tests_interop examples setup.py
|
2019-09-23 22:00:40 +08:00
|
|
|
flake8 libp2p tests tests_interop examples setup.py
|
|
|
|
|
|
|
|
[testenv:py37-interop]
|
2019-09-24 11:30:52 +08:00
|
|
|
deps =
|
|
|
|
p2pclient
|
|
|
|
pexpect
|
2019-09-23 22:00:40 +08:00
|
|
|
passenv = CI TRAVIS TRAVIS_* GOPATH
|
|
|
|
extras = test
|
|
|
|
commands =
|
2019-09-24 11:30:52 +08:00
|
|
|
pytest tests_interop/
|
2019-09-23 22:00:40 +08:00
|
|
|
basepython =
|
|
|
|
py37: python3.7
|