more typing work

This commit is contained in:
Kovid Goyal
2020-03-14 09:52:56 +05:30
parent eb12511646
commit ea48332f46
7 changed files with 202 additions and 154 deletions

View File

@@ -1 +0,0 @@

View File

@@ -2,7 +2,7 @@
# vim:fileencoding=utf-8
# License: GPLv3 Copyright: 2020, Kovid Goyal <kovid at kovidgoyal.net>
from typing import TYPE_CHECKING, Optional
from typing import TYPE_CHECKING, Optional, Union
from .base import (
MATCH_WINDOW_OPTION, ArgsType, Boss, PayloadGetType,
@@ -55,7 +55,7 @@ If specified resize the window this command is run in, rather than the active wi
def response_from_kitty(self, boss: Boss, window: Optional[Window], payload_get: PayloadGetType) -> ResponseType:
windows = self.windows_for_match_payload(boss, window, payload_get)
resized = False
resized: Union[bool, None, str] = False
if windows and windows[0]:
resized = boss.resize_layout_window(
windows[0], increment=payload_get('increment'), is_horizontal=payload_get('axis') == 'horizontal',