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:
parent
d51e4c188b
commit
8120e9347e
42 changed files with 299 additions and 300 deletions
|
|
@ -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 = []
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue