From 79f90b38816e28c941171b0097d5d24d4b956274 Mon Sep 17 00:00:00 2001 From: Jonas L Date: Fri, 15 Sep 2023 10:25:22 +0200 Subject: [PATCH] chore: add dev config (#326) ##### SUMMARY Add configuration files to simplify the dev setup for the project. This will help IDEs to provide insight during development. Pylint is already run by the ansible-test sanity checks. --- Makefile | 7 +++++++ pyproject.toml | 21 +++++++++++++++++++++ requirements.txt | 11 +++++++++++ 3 files changed, 39 insertions(+) create mode 100644 requirements.txt diff --git a/Makefile b/Makefile index e44dbb8..a218498 100644 --- a/Makefile +++ b/Makefile @@ -4,6 +4,13 @@ SHELL := bash vendor: python3 scripts/vendor.py +venv: + python3 -m venv venv + venv/bin/pip install -r requirements.txt + +lint: venv + venv/bin/pylint plugins + clean: git clean -xdf \ -e tests/integration/cloud-config-hcloud.ini diff --git a/pyproject.toml b/pyproject.toml index 737a304..f60460a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,3 +4,24 @@ line-length = 120 [tool.isort] profile = "black" combine_as_imports = true + +[tool.pylint.main] +py-version = "3.8" +recursive = true +jobs = 0 + +max-line-length = 120 +ignore-paths = [ + "plugins/module_utils/vendor", +] + +[tool.pylint.reports] +output-format = "colorized" + +[tool.pylint.basic] +good-names = ["i", "j", "k", "ex", "_", "ip", "id"] + +[tool.pylint.messages_control] +disable = [ + "wrong-import-position", +] diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..7799fd6 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,11 @@ +ansible-core>=2.13 + +# Collections requirements +netaddr +cryptography + +python-dateutil +requests + +# Development requirements +pylint