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.
20 lines
505 B
Python
20 lines
505 B
Python
4 years ago
|
import abc
|
||
|
|
||
|
|
||
|
class FormatterBase(metaclass=abc.ABCMeta):
|
||
|
"""Base class for example plugin used in the tutorial.
|
||
|
"""
|
||
|
|
||
|
def __init__(self, max_width=60):
|
||
|
self.max_width = max_width
|
||
|
|
||
|
@abc.abstractmethod
|
||
|
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:?)
|
||
|
:returns: Iterable producing the formatted text.
|
||
|
"""
|