fix(lint): satisfy ansible-test pylint in the molecule selector
Build / build (pull_request) Successful in 11s
Lint / lint (pull_request) Successful in 24s
Molecule / molecule (pull_request) Successful in 7m0s

ansible-test sanity runs pylint over scripts/ and tests/scripts/ too and
rejects a mutable default argument (environ=os.environ) and `_` as a variable
name. main() now takes environ=None and reads os.environ itself, and the tests
name the values they ignore.

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 11:34:13 +00:00
1 parent fdab483109
commit a94bee8fd3
2 files changed
+20 -19

No files matched your search

+2 -1
View File
@@ -148,7 +148,8 @@ def changed_paths(base_ref):
return [os.fsdecode(p) for p in out.split(b"\0") if p]
def main(argv, environ=os.environ):
def main(argv, environ=None):
environ = os.environ if environ is None else environ
if len(argv) > 2:
print("usage: select_molecule_scenarios.py [<base-ref>]", file=sys.stderr)
return 2