forked from ipfs-shipyard/py-ipfs-http-client
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtox.ini
73 lines (64 loc) · 2.31 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
67
68
69
70
71
72
73
[tox]
minversion = 3.3
envlist =
py27,
py34,
py35,
py36,
py37
# Tox' sdist feature presumes that `./setup.py sdist` is available
# Disable this feature until PEP-517 is implemented by both tox and flit.
skipsdist = true
[testenv]
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/requirements-testing.txt
whitelist_externals = ipfs
passenv = IPFS_* PY_IPFS_HTTP_CLIENT_* CI
commands =
python "{toxinidir}/test/run-tests.py" {posargs}
[testenv:codestyle]
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/requirements-codestyle.txt
commands =
flake8 {posargs}
#TODO: Migrate away from this file to `pyproject.toml` once `flake8` and `pytest` support parsing it
[testenv:coverage]
basepython = python3
deps =
coverage
commands =
python "{toxinidir}/test/combine-coverage.py" {posargs}
[flake8]
exclude = .git,.tox,+junk,coverage,dist,doc,*egg,build,tools,test/unit,docs,*__init__.py
# E221: Multiple spaces before operator
# E241: Multiple spaces after ',': Breaks element alignment collections
# E251: Spaces around '=' on parameter assignment
# E262: Inline comment should start with '# ': Breaks tagged comments (ie: '#TODO: ')
# E265: Block comment should start with '# ': ^
# E266: Too many leading '#' for block comment: Breaks declaring mega-blocks (ie: '### Section')
# E303: More than 2 consecutive newlines
# W292: No newline at end of file
# W391: Blank line at end of file (sometimes trigged instead of the above!?)
# F403: `from <module> import *` used; unable to detect undefined names ←– Probably should be fixed…
ignore = E221,E241,E251,E262,E265,E266,E303,W292,W391,F403
use-flake8-tabs = true
max-line-length = 100
tab-width = 4
# E701: Multiple statements on one line
# - multipart.py: Lots of `yield from` polyfills using `for chunk in X: yield chunk`
# - requests_wrapper.py: Lots of symbols exported that we specifically don't use but that make sense in a reusable module
# - test_*.py: Aligning `assert … not in …` and `assert … in …` kind of statements
per-file-ignores =
./ipfshttpclient/multipart.py:E701
./ipfshttpclient/requests_wrapper.py:E401,E402,F401
./test/functional/test_*.py:E272
[pytest]
python_files =
test_*.py
addopts =
# --doctest-modules / Totally useless since it cannot properly check the `client` package
ipfshttpclient
test/unit
test/functional