mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-25 05:02:46 +00:00
Replace % string formatting with f-strings across multiple plugins (#11908)
* Replace % string formatting with f-strings across multiple plugins Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com> * Add changelog fragment for PR 11908 Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
253ac45dd3
commit
53397c081a
14 changed files with 65 additions and 64 deletions
|
|
@ -137,10 +137,8 @@ def _keys_filter_target_dict(
|
|||
tr = map(re.compile, before)
|
||||
return list(zip(tr, after))
|
||||
except re.error as e:
|
||||
msg = (
|
||||
"The attributes before must be valid regex if matching_parameter=regex."
|
||||
" Not all items are valid regex in: %s"
|
||||
)
|
||||
raise AnsibleFilterError(msg % before) from e
|
||||
raise AnsibleFilterError(
|
||||
f"The attributes before must be valid regex if matching_parameter=regex. Not all items are valid regex in: {before}"
|
||||
) from e
|
||||
else:
|
||||
return list(zip(before, after))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue