mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-02 19:32:47 +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:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user