2020-10-05 11:47:28 +03:00
|
|
|
# https://snarky.ca/what-the-heck-is-pyproject-toml/
|
|
|
|
[build-system]
|
|
|
|
requires = ["setuptools", "wheel"]
|
|
|
|
build-backend = "setuptools.build_meta"
|
|
|
|
|
|
|
|
# Need to use legacy format for the time being
|
|
|
|
# https://tox.readthedocs.io/en/3.20.0/example/basic.html#pyproject-toml-tox-legacy-ini
|
|
|
|
[tool.tox]
|
|
|
|
legacy_tox_ini = """
|
2019-12-07 05:43:04 +03:00
|
|
|
[tox]
|
|
|
|
envlist = py35,py36,py37,py38
|
|
|
|
|
2020-10-05 11:52:42 +03:00
|
|
|
# run with tox -e py
|
2019-12-07 05:43:04 +03:00
|
|
|
[testenv]
|
|
|
|
deps =
|
|
|
|
-rrequirements.txt
|
|
|
|
-roptional-requirements.txt
|
|
|
|
-rdev-requirements.txt
|
|
|
|
commands =
|
|
|
|
# NOTE: you can run any command line tool here - not just tests
|
|
|
|
pytest {posargs}
|
|
|
|
|
|
|
|
# run with tox -e flake
|
|
|
|
[testenv:flake]
|
|
|
|
deps =
|
|
|
|
-rrequirements.txt
|
|
|
|
-roptional-requirements.txt
|
|
|
|
-rdev-requirements.txt
|
|
|
|
flake8
|
|
|
|
commands =
|
2019-12-08 02:29:55 +03:00
|
|
|
# stop the build if there are Python syntax errors or undefined names
|
2019-12-25 14:58:09 +03:00
|
|
|
flake8 telethon/ telethon_generator/ tests/ --count --select=E9,F63,F7,F82 --show-source --statistics
|
2019-12-08 02:29:55 +03:00
|
|
|
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
|
2019-12-25 14:58:09 +03:00
|
|
|
flake8 telethon/ telethon_generator/ tests/ --count --exit-zero --exclude telethon/tl/,telethon/errors/rpcerrorlist.py --max-complexity=10 --max-line-length=127 --statistics
|
2020-10-05 11:47:28 +03:00
|
|
|
|
|
|
|
"""
|