From eb5f37a7d19d74c88eed25d4b90f98bec1afa4be Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Fri, 26 May 2017 16:14:20 +0200 Subject: fix mypy annotations --- examples/simple/custom_contentview.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'examples/simple/custom_contentview.py') diff --git a/examples/simple/custom_contentview.py b/examples/simple/custom_contentview.py index 71f92575..b958bdce 100644 --- a/examples/simple/custom_contentview.py +++ b/examples/simple/custom_contentview.py @@ -3,10 +3,6 @@ This example shows how one can add a custom contentview to mitmproxy. The content view API is explained in the mitmproxy.contentviews module. """ from mitmproxy import contentviews -import typing - - -CVIEWSWAPCASE = typing.Tuple[str, typing.Iterable[typing.List[typing.Tuple[str, typing.AnyStr]]]] class ViewSwapCase(contentviews.View): @@ -17,7 +13,7 @@ class ViewSwapCase(contentviews.View): prompt = ("swap case text", "z") content_types = ["text/plain"] - def __call__(self, data: typing.AnyStr, **metadata) -> CVIEWSWAPCASE: + def __call__(self, data, **metadata) -> contentviews.TViewResult: return "case-swapped text", contentviews.format_text(data.swapcase()) -- cgit v1.2.3