Fix a few style issues

This commit is contained in:
Jay Kamat 2017-05-12 16:56:07 -07:00
parent 1572be83be
commit 068e47e22c
No known key found for this signature in database
GPG Key ID: 5D2E399600F4F7B5

View File

@ -888,11 +888,11 @@ class CommandDispatcher:
cur_idx = self._tabbed_browser.currentIndex()
assert cur_idx != -1
def _to_close(index):
def _to_close(i):
"""Helper method to check if a tab should be closed or not."""
return not (i == cur_idx
or (prev and i < cur_idx)
or (next_ and i > cur_idx))
return not (i == cur_idx or
(prev and i < cur_idx) or
(next_ and i > cur_idx))
# Check to see if we are closing any pinned tabs
if not force:
@ -900,7 +900,8 @@ class CommandDispatcher:
if _to_close(i) and tab.data.pinned:
self._tab_close_prompt_if_pinned(
tab, force,
lambda: self.tab_only(prev=prev, next_=next_, force=True))
lambda: self.tab_only(
prev=prev, next_=next_, force=True))
return
for i, tab in enumerate(self._tabbed_browser.widgets()):