1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-04-23 20:29:08 +00:00

modules [jk]*: use f-strings (#10970)

* modules [jk]*: use f-strings

* add changelog frag

* Apply suggestions from code review

* typing insanity
This commit is contained in:
Alexei Znamensky 2025-10-26 19:54:15 +13:00 committed by GitHub
parent 8120e9347e
commit 4a6a449fbd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
46 changed files with 363 additions and 408 deletions

View file

@ -178,8 +178,7 @@ def main():
# "clientId"
cid = kc.get_client_id(client_id, realm=realm)
if not cid:
module.fail_json(msg='Invalid client %s for realm %s' %
(client_id, realm))
module.fail_json(msg=f'Invalid client {client_id} for realm {realm}')
# Get current state of the Authorization Scope using its name as the search
# filter. This returns False if it is not found.
@ -267,8 +266,7 @@ def main():
elif not before_authz_scope and state == 'absent':
result['changed'] = False
else:
module.fail_json(msg='Unable to determine what to do with authorization scope %s of client %s in realm %s' % (
name, client_id, realm))
module.fail_json(msg=f'Unable to determine what to do with authorization scope {name} of client {client_id} in realm {realm}')
module.exit_json(**result)