1
0
Fork 0
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:
Alexei Znamensky 2026-04-22 07:06:27 +12:00 committed by GitHub
parent 253ac45dd3
commit 53397c081a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 65 additions and 64 deletions

View file

@ -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))