Squeeze all files into pyproject
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Luke Murphy 2020-07-05 03:11:22 +02:00
parent dbdd2a2a84
commit e86f162b84
No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC
4 changed files with 48 additions and 63 deletions

View File

@ -1,4 +0,0 @@
[mypy]
python_version = 3.8
platform = linux
ignore_missing_imports = True

View File

@ -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"

View File

@ -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

46
tox.ini
View File

@ -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