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 <[email protected]>
Claude-Session: https://claude.ai/code/session_014uGZTNmHMc85bomfevwUDG
This commit is contained in:
Defame1297andClaude Sonnet 5.5 committed 2026-11-14 15:44:11 +00:00
1 parent 3289c0d430
commit 6b930a0f7e
1 file changed
+4 -4
+4 -4
View File
@@ -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