From e86f162b84bc84f616bd348b93606f0ec53b512e Mon Sep 17 00:00:00 2001 From: Luke Murphy Date: Sun, 5 Jul 2020 03:11:22 +0200 Subject: [PATCH] Squeeze all files into pyproject --- mypy.ini | 4 ---- pyproject.toml | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ setup.cfg | 13 ------------- tox.ini | 46 ---------------------------------------------- 4 files changed, 48 insertions(+), 63 deletions(-) delete mode 100644 mypy.ini delete mode 100644 setup.cfg delete mode 100644 tox.ini diff --git a/mypy.ini b/mypy.ini deleted file mode 100644 index ab4ef1a..0000000 --- a/mypy.ini +++ /dev/null @@ -1,4 +0,0 @@ -[mypy] -python_version = 3.8 -platform = linux -ignore_missing_imports = True diff --git a/pyproject.toml b/pyproject.toml index 83bf660..aaa7897 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -37,3 +37,51 @@ include = '\.pyi?$' [build-system] requires = ["poetry>=1.0.9,<2.0"] build-backend = "poetry.masonry.api" + +[tool.tox] +legacy_tox_ini = """ +[tox] +envlist = py38 lint sort format type +skip_missing_interpreters = True +isolated_build = True + +[testenv] + +[testenv:lint] +skipdist = True +deps = flake8 +commands = flake8 {posargs:--max-line-length 80} magic_app/ test/ + +[testenv:sort] +skipdist = True +deps = isort +commands = isort {posargs:-c} -sp setup.cfg magic_app/ test/ + +[testenv:format] +skipdist = True +deps = black +commands = black {posargs:--check} magic_app/ test/ + +[testenv:type] +skipdist = True +deps = mypy +commands = mypy {posargs:--ignore-missing-imports} magic_app/ test/ + +[testenv:release] +deps = twine +commands = + rm -rf {toxworkdir}/dist + python -m setup sdist --dist-dir {toxworkdir}/dist bdist_wheel + python -m setup sdist --dist-dir {toxworkdir}/dist bdist_egg + twine upload {toxworkdir}/dist/* +whitelist_externals = + rm +""" + +[tool.isort] +include_trailing_comma = true +known_first_party = "magic_app" +known_third_party = "pytest" +line_length = 80 +multi_line_output = 3 +skip = ".venv,.tox" diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 08ee201..0000000 --- a/setup.cfg +++ /dev/null @@ -1,13 +0,0 @@ -[tool:pytest] -testpaths = test - -[flake8] -max-line-length = 80 - -[isort] -include_trailing_comma = True -known_first_party = magic_app -known_third_party = pytest -line_length = 80 -multi_line_output = 3 -skip = .venv, .tox diff --git a/tox.ini b/tox.ini deleted file mode 100644 index 2a6f9e9..0000000 --- a/tox.ini +++ /dev/null @@ -1,46 +0,0 @@ -[tox] -envlist = - py38 - lint - sort - format - type -skip_missing_interpreters = True -isolated_build = True - -[testenv] - -[testenv:lint] -description = lint the source -skipdist = True -deps = flake8 -commands = flake8 {posargs} magic_app/ test/ - -[testenv:sort] -description = sort the source -skipdist = True -deps = isort -commands = isort {posargs:-c} -sp setup.cfg magic_app/ test/ - -[testenv:format] -description = format the source -skipdist = True -deps = black -commands = black {posargs:--check} magic_app/ test/ - -[testenv:type] -description = type check the source -skipdist = True -deps = mypy -commands = mypy magic_app/ test/ - -[testenv:release] -description = make a release -deps = twine -commands = - rm -rf {toxworkdir}/dist - python -m setup sdist --dist-dir {toxworkdir}/dist bdist_wheel - python -m setup sdist --dist-dir {toxworkdir}/dist bdist_egg - twine upload {toxworkdir}/dist/* -whitelist_externals = - rm