diff options
author | Aldo Cortesi <aldo@corte.si> | 2017-05-02 12:17:57 +1200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-02 12:17:57 +1200 |
commit | 8d29492960a89078ad2743e648afa08a3c71ebc1 (patch) | |
tree | e7e9474787505ffbaa348fbd0235529adb74f0e7 /pathod/utils.py | |
parent | 53ad658e9f59743b72cb234f9b160aa6dc3d1f72 (diff) | |
parent | e24b4cc1b64455b8b9b5d1265103054bb8b3a8af (diff) | |
download | mitmproxy-8d29492960a89078ad2743e648afa08a3c71ebc1.tar.gz mitmproxy-8d29492960a89078ad2743e648afa08a3c71ebc1.tar.bz2 mitmproxy-8d29492960a89078ad2743e648afa08a3c71ebc1.zip |
Merge pull request #2299 from iharsh234/mypy-pathod
Mypy Checking to pathod
Diffstat (limited to 'pathod/utils.py')
-rw-r--r-- | pathod/utils.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/pathod/utils.py b/pathod/utils.py index 44ad1f87..11b1dccd 100644 --- a/pathod/utils.py +++ b/pathod/utils.py @@ -1,6 +1,7 @@ import os import sys from mitmproxy.utils import data as mdata +import typing # noqa class MemBool: @@ -9,10 +10,10 @@ class MemBool: Truth-checking with a memory, for use in chained if statements. """ - def __init__(self): - self.v = None + def __init__(self) -> None: + self.v = None # type: typing.Optional[bool] - def __call__(self, v): + def __call__(self, v: bool) -> bool: self.v = v return bool(v) |