mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 06:12:51 +00:00
use f-strings (#10899)
* use f-strings * add changelog frag * Apply suggestions from code review Co-authored-by: Felix Fontein <felix@fontein.de> --------- Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
@@ -49,8 +49,7 @@ from ansible.errors import AnsibleFilterError
|
||||
|
||||
def list_accumulate(sequence):
|
||||
if not isinstance(sequence, Sequence):
|
||||
raise AnsibleFilterError('Invalid value type (%s) for accumulate (%r)' %
|
||||
(type(sequence), sequence))
|
||||
raise AnsibleFilterError(f'Invalid value type ({type(sequence)}) for accumulate ({sequence!r})')
|
||||
|
||||
return accumulate(sequence)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user