mirror of
https://github.com/morpheus65535/bazarr
synced 2024-12-27 10:07:22 +00:00
20 lines
526 B
Python
20 lines
526 B
Python
from stevedore.example import base
|
|
|
|
|
|
class Simple(base.FormatterBase):
|
|
"""A very basic formatter.
|
|
"""
|
|
|
|
def format(self, data):
|
|
"""Format the data and return unicode text.
|
|
|
|
:param data: A dictionary with string keys and simple types as
|
|
values.
|
|
:type data: dict(str:?)
|
|
"""
|
|
for name, value in sorted(data.items()):
|
|
line = '{name} = {value}\n'.format(
|
|
name=name,
|
|
value=value,
|
|
)
|
|
yield line
|