From 5937ebc1e99cb79011e1ac006f408fb694883942 Mon Sep 17 00:00:00 2001 From: Sam Clements Date: Mon, 29 Aug 2022 15:45:44 +0100 Subject: [PATCH] Run black/flake8/mypy in tox --- setup.cfg | 3 ++- tox.ini | 19 ++++++++++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index dc26ecf..126d585 100644 --- a/setup.cfg +++ b/setup.cfg @@ -2,7 +2,7 @@ universal = 1 [flake8] -exclude = .tox,colorlog/tests,venv +exclude = .tox,.venv ignore = W503 max-line-length = 88 @@ -10,4 +10,5 @@ max-line-length = 88 addopts = -p no:logging [mypy] +files = colorlog,doc ignore_missing_imports = True diff --git a/tox.ini b/tox.ini index 79718ae..34dece3 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,23 @@ [tox] -envlist = py36,py37,py38,py39,py310 +envlist = black,flake8,mypy,py36,py37,py38,py39,py310 [testenv] deps = pytest commands = pytest -v + +[testenv:black] +deps = black +commands = black --check colorlog doc +skip_install = true + +[testenv:flake8] +deps = flake8 +commands = flake8 colorlog doc +skip_install = true + +[testenv:mypy] +deps = + mypy + types-PyYAML +commands = mypy colorlog doc +skip_install = true