From 7be0e83922d54e2e547171a36aea1abc8dd1316f Mon Sep 17 00:00:00 2001 From: nir0s Date: Fri, 20 Nov 2020 23:05:49 +0200 Subject: [PATCH] Optimize tox config and add blackening --- .gitignore | 1 + pyproject.toml | 19 +++++++++++++++++++ tox.ini | 17 +++++++++-------- 3 files changed, 29 insertions(+), 8 deletions(-) create mode 100644 pyproject.toml diff --git a/.gitignore b/.gitignore index 5e086e3..d62d075 100644 --- a/.gitignore +++ b/.gitignore @@ -62,3 +62,4 @@ docs/_build/ .qbcache/ pytype_output/ +.pytype/ diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..d48f87d --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,19 @@ +[tool.black] +line-length = 120 +skip-string-normalization = true +target-version = ['py35', 'py36', 'py37'] +exclude = ''' +/( + \.eggs + | \.git + | \.hg + | \.mypy_cache + | \.tox + | \.venv + | _build + | buck-out + | build + | dist + | tests +)/ +''' diff --git a/tox.ini b/tox.ini index bc53146..15075ef 100644 --- a/tox.ini +++ b/tox.ini @@ -1,14 +1,13 @@ [tox] -minversion = 1.7.2 -envlist = py3pylint, py3pytype, py35, py36, py37 +minversion = 3.15.0 +envlist = pylint, pytype, black, py35, py36, py37 skip_missing_interpreters = true [testenv] deps = -rdev-requirements.txt - -rtest-requirements.txt codecov -passenv = CI TRAVIS TRAVIS_* +passenv = CI commands = pytest --cov-report term-missing --cov wryte tests -v [testenv:pywin] @@ -19,12 +18,14 @@ deps = commands = pytest --cov-report term-missing --cov wryte tests -v passenv = ProgramFiles APPVEYOR LOGNAME USER LNAME USERNAME HOME USERPROFILE -[testenv:py3pylint] +[testenv:pylint] basepython = python3.7 -deps = pylint commands = pylint wryte.py -[testenv:py3pytype] +[testenv:pytype] basepython = python3.7 -deps = pytype commands = pytype wryte.py + +[testenv:black] +basepython = python3.7 +commands = black . --check