aboutsummaryrefslogtreecommitdiffstats
path: root/mitmproxy/command.py
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@corte.si>2017-12-17 11:23:15 +1300
committerAldo Cortesi <aldo@corte.si>2017-12-17 11:23:15 +1300
commita289db8d75dfc1afa5c45fbb419fdf113191ec2b (patch)
tree6ce3575e396b5d917d839435339e9bbc9f07fe91 /mitmproxy/command.py
parente549b63465253a8b4cdb17efbf130e20371aa3b0 (diff)
downloadmitmproxy-a289db8d75dfc1afa5c45fbb419fdf113191ec2b.tar.gz
mitmproxy-a289db8d75dfc1afa5c45fbb419fdf113191ec2b.tar.bz2
mitmproxy-a289db8d75dfc1afa5c45fbb419fdf113191ec2b.zip
commands: minor refactoring and command renaming
Diffstat (limited to 'mitmproxy/command.py')
-rw-r--r--mitmproxy/command.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/mitmproxy/command.py b/mitmproxy/command.py
index 22c2376b..c86d9792 100644
--- a/mitmproxy/command.py
+++ b/mitmproxy/command.py
@@ -110,7 +110,7 @@ class Arg(str):
pass
-def typename(t: type, ret: bool) -> str:
+def typename(t: type) -> str:
"""
Translates a type to an explanatory string. If ret is True, we're
looking at a return type, else we're looking at a parameter type.
@@ -153,13 +153,13 @@ class Command:
self.returntype = sig.return_annotation
def paramnames(self) -> typing.Sequence[str]:
- v = [typename(i, False) for i in self.paramtypes]
+ v = [typename(i) for i in self.paramtypes]
if self.has_positional:
v[-1] = "*" + v[-1]
return v
def retname(self) -> str:
- return typename(self.returntype, True) if self.returntype else ""
+ return typename(self.returntype) if self.returntype else ""
def signature_help(self) -> str:
params = " ".join(self.paramnames())