1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-02-04 07:51:50 +00:00

modules g*: use f-strings (#10958)

* modules g*: use f-strings

* add changelog frag

* remove extraneous to_native()
This commit is contained in:
Alexei Znamensky 2025-10-25 11:54:38 +13:00 committed by GitHub
parent a3987c9844
commit b67e7c83cf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
31 changed files with 250 additions and 245 deletions

View file

@ -183,7 +183,7 @@ def main():
base_args.append('-f')
base_args.append(params['file'])
elif scope:
base_args.append("--" + scope)
base_args.append(f"--{scope}")
list_args = list(base_args)
@ -210,7 +210,7 @@ def main():
set_args.append("--unset-all")
set_args.append(name)
else:
set_args.append("--" + add_mode)
set_args.append(f"--{add_mode}")
set_args.append(name)
set_args.append(new_value)
@ -248,7 +248,7 @@ def build_diff_value(value):
if not value:
return "\n"
if len(value) == 1:
return value[0] + "\n"
return f"{value[0]}\n"
return value