From 666c59cbfbcbd28062c201c3cb5d6cb928e90aee Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Sun, 16 Oct 2016 21:33:24 -0700 Subject: [PATCH] actually fix merge :see_no_evil: --- mitmproxy/console/grideditor/base.py | 28 ++++++++++++++-------------- mitmproxy/contrib/tnetstring.py | 3 +-- 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/mitmproxy/console/grideditor/base.py b/mitmproxy/console/grideditor/base.py index 12c1b3c1a..de1c0cf6f 100644 --- a/mitmproxy/console/grideditor/base.py +++ b/mitmproxy/console/grideditor/base.py @@ -23,6 +23,18 @@ FOOTER_EDITING = [ ] +class Cell(urwid.WidgetWrap): + def get_data(self): + """ + Raises: + ValueError, if the current content is invalid. + """ + raise NotImplementedError() + + def selectable(self): + return True + + class Column(object, metaclass=abc.ABCMeta): subeditor = None @@ -45,24 +57,12 @@ class Column(object, metaclass=abc.ABCMeta): return key -class Cell(urwid.WidgetWrap): - def get_data(self): - """ - Raises: - ValueError, if the current content is invalid. - """ - raise NotImplementedError() - - def selectable(self): - return True - - class GridRow(urwid.WidgetWrap): def __init__( self, focused: Optional[int], editing: bool, - editor: GridEditor, + editor: "GridEditor", values: Tuple[Iterable[bytes], Container[int]] ): self.focused = focused @@ -117,7 +117,7 @@ class GridWalker(urwid.ListWalker): def __init__( self, lst: Iterable[list], - editor: GridEditor + editor: "GridEditor" ): self.lst = [(i, set()) for i in lst] self.editor = editor diff --git a/mitmproxy/contrib/tnetstring.py b/mitmproxy/contrib/tnetstring.py index 65b640587..24ce6ce8e 100644 --- a/mitmproxy/contrib/tnetstring.py +++ b/mitmproxy/contrib/tnetstring.py @@ -183,8 +183,7 @@ def load(file_handle: io.BinaryIO) -> TSerializable: return parse(data_type, data) -def parse(data_type: int, data: bytes): - # type: (int, bytes) -> TSerializable +def parse(data_type: int, data: bytes) -> TSerializable: if data_type == ord(b','): return data if data_type == ord(b';'):