xoxys.general/plugins/filter/prefix.py

15 lines
302 B
Python

"""Filter to prefix all itams from a list."""
from __future__ import absolute_import, division, print_function
__metaclass__ = type
def prefix(value, prefix="--"):
return [prefix + x for x in value]
class FilterModule(object): # noqa
def filters(self):
return {"prefix": prefix}