Add more types and docs for plugins API II.

This commit is contained in:
Jakub Roztocil 2021-10-06 19:28:21 +02:00
parent e1627803fe
commit 7e0bed4e54

View File

@ -106,9 +106,9 @@ class ConverterPlugin(BasePlugin):
def __init__(self, mime: str): def __init__(self, mime: str):
self.mime = mime self.mime = mime
def convert(self, content_bytes: bytes) -> Tuple[str, Union[str, bytes]]: def convert(self, body: bytes) -> Tuple[str, str]:
""" """
Convert content as needed and return a tuple containing the new Content-Type and content, e.g.: Convert content bytes to a string and return a tuple containing the new Content-Type and content, e.g.:
('application/json', '{}') ('application/json', '{}')
""" """