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"