From 56fea60595a5ff46d7c1ff2b34f66cf1d5a869c2 Mon Sep 17 00:00:00 2001 From: Haibo Lin Date: Fri, 7 Feb 2020 12:06:57 +0800 Subject: [PATCH] Run flake8 and black via tox JIRA: COMPOSE-4108 Signed-off-by: Haibo Lin --- .gitignore | 1 + tox.ini | 19 ++++++++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 97e12f37..07fb4417 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ tests/_composes htmlcov/ .coverage .idea/ +.tox diff --git a/tox.ini b/tox.ini index a6e5b7bc..0d66a847 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,22 @@ +[tox] +envlist = py27, py36 + +[testenv] +deps = + flake8 +commands = + flake8 pungi pungi_utils setup.py tests/*py + +[testenv:py36] +deps = + {[testenv]deps} + black +commands = + {[testenv]commands} + black --check pungi pungi_utils setup.py tests --exclude tests/_composes + [flake8] -exclude = doc/*,*.pyc,*.py~,*.in,*.spec,*.sh,*.rst,setup.py +exclude = doc/*,*.pyc,*.py~,*.in,*.spec,*.sh,*.rst filename = *.py max-line-length = 88