From 71782dcd8f67607ae48ea98af9ec44967a752701 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 11 Oct 2024 11:02:30 +0530 Subject: [PATCH] chore: pre-commit autoupdate (#301) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: pre-commit autoupdate updates: - [github.com/pre-commit/pre-commit-hooks: v4.6.0 → v5.0.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.6.0...v5.0.0) - [github.com/tox-dev/tox-ini-fmt: 1.3.1 → 1.4.1](https://github.com/tox-dev/tox-ini-fmt/compare/1.3.1...1.4.1) - [github.com/astral-sh/ruff-pre-commit: v0.6.3 → v0.6.9](https://github.com/astral-sh/ruff-pre-commit/compare/v0.6.3...v0.6.9) - [github.com/jsh9/pydoclint: 0.5.6 → 0.5.9](https://github.com/jsh9/pydoclint/compare/0.5.6...0.5.9) - [github.com/pycqa/pylint.git: v3.2.7 → v3.3.1](https://github.com/pycqa/pylint.git/compare/v3.2.7...v3.3.1) * Fix pylint failures --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: shatakshiiii --- .pre-commit-config.yaml | 10 +++++----- src/ansible_creator/output.py | 2 +- tests/units/test_init.py | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c4f8b0a..f410ca7 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -7,7 +7,7 @@ ci: repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.6.0 + rev: v5.0.0 hooks: - id: check-added-large-files - id: check-merge-conflict @@ -54,12 +54,12 @@ repos: - id: toml-sort-fix - repo: https://github.com/tox-dev/tox-ini-fmt - rev: 1.3.1 + rev: 1.4.1 hooks: - id: tox-ini-fmt - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.6.3 + rev: v0.6.9 hooks: - id: ruff args: @@ -72,7 +72,7 @@ repos: name: Spell check with cspell - repo: https://github.com/jsh9/pydoclint - rev: "0.5.6" + rev: "0.5.9" hooks: - id: pydoclint # This allows automatic reduction of the baseline file when needed. @@ -80,7 +80,7 @@ repos: pass_filenames: false - repo: https://github.com/pycqa/pylint.git - rev: v3.2.7 + rev: v3.3.1 hooks: - id: pylint args: diff --git a/src/ansible_creator/output.py b/src/ansible_creator/output.py index 1f8e848..f2d22f6 100644 --- a/src/ansible_creator/output.py +++ b/src/ansible_creator/output.py @@ -251,7 +251,7 @@ def to_lines( class Output: """Output functionality.""" - def __init__( # noqa: PLR0913 + def __init__( # noqa: PLR0913 # pylint: disable=too-many-positional-arguments self: Output, log_file: str, log_level: str, diff --git a/tests/units/test_init.py b/tests/units/test_init.py index 287baea..57fdeab 100644 --- a/tests/units/test_init.py +++ b/tests/units/test_init.py @@ -413,7 +413,7 @@ def test_name_in_devfile_collection(cli_args_collection: Config) -> None: init = Init(cli_args_collection) unique_name = init.unique_name_in_devfile() assert unique_name.startswith("testns.testname-") - uuid_part = unique_name.split("-")[-1] # Extract the UUID part + uuid_part = unique_name.rsplit("-", maxsplit=1)[-1] # Extract the UUID part assert len(uuid_part) == UUID_LENGTH, "UUID part length mismatch" @@ -428,5 +428,5 @@ def test_name_in_devfile_playbook( init = Init(cli_args_playbook) unique_name = init.unique_name_in_devfile() assert unique_name.startswith("foo.bar-") - uuid_part = unique_name.split("-")[-1] # Extract the UUID part + uuid_part = unique_name.rsplit("-", maxsplit=1)[-1] # Extract the UUID part assert len(uuid_part) == UUID_LENGTH, "UUID part length mismatch"