From 7e0bed4e54c6c13f4ef8e0c8317163f0b124787a Mon Sep 17 00:00:00 2001 From: Jakub Roztocil Date: Wed, 6 Oct 2021 19:28:21 +0200 Subject: [PATCH] Add more types and docs for plugins API II. --- httpie/plugins/base.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/httpie/plugins/base.py b/httpie/plugins/base.py index 1250d744..408566df 100644 --- a/httpie/plugins/base.py +++ b/httpie/plugins/base.py @@ -106,9 +106,9 @@ class ConverterPlugin(BasePlugin): def __init__(self, mime: str): 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', '{}') """