xoxys.general/plugins/filter/wrap.py

15 lines
305 B
Python

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