1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-04-27 05:58:50 +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

@ -160,8 +160,6 @@ EXAMPLES = r"""
from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.urls import fetch_url
ROCKETCHAT_INCOMING_WEBHOOK = "%s://%s/hooks/%s"
def build_payload_for_rocketchat(
module, text, channel, username, icon_url, icon_emoji, link_names, color, attachments, is_pre740
@ -205,7 +203,7 @@ def do_notify_rocketchat(module, domain, token, protocol, payload, is_pre740):
if token.count("/") < 1:
module.fail_json(msg="Invalid Token specified, provide a valid token")
rocketchat_incoming_webhook = ROCKETCHAT_INCOMING_WEBHOOK % (protocol, domain, token)
rocketchat_incoming_webhook = f"{protocol}://{domain}/hooks/{token}"
headers = None
if not is_pre740: