mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-19 11:20:22 -07:00
callback plugins: use f-strings (#9321)
* callback plugins: use f-strings * add changelog frag * manual change for few occurrences * manual change for few occurrences * adjustment from review * adjustment from review * adjustment from review * Update plugins/callback/splunk.py Co-authored-by: Felix Fontein <felix@fontein.de> * replace str templating with JSON templating --------- Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
parent
6e84c1375e
commit
c3ed2144e2
22 changed files with 251 additions and 253 deletions
|
@ -114,7 +114,7 @@ class CallbackModule(CallbackBase):
|
|||
max_results = int(f.read().strip()) / 1024 / 1024
|
||||
|
||||
self._display.banner('CGROUP MEMORY RECAP')
|
||||
self._display.display('Execution Maximum: %0.2fMB\n\n' % max_results)
|
||||
self._display.display(f'Execution Maximum: {max_results:0.2f}MB\n\n')
|
||||
|
||||
for task, memory in self.task_results:
|
||||
self._display.display('%s (%s): %0.2fMB' % (task.get_name(), task._uuid, memory))
|
||||
self._display.display(f'{task.get_name()} ({task._uuid}): {memory:0.2f}MB')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue