xoxys.general/plugins/filter/prefix.py

16 lines
305 B
Python
Raw Normal View History

2020-08-18 13:10:09 +00:00
"""Filter to prefix all itams from a list."""
2023-01-30 13:20:45 +00:00
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
2020-08-18 13:10:09 +00:00
def prefix(value, prefix="--"):
return [prefix + x for x in value]
2023-01-30 13:20:45 +00:00
class FilterModule(object): # noqa
2020-08-18 13:10:09 +00:00
def filters(self):
return {"prefix": prefix}