mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-02-04 07:51:50 +00:00
fix ruff case SIM112 (#11190)
This commit is contained in:
parent
19757b3a4c
commit
9a3e26ad98
4 changed files with 4 additions and 3 deletions
2
changelogs/fragments/11190-ruff-cases-7.yml
Normal file
2
changelogs/fragments/11190-ruff-cases-7.yml
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
minor_changes:
|
||||||
|
- wsl connection plugin - adjust variable name for integration tests (https://github.com/ansible-collections/community.general/pull/11190).
|
||||||
|
|
@ -587,7 +587,7 @@ class Connection(ConnectionBase):
|
||||||
args.extend(["--user", wsl_user])
|
args.extend(["--user", wsl_user])
|
||||||
args.extend(["--"])
|
args.extend(["--"])
|
||||||
args.extend(shlex.split(cmd))
|
args.extend(shlex.split(cmd))
|
||||||
if os.getenv("_ANSIBLE_TEST_WSL_CONNECTION_PLUGIN_Waeri5tepheeSha2fae8"):
|
if os.getenv("_ANSIBLE_TEST_WSL_CONNECTION_PLUGIN_WAERI5TEPHEESHA2FAE8"):
|
||||||
return shlex.join(args)
|
return shlex.join(args)
|
||||||
return list2cmdline(args) # see https://github.com/python/cpython/blob/3.11/Lib/subprocess.py#L576
|
return list2cmdline(args) # see https://github.com/python/cpython/blob/3.11/Lib/subprocess.py#L576
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,6 @@ ignore = [
|
||||||
"B026", # star-arg-unpacking-after-keyword-arg
|
"B026", # star-arg-unpacking-after-keyword-arg
|
||||||
"SIM102", # collapsible-if
|
"SIM102", # collapsible-if
|
||||||
"SIM110", # reimplemented-builtin
|
"SIM110", # reimplemented-builtin
|
||||||
"SIM112", # uncapitalized-environment-variables
|
|
||||||
"SIM114", # if-with-same-arms
|
"SIM114", # if-with-same-arms
|
||||||
"SIM115", # open-file-with-context-handler
|
"SIM115", # open-file-with-context-handler
|
||||||
"SIM116", # if-else-block-instead-of-dict-lookup
|
"SIM116", # if-else-block-instead-of-dict-lookup
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ set -eux
|
||||||
# NB while running integration tests, the mock wsl.exe implementation is actually
|
# NB while running integration tests, the mock wsl.exe implementation is actually
|
||||||
# running on unix, instead of on running windows, so the wsl.exe command line
|
# running on unix, instead of on running windows, so the wsl.exe command line
|
||||||
# construction must use unix rules instead of windows rules.
|
# construction must use unix rules instead of windows rules.
|
||||||
export _ANSIBLE_TEST_WSL_CONNECTION_PLUGIN_Waeri5tepheeSha2fae8=1
|
export _ANSIBLE_TEST_WSL_CONNECTION_PLUGIN_WAERI5TEPHEESHA2FAE8=1
|
||||||
|
|
||||||
ANSIBLE_ROLES_PATH=../ \
|
ANSIBLE_ROLES_PATH=../ \
|
||||||
ansible-playbook dependencies.yml -v "$@"
|
ansible-playbook dependencies.yml -v "$@"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue