diff options
author | Maximilian Hils <git@maximilianhils.com> | 2017-05-27 01:55:43 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-27 01:55:43 +0200 |
commit | e7f7a608c6dda7cc22d2eda1129da99fd2830767 (patch) | |
tree | 4c6879f8dc964010750617c47eb7ee927c891b6b /examples/simple/custom_contentview.py | |
parent | ef1c36194e0cb3ac82304eb95fb323d71ec5ebab (diff) | |
parent | e7990e0983344179e49a46f160e1482a0a0f6aa7 (diff) | |
download | mitmproxy-e7f7a608c6dda7cc22d2eda1129da99fd2830767.tar.gz mitmproxy-e7f7a608c6dda7cc22d2eda1129da99fd2830767.tar.bz2 mitmproxy-e7f7a608c6dda7cc22d2eda1129da99fd2830767.zip |
Merge pull request #2358 from mhils/make-mypy-great-again
Fix mypy annotations, update mypy
Diffstat (limited to 'examples/simple/custom_contentview.py')
-rw-r--r-- | examples/simple/custom_contentview.py | 6 |
1 files changed, 1 insertions, 5 deletions
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()) |