From 2b0ae8ace10deb486dfb6d94f1bd2ddcf55bf75e Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 1 Jan 2024 19:15:26 +0000 Subject: [PATCH 1/2] chore(pre-commit): autoupdate :arrow_up: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit TIP: you can trigger a re-run on a pull request by commenting `pre-commit.ci run` (must appear on a line by itself) updates: - [github.com/alessandrojcm/commitlint-pre-commit-hook: v9.4.0 → v9.10.0](https://github.com/alessandrojcm/commitlint-pre-commit-hook/compare/v9.4.0...v9.10.0) - [github.com/pre-commit/pre-commit-hooks: v4.4.0 → v4.5.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.4.0...v4.5.0) - [github.com/pre-commit/mirrors-prettier: v3.0.0-alpha.6 → v4.0.0-alpha.8](https://github.com/pre-commit/mirrors-prettier/compare/v3.0.0-alpha.6...v4.0.0-alpha.8) - [github.com/adrienverge/yamllint: v1.30.0 → v1.33.0](https://github.com/adrienverge/yamllint/compare/v1.30.0...v1.33.0) - [github.com/asottile/pyupgrade: v3.3.1 → v3.15.0](https://github.com/asottile/pyupgrade/compare/v3.3.1...v3.15.0) - [github.com/pre-commit/pre-commit-hooks: v4.4.0 → v4.5.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.4.0...v4.5.0) - [github.com/asottile/setup-cfg-fmt: v2.2.0 → v2.5.0](https://github.com/asottile/setup-cfg-fmt/compare/v2.2.0...v2.5.0) - [github.com/pre-commit/mirrors-mypy: v1.1.1 → v1.8.0](https://github.com/pre-commit/mirrors-mypy/compare/v1.1.1...v1.8.0) - [github.com/psf/black: 23.3.0 → 23.12.1](https://github.com/psf/black/compare/23.3.0...23.12.1) - https://github.com/asottile/reorder_python_imports → https://github.com/asottile/reorder-python-imports - [github.com/asottile/reorder-python-imports: v3.9.0 → v3.12.0](https://github.com/asottile/reorder-python-imports/compare/v3.9.0...v3.12.0) - [github.com/PyCQA/docformatter: v1.5.1 → v1.7.5](https://github.com/PyCQA/docformatter/compare/v1.5.1...v1.7.5) - [github.com/pycqa/flake8: 6.0.0 → 6.1.0](https://github.com/pycqa/flake8/compare/6.0.0...6.1.0) --- .pre-commit-config.yaml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0d9cfe4..c2d51a1 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,14 +4,14 @@ repos: ### GENERAL ### - repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook - rev: v9.4.0 + rev: v9.10.0 hooks: - id: commitlint stages: [commit-msg] additional_dependencies: ["@commitlint/config-conventional"] - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 + rev: v4.5.0 hooks: - id: check-case-conflict - id: check-symlinks @@ -34,25 +34,25 @@ repos: # opinionated code formatter for all things frontend (also includes Markdown, JSON, YAML) - repo: https://github.com/pre-commit/mirrors-prettier - rev: v3.0.0-alpha.6 + rev: v4.0.0-alpha.8 hooks: - id: prettier - repo: https://github.com/adrienverge/yamllint - rev: v1.30.0 + rev: v1.33.0 hooks: - id: yamllint args: [-c=.yamllint] ### PYTHON ### - repo: https://github.com/asottile/pyupgrade - rev: v3.3.1 + rev: v3.15.0 hooks: - id: pyupgrade args: [--py37-plus] - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 + rev: v4.5.0 hooks: - id: check-ast - id: check-builtin-literals @@ -62,32 +62,32 @@ repos: - id: requirements-txt-fixer - repo: https://github.com/asottile/setup-cfg-fmt - rev: v2.2.0 + rev: v2.5.0 hooks: - id: setup-cfg-fmt - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.1.1 + rev: v1.8.0 hooks: - id: mypy additional_dependencies: ["attrs>=21.0,<22", "types-PyYAML"] # as per setup.cfg # the uncompromising (opinionated / barely configurable) PEP8 Python code formatter. - repo: https://github.com/psf/black - rev: "23.3.0" + rev: "23.12.1" hooks: - id: black # isort alternative - - repo: https://github.com/asottile/reorder_python_imports - rev: v3.9.0 + - repo: https://github.com/asottile/reorder-python-imports + rev: v3.12.0 hooks: - id: reorder-python-imports args: [--py37-plus, --add-import, "from __future__ import annotations"] # formats docstrings to follow PEP 257. - repo: https://github.com/PyCQA/docformatter - rev: v1.5.1 + rev: v1.7.5 hooks: - id: docformatter args: [--in-place] @@ -99,7 +99,7 @@ repos: # some third-party plugins # …to check the style and quality of python code. - repo: https://github.com/pycqa/flake8 - rev: "6.0.0" + rev: "6.1.0" hooks: - id: flake8 From b91167fa673c074794a4818120358db0bbe094fc Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 1 Jan 2024 19:16:27 +0000 Subject: [PATCH 2/2] chore(pre-commit): auto fixes from hooks :rotating_light: for more information, see https://pre-commit.ci --- ansible_roles_scripts/cruft.py | 17 ++++++++--------- ansible_roles_scripts/script_utils.py | 7 ++++--- setup.cfg | 4 ++-- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/ansible_roles_scripts/cruft.py b/ansible_roles_scripts/cruft.py index 680c55b..26962ba 100644 --- a/ansible_roles_scripts/cruft.py +++ b/ansible_roles_scripts/cruft.py @@ -160,17 +160,16 @@ def main(push: bool, repo_name_filter: str, silent: bool, verbosity: int) -> int """Script to loop through all ANSIBLE repositories (`all-repos-in.json`), execute `cruft update ...` / `pre-commit run ...` and commit the results. - This script relies on the machine executing this script - to have the appropiate command lines tools installed - and accessible from the within current PATH. + This script relies on the machine executing this script to have the + appropiate command lines tools installed and accessible from the + within current PATH. - To actually push the results you need to add the option `-P` - for safety reason. + To actually push the results you need to add the option `-P` for + safety reason. - This script recognizes cruft- and git-conflicts, - aborting the operation for a given repository - if any were found and notifies of the required - manual intervention needed. + This script recognizes cruft- and git-conflicts, aborting the + operation for a given repository if any were found and notifies of + the required manual intervention needed. """ utils.init(verbosity=verbosity, silent=silent) retv = 1 diff --git a/ansible_roles_scripts/script_utils.py b/ansible_roles_scripts/script_utils.py index 1171f95..b51f0c1 100644 --- a/ansible_roles_scripts/script_utils.py +++ b/ansible_roles_scripts/script_utils.py @@ -218,7 +218,8 @@ def get_all_cloned_github_repositories() -> list[Path]: """Recurse the 'all-repos' directory and return each directory that has github info. - :return: A list of directories of which origin/master points to github + :return: A list of directories of which origin/master points to + github """ all_repos = [ @@ -233,8 +234,8 @@ def get_all_cloned_ansible_repositories() -> list[Path]: """Recurse the 'all-repos' directory and return each directory that has cookiecutter info. - :return: A list of directories found to be valid ansible roles - (i.e. cruft'ed from my cookiecutter). + :return: A list of directories found to be valid ansible roles (i.e. + cruft'ed from my cookiecutter). """ all_repos = [ diff --git a/setup.cfg b/setup.cfg index 7968e2d..6f49b31 100644 --- a/setup.cfg +++ b/setup.cfg @@ -7,7 +7,7 @@ url = https://github.com/JonasPammer/ansible-roles author = Jonas Pammer author_email = opensource@jonaspammer.at license = MIT -license_file = LICENSE +license_files = LICENSE classifiers = Development Status :: 1 - Planning Environment :: Console @@ -35,7 +35,7 @@ install_requires = rich types-PyYAML verboselogs -python_requires = >=3.7 +python_requires = >=3.8 [options.packages.find] exclude =