1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-04-24 20:59:16 +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

@ -4122,8 +4122,10 @@ class RedfishUtils:
# Get Registries URI
if "Bios" not in server_details:
msg = "Getting BIOS URI failed, Key 'Bios' not found in /redfish/v1/Systems/1/ response: %s"
return {"ret": False, "msg": msg % str(server_details)}
return {
"ret": False,
"msg": f"Getting BIOS URI failed, Key 'Bios' not found in /redfish/v1/Systems/1/ response: {server_details}",
}
bios_uri = server_details["Bios"]["@odata.id"]
bios_resp = self.get_request(self.root_uri + bios_uri)
@ -4169,8 +4171,10 @@ class RedfishUtils:
if isinstance(loc["Uri"], dict) and "extref" in loc["Uri"].keys():
rsp_uri = loc["Uri"]["extref"]
if not rsp_uri:
msg = "Language 'en' not found in BIOS Attribute Registries location, URI: %s, response: %s"
return {"ret": False, "msg": msg % (resp_uri, str(resp_data))}
return {
"ret": False,
"msg": f"Language 'en' not found in BIOS Attribute Registries location, URI: {resp_uri}, response: {resp_data}",
}
res = self.get_request(self.root_uri + rsp_uri)
if res["ret"] is False: