From 6b930a0f7e92cc43a7c383b273b2c10ea1a7b1cb Mon Sep 17 00:00:00 2001 From: Defame1297 Date: Sat, 14 Nov 2026 15:44:11 +0000 Subject: [PATCH] fix(tests): drop a name that ansible-test sanity pylint disallows The Build check failed in ansible-test sanity: pylint reported tests/scripts/test_ansible_lint_wrapper.py:37:13 disallowed-name for `_`, from unpacking the middle of str.partition. Ruff accepts the name, but the pylint configuration of ansible-test, which also scans the Python under tests/, does not. Index the partition result instead. Reproduced locally with ansible-test sanity --test pylint on a copy of the tree under ansible_collections/mortis/kamino: the committed file fails with the same message, this one passes. Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_014uGZTNmHMc85bomfevwUDG --- tests/scripts/test_ansible_lint_wrapper.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/scripts/test_ansible_lint_wrapper.py b/tests/scripts/test_ansible_lint_wrapper.py index 136e7d2..2eb8111 100644 --- a/tests/scripts/test_ansible_lint_wrapper.py +++ b/tests/scripts/test_ansible_lint_wrapper.py @@ -34,11 +34,11 @@ def parsed(stdout): """{key: value} of the stub's output; `link` may repeat, so it is collected in a list.""" out = {"link": []} for line in stdout.splitlines(): - key, _, value = line.partition("=") - if key == "link": - out["link"].append(value) + parts = line.partition("=") + if parts[0] == "link": + out["link"].append(parts[2]) else: - out[key] = value + out[parts[0]] = parts[2] return out