Annotate formatters and processing

This commit is contained in:
Jakub Roztocil committed 2019-08-31 19:13:36 +02:00
1 parent d603502960
commit 30624e66ec
4 files changed
+26 -11

No files matched your search

+2 -2
View File
@@ -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)