1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-04-10 14:05:07 +00:00

modules bc*: use f-strings (#10945)

* modules bc*: use f-strings

* no quotes or backticks inside f-strs

* add changelog frag

* rename chglof frag file

* rename chglof frag file

* copr: re-applied change maintain original logic
This commit is contained in:
Alexei Znamensky 2025-10-25 12:45:40 +13:00 committed by GitHub
parent f9b4abf930
commit 0ef2235929
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
31 changed files with 197 additions and 202 deletions

View file

@ -238,7 +238,7 @@ def main():
for option in default_options:
if option in available_options:
option = "--%s" % option
option = f"--{option}"
options.append(option)
option_params = {
@ -255,14 +255,14 @@ def main():
for param, option in option_params.items():
if module.params.get(param) and option in available_options:
option = "--%s" % option
option = f"--{option}"
options.append(option)
if module.check_mode:
if 'dry-run' in available_options:
options.append('--dry-run')
else:
module.exit_json(skipped=True, msg="command '%s' does not support check mode, skipping" % command)
module.exit_json(skipped=True, msg=f"command '{command}' does not support check mode, skipping")
rc, out, err = composer_command(module, [command], arguments, options)