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:
1 parent
3289c0d430
commit
6b930a0f7e
1 file changed
+4
-4
@@ -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
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user