From f820268993954184c0ae13b48e49fe99c1055255 Mon Sep 17 00:00:00 2001 From: Maxwell G Date: Sun, 11 Feb 2024 00:30:13 +0000 Subject: [PATCH] add tox.ini to run linters --- tox.ini | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 tox.ini diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..58393b8 --- /dev/null +++ b/tox.ini @@ -0,0 +1,34 @@ +[tox] +env_list = + formatters + lint + typing-py{36,39,311,312} + +[testenv:formatters] +description = Run formatters +skip_install = true +deps = + isort + black +commands = + black {posargs} ansible_collection.py ansible-generator + isort {posargs} ansible_collection.py ansible-generator + +[testenv:lint] +description = Run linters +skip_install = true +deps = + ruff +commands = + ruff {posargs} ansible_collection.py ansible-generator + +[testenv:typing-py{36,39,311,312}] +description = Run type checkers +skip_install = true +deps = + mypy + types-pyyaml +commands = + mypy {posargs} ansible_collection.py ansible-generator +set_env = + PYTHONPATH=${PWD}