diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7b108a98..1e9fa691 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -47,7 +47,7 @@ repos: - id: ruff args: [--fix, --exit-non-zero-on-fix] - repo: https://github.com/ansible/ansible-lint.git - rev: v6.15.0 + rev: v6.14.6 hooks: - id: ansible-lint entry: env ANSIBLE_ROLES_PATH="$ANSIBLE_ROLES_PATH:test/roles" ansible-lint diff --git a/tools/extract_plugin_names.py b/tools/extract_plugin_names.py index 3c8638bd..259a4902 100644 --- a/tools/extract_plugin_names.py +++ b/tools/extract_plugin_names.py @@ -1,14 +1,20 @@ import sys -import toml -if len(sys.argv) != 2: - print("Usage: python toml_to_json.py ") - sys.exit(1) -filename = sys.argv[1] -with open(filename, "r") as f: - toml_data = toml.load(f) +def print_plugin_names() -> None: + import toml -result = toml_data["project"]["entry-points"]["molecule.driver"].keys() -for i in result: - print(i) + if len(sys.argv) != 2: + raise SystemExit(f"Usage: {sys.argv[0]} ") + + filename = sys.argv[1] + with open(filename) as f: + toml_data = toml.load(f) + + result = toml_data["project"]["entry-points"]["molecule.driver"].keys() + for i in result: + print(i) # noqa: T201 + + +if __name__ == "__main__": + print_plugin_names() diff --git a/tox.ini b/tox.ini index 1117c454..fa395466 100644 --- a/tox.ini +++ b/tox.ini @@ -80,7 +80,6 @@ description = Performs linting, style checks allowlist_externals = bash rm - jq deps = pre-commit toml