aboutsummaryrefslogtreecommitdiffstats
path: root/mitmproxy/types.py
diff options
context:
space:
mode:
authoroscure76 <midhun.nitw@gmail.com>2018-04-14 16:24:41 -0700
committeroscure76 <midhun.nitw@gmail.com>2018-04-14 16:24:41 -0700
commit0e984e1442e735a6a3cee5170bead492b231d620 (patch)
tree4e0ae4b5598f3c1be35a38819b15a12ace6209c8 /mitmproxy/types.py
parent5eb17bbf6d47c8d703763bfa41cf1ff3f98a632f (diff)
downloadmitmproxy-0e984e1442e735a6a3cee5170bead492b231d620.tar.gz
mitmproxy-0e984e1442e735a6a3cee5170bead492b231d620.tar.bz2
mitmproxy-0e984e1442e735a6a3cee5170bead492b231d620.zip
fix Python 3.6 variable type annotations #3053
Diffstat (limited to 'mitmproxy/types.py')
-rw-r--r--mitmproxy/types.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/mitmproxy/types.py b/mitmproxy/types.py
index 3875128d..2d66bb8e 100644
--- a/mitmproxy/types.py
+++ b/mitmproxy/types.py
@@ -45,7 +45,7 @@ class Choice:
# Rather than putting types and the CommandManger in the same file, we introduce
# a stub type with the signature we use.
class _CommandBase:
- commands = {} # type: typing.MutableMapping[str, typing.Any]
+ commands: typing.MutableMapping[str, typing.Any] = {}
def call_args(self, path: str, args: typing.Sequence[str]) -> typing.Any:
raise NotImplementedError
@@ -55,8 +55,8 @@ class _CommandBase:
class _BaseType:
- typ = object # type: typing.Type
- display = "" # type: str
+ typ: typing.Type = object
+ display: str = ""
def completion(
self, manager: _CommandBase, t: typing.Any, s: str
@@ -286,7 +286,7 @@ class _CutSpecType(_BaseType):
return opts
def parse(self, manager: _CommandBase, t: type, s: str) -> CutSpec:
- parts = s.split(",") # type: typing.Any
+ parts: typing.Any = s.split(",")
return parts
def is_valid(self, manager: _CommandBase, typ: typing.Any, val: typing.Any) -> bool: