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

modules p*: use f-strings (#10974)

* modules p*: use f-strings

* add changelog frag
This commit is contained in:
Alexei Znamensky 2025-10-26 19:48:51 +13:00 committed by GitHub
parent d51e4c188b
commit 8120e9347e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
42 changed files with 299 additions and 300 deletions

View file

@ -106,7 +106,7 @@ def main():
# Try to spot where this has happened and fix it.
for fragment in params['name']:
if re.search(r'^\d+(?:\.\d+)*', fragment) and packages and re.search(r'@[^,]*$', packages[-1]):
packages[-1] += ',' + fragment
packages[-1] += f",{fragment}"
else:
packages.append(fragment)
@ -151,7 +151,7 @@ def ensure(module, state, packages, params):
accept_licenses = []
if params['be_name']:
beadm = ['--be-name=' + module.params['be_name']]
beadm = [f"--be-name={module.params['be_name']}"]
else:
beadm = []