From d55cc5872503567775f0d7a7731d6f489bf2299b Mon Sep 17 00:00:00 2001 From: mathieui Date: Sun, 12 Nov 2017 15:03:09 +0100 Subject: yapf -ir --- poezio/tabs/confirmtab.py | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) (limited to 'poezio/tabs/confirmtab.py') diff --git a/poezio/tabs/confirmtab.py b/poezio/tabs/confirmtab.py index 39f630cb..28c26122 100644 --- a/poezio/tabs/confirmtab.py +++ b/poezio/tabs/confirmtab.py @@ -13,7 +13,13 @@ class ConfirmTab(Tab): plugin_commands = {} plugin_keys = {} - def __init__(self, core, name, text, short_message, callback, critical=False): + def __init__(self, + core, + name, + text, + short_message, + callback, + critical=False): """Parameters: name: The name of the tab text: the text shown in the tab @@ -26,7 +32,8 @@ class ConfirmTab(Tab): Tab.__init__(self, core) self.state = 'highlight' self.name = name - self.default_help_message = windows.HelpText("Choose with arrow keys and press enter") + self.default_help_message = windows.HelpText( + "Choose with arrow keys and press enter") self.input = self.default_help_message self.infowin_top = windows.ConfirmStatusWin(short_message, critical) self.infowin_bottom = windows.ConfirmStatusWin(short_message, critical) @@ -76,10 +83,12 @@ class ConfirmTab(Tab): tab_win_height = Tab.tab_win_height() self.infowin_top.resize(1, self.width, 0, 0) - self.infowin_bottom.resize(1, self.width, self.height - 2 - info_win_height - tab_win_height, 0) + self.infowin_bottom.resize( + 1, self.width, self.height - 2 - info_win_height - tab_win_height, + 0) self.dialog.resize(self.height - 3 - info_win_height - tab_win_height, self.width, 1, 0) - self.input.resize(1, self.width, self.height-1, 0) + self.input.resize(1, self.width, self.height - 1, 0) def close(self, arg=None): self.done = True @@ -95,8 +104,10 @@ class ConfirmTab(Tab): return self.key_func[key]() def on_info_win_size_changed(self): - if self.core.information_win_size >= self.height-3: + if self.core.information_win_size >= self.height - 3: return - self.dialog.resize(self.height-3-self.core.information_win_size - Tab.tab_win_height(), self.width, 1, 0) - self.infowin_bottom.resize(1, self.width, self.height-2-self.core.information_win_size - Tab.tab_win_height(), 0) - + self.dialog.resize(self.height - 3 - self.core.information_win_size - + Tab.tab_win_height(), self.width, 1, 0) + self.infowin_bottom.resize( + 1, self.width, self.height - 2 - self.core.information_win_size - + Tab.tab_win_height(), 0) -- cgit v1.2.3