more typing work

This commit is contained in:
Kovid Goyal
2020-03-12 14:52:11 +05:30
parent b27f6d5957
commit b6692849d6
6 changed files with 59 additions and 51 deletions

View File

@@ -35,11 +35,11 @@ If specified close the tab this command is run in, rather than the active tab.
def response_from_kitty(self, boss: 'Boss', window: 'Window', payload_get: PayloadGetType) -> ResponseType:
match = payload_get('match')
if match:
tabs = tuple(boss.match_tabs(match))
tabs = list(boss.match_tabs(match))
if not tabs:
raise MatchError(match, 'tabs')
else:
tabs = tuple(boss.tab_for_window(window) if window and payload_get('self') else boss.active_tab)
tabs = [boss.tab_for_window(window) if window and payload_get('self') else boss.active_tab]
for tab in tabs:
if window:
if tab:

View File

@@ -34,11 +34,11 @@ If specified close the window this command is run in, rather than the active win
def response_from_kitty(self, boss: 'Boss', window: 'Window', payload_get: PayloadGetType) -> ResponseType:
match = payload_get('match')
if match:
windows = tuple(boss.match_windows(match))
windows = list(boss.match_windows(match))
if not windows:
raise MatchError(match)
else:
windows = tuple(window if window and payload_get('self') else boss.active_window)
windows = [window if window and payload_get('self') else boss.active_window]
for window in windows:
if window:
boss.close_window(window)