1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-04-21 03:09:04 +00:00

replace concatenations with f-string in plugins (#10285)

* replace concatenations with f-string in plugins

* add changelog frag
This commit is contained in:
Alexei Znamensky 2025-06-24 07:10:19 +12:00 committed by GitHub
parent d4f2b2fb55
commit 3ab7a898c6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 20 additions and 14 deletions

View file

@ -143,11 +143,11 @@ def jc_filter(data, parser, quiet=True, raw=False):
# old API (jc v1.17.7 and lower)
else:
jc_parser = importlib.import_module('jc.parsers.' + parser)
jc_parser = importlib.import_module(f'jc.parsers.{parser}')
return jc_parser.parse(data, quiet=quiet, raw=raw)
except Exception as e:
raise AnsibleFilterError('Error in jc filter plugin: %s' % e)
raise AnsibleFilterError(f'Error in jc filter plugin: {e}')
class FilterModule(object):