mirror of https://github.com/sgoudham/Enso-Bot.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
526 B
Python
21 lines
526 B
Python
4 years ago
|
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
|