mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 06:12:51 +00:00
[PR #10285/3ab7a898 backport][stable-11] replace concatenations with f-string in plugins (#10290)
replace concatenations with f-string in plugins (#10285)
* replace concatenations with f-string in plugins
* add changelog frag
(cherry picked from commit 3ab7a898c6)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user