mirror of
https://github.com/httpie/cli.git
synced 2026-06-20 11:32:56 +02:00
Annotate formatters and processing
This commit is contained in:
1 parent
d603502960
commit
30624e66ec
4 files changed
+26
-11
No files matched your search
@@ -40,12 +40,12 @@ class Formatting:
|
||||
if p.enabled:
|
||||
self.enabled_plugins.append(p)
|
||||
|
||||
def format_headers(self, headers):
|
||||
def format_headers(self, headers: str) -> str:
|
||||
for p in self.enabled_plugins:
|
||||
headers = p.format_headers(headers)
|
||||
return headers
|
||||
|
||||
def format_body(self, content, mime):
|
||||
def format_body(self, content: str, mime: str) -> str:
|
||||
if is_valid_mime(mime):
|
||||
for p in self.enabled_plugins:
|
||||
content = p.format_body(content, mime)
|
||||
|
||||
Reference in new issue
Block a user