summaryrefslogtreecommitdiff
path: root/poezio/windows
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2018-01-13 15:33:19 +0100
committermathieui <mathieui@mathieui.net>2018-01-13 15:33:19 +0100
commit12ede4d3019a611b3b58d245d65c52bc01f37046 (patch)
treec723738a7d266fdabea15b1ebcd17fec7cb648f1 /poezio/windows
parent6fe2f208337db898d370d7a2374b416d998b5b5f (diff)
downloadpoezio-12ede4d3019a611b3b58d245d65c52bc01f37046.tar.gz
poezio-12ede4d3019a611b3b58d245d65c52bc01f37046.tar.bz2
poezio-12ede4d3019a611b3b58d245d65c52bc01f37046.tar.xz
poezio-12ede4d3019a611b3b58d245d65c52bc01f37046.zip
yapf -ir
Diffstat (limited to 'poezio/windows')
-rw-r--r--poezio/windows/bookmark_forms.py14
-rw-r--r--poezio/windows/inputs.py5
-rw-r--r--poezio/windows/muc.py3
-rw-r--r--poezio/windows/roster_win.py12
-rw-r--r--poezio/windows/text_win.py3
5 files changed, 18 insertions, 19 deletions
diff --git a/poezio/windows/bookmark_forms.py b/poezio/windows/bookmark_forms.py
index 5f5d581a..74135e54 100644
--- a/poezio/windows/bookmark_forms.py
+++ b/poezio/windows/bookmark_forms.py
@@ -143,9 +143,10 @@ class BookmarksWin(Win):
self._bookmarks = list(bookmarks)
self.lines = []
for bookmark in sorted(self._bookmarks, key=lambda x: x.jid):
- self.lines.append(
- (BookmarkJIDInput(bookmark), BookmarkPasswordInput(bookmark),
- BookmarkAutojoinWin(bookmark), BookmarkMethodInput(bookmark)))
+ self.lines.append((BookmarkJIDInput(bookmark),
+ BookmarkPasswordInput(bookmark),
+ BookmarkAutojoinWin(bookmark),
+ BookmarkMethodInput(bookmark)))
@property
def current_input(self):
@@ -163,9 +164,10 @@ class BookmarksWin(Win):
self._current_input = 0
def add_bookmark(self, bookmark):
- self.lines.append(
- (BookmarkJIDInput(bookmark), BookmarkPasswordInput(bookmark),
- BookmarkAutojoinWin(bookmark), BookmarkMethodInput(bookmark)))
+ self.lines.append((BookmarkJIDInput(bookmark),
+ BookmarkPasswordInput(bookmark),
+ BookmarkAutojoinWin(bookmark),
+ BookmarkMethodInput(bookmark)))
self.lines[
self.current_input][self.current_horizontal_input].set_color(
get_theme().COLOR_NORMAL_TEXT)
diff --git a/poezio/windows/inputs.py b/poezio/windows/inputs.py
index 48f60493..6956f4f6 100644
--- a/poezio/windows/inputs.py
+++ b/poezio/windows/inputs.py
@@ -532,9 +532,8 @@ class Input(Win):
(_, x) = self._win.getyx()
size = self.width - x
self.addnstr(' ' * size, size, to_curses_attr(self.color))
- self.addstr(0,
- poopt.wcswidth(displayed_text[:self.pos - self.view_pos]),
- '')
+ self.addstr(0, poopt.wcswidth(
+ displayed_text[:self.pos - self.view_pos]), '')
if self.color:
self._win.attroff(to_curses_attr(self.color))
curses.curs_set(1)
diff --git a/poezio/windows/muc.py b/poezio/windows/muc.py
index 4251c279..ef8a89d6 100644
--- a/poezio/windows/muc.py
+++ b/poezio/windows/muc.py
@@ -75,8 +75,7 @@ class UserList(Win):
for user in users[self.pos:self.pos + self.height]:
self.draw_role_affiliation(y, user)
self.draw_status_chatstate(y, user)
- self.addstr(y, 2,
- poopt.cut_by_columns(user.nick, self.width - 2),
+ self.addstr(y, 2, poopt.cut_by_columns(user.nick, self.width - 2),
to_curses_attr(user.color))
if asc_sort:
y -= 1
diff --git a/poezio/windows/roster_win.py b/poezio/windows/roster_win.py
index 7b1e5ba7..0906d1e9 100644
--- a/poezio/windows/roster_win.py
+++ b/poezio/windows/roster_win.py
@@ -132,8 +132,8 @@ class RosterWin(Win):
log.debug('Refresh: %s', self.__class__.__name__)
self.build_roster_cache(roster)
# make sure we are within bounds
- self.move_cursor_up((self.roster_len + self.pos)
- if self.pos >= self.roster_len else 0)
+ self.move_cursor_up((
+ self.roster_len + self.pos) if self.pos >= self.roster_len else 0)
if not self.roster_cache:
self.selected_row = None
self._win.erase()
@@ -206,8 +206,9 @@ class RosterWin(Win):
else:
self.addstr(y, 0, '[-] ')
contacts = " (%s/%s)" % (group.get_nb_connected_contacts(), len(group))
- self.addstr(
- y, 4, self.truncate_name(group.name, len(contacts) + 4) + contacts)
+ self.addstr(y, 4,
+ self.truncate_name(group.name,
+ len(contacts) + 4) + contacts)
if colored:
self._win.attroff(to_curses_attr(get_theme().COLOR_SELECTED_ROW))
self.finish_line()
@@ -320,8 +321,7 @@ class RosterWin(Win):
color = get_theme().color_show(resource.presence)
self.addstr(y, 4, get_theme().CHAR_STATUS, to_curses_attr(color))
if colored:
- self.addstr(y, 8,
- self.truncate_name(str(resource.jid), 6),
+ self.addstr(y, 8, self.truncate_name(str(resource.jid), 6),
to_curses_attr(get_theme().COLOR_SELECTED_ROW))
else:
self.addstr(y, 8, self.truncate_name(str(resource.jid), 6))
diff --git a/poezio/windows/text_win.py b/poezio/windows/text_win.py
index b923b712..23fefb56 100644
--- a/poezio/windows/text_win.py
+++ b/poezio/windows/text_win.py
@@ -486,8 +486,7 @@ class TextWin(BaseTextWin):
def write_line_separator(self, y):
char = get_theme().CHAR_NEW_TEXT_SEPARATOR
- self.addnstr(y, 0,
- char * (self.width // len(char) - 1), self.width,
+ self.addnstr(y, 0, char * (self.width // len(char) - 1), self.width,
to_curses_attr(get_theme().COLOR_NEW_TEXT_SEPARATOR))
def write_ack(self):