diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2017-12-13 14:41:46 +1300 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2017-12-13 14:41:46 +1300 |
commit | e63bb8cde5a62c7b0ad0b6e6577e8e1a78e822f5 (patch) | |
tree | bf666a2bca96edadefad727b2bdc4bcc551c1c2d /mitmproxy/tools | |
parent | 4cee1a4f96ef7307e422cf227c8389563323e442 (diff) | |
download | mitmproxy-e63bb8cde5a62c7b0ad0b6e6577e8e1a78e822f5.tar.gz mitmproxy-e63bb8cde5a62c7b0ad0b6e6577e8e1a78e822f5.tar.bz2 mitmproxy-e63bb8cde5a62c7b0ad0b6e6577e8e1a78e822f5.zip |
commands: add a Path argument type
This is just an alias for str, and in this patch is used mostly to give an
appropriate type in help strings. More to come.
Fixes #2198
Diffstat (limited to 'mitmproxy/tools')
-rw-r--r-- | mitmproxy/tools/console/consoleaddons.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mitmproxy/tools/console/consoleaddons.py b/mitmproxy/tools/console/consoleaddons.py index 4b0bb00d..a65b26e1 100644 --- a/mitmproxy/tools/console/consoleaddons.py +++ b/mitmproxy/tools/console/consoleaddons.py @@ -414,14 +414,14 @@ class ConsoleAddon: self._grideditor().cmd_delete() @command.command("console.grideditor.readfile") - def grideditor_readfile(self, path: str) -> None: + def grideditor_readfile(self, path: command.Path) -> None: """ Read a file into the currrent cell. """ self._grideditor().cmd_read_file(path) @command.command("console.grideditor.readfile_escaped") - def grideditor_readfile_escaped(self, path: str) -> None: + def grideditor_readfile_escaped(self, path: command.Path) -> None: """ Read a file containing a Python-style escaped stringinto the currrent cell. |