diff options
author | mohite-abhi <b518004@iiit-bh.ac.in> | 2022-01-23 22:33:27 +0530 |
---|---|---|
committer | mohite-abhi <b518004@iiit-bh.ac.in> | 2022-01-23 22:33:27 +0530 |
commit | 426b280b1bb8fc7cc336d56e0ae7e9cca584ab89 (patch) | |
tree | 72780911214db0e905eb67430a0aae1feed7fa70 | |
parent | 3b27bf9fb7b968025b9d348b311679c6111d3968 (diff) | |
download | qutebrowser-426b280b1bb8fc7cc336d56e0ae7e9cca584ab89.tar.gz qutebrowser-426b280b1bb8fc7cc336d56e0ae7e9cca584ab89.zip |
fix more linter issues
-rw-r--r-- | qutebrowser/completion/models/miscmodels.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/qutebrowser/completion/models/miscmodels.py b/qutebrowser/completion/models/miscmodels.py index f461a0fbb..2b106d904 100644 --- a/qutebrowser/completion/models/miscmodels.py +++ b/qutebrowser/completion/models/miscmodels.py @@ -103,19 +103,20 @@ def session(*, info=None): return model -def _tabs(*, win_id_filter=lambda _win_id: True, add_win_id=True, current_win_id=0): +def _tabs(*, win_id_filter=lambda _win_id: True, add_win_id=True, cur_win_id=0): """Helper to get the completion model for tabs/other_tabs. Args: win_id_filter: A filter function for window IDs to include. Should return True for all included windows. add_win_id: Whether to add the window ID to the completion items. - current_win_id: Window ID to be passed from info.win_id + cur_win_id: Window ID to be passed from info.win_id """ def delete_tab(data): """Close the selected tab.""" - win_id = current_win_id - tab_index = data[0].split('/')[-1] # data[0] can be 'tabInd' or 'winID/tabInd' + win_id = cur_win_id + # data[0] can be 'tabInd' or 'winID/tabInd' + tab_index = data[0].split('/')[-1] tabbed_browser = objreg.get('tabbed-browser', scope='window', window=int(win_id)) @@ -180,13 +181,14 @@ def other_tabs(*, info): Used for the tab-take command. """ - return _tabs(win_id_filter=lambda win_id: win_id != info.win_id, current_win_id=info.win_id) + return _tabs(win_id_filter=lambda win_id: win_id != info.win_id, + cur_win_id=info.win_id) def tab_focus(*, info): """A model to complete on open tabs in the current window.""" model = _tabs(win_id_filter=lambda win_id: win_id == info.win_id, - add_win_id=False, current_win_id=info.win_id) + add_win_id=False, cur_win_id=info.win_id) special = [ ("last", "Focus the last-focused tab"), |