Make mypy happy

This commit is contained in:
Kovid Goyal 2022-02-05 19:53:16 +05:30
parent 4d3e2a07d1
commit 9742e2ec48
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
3 changed files with 9 additions and 6 deletions

View File

@ -275,8 +275,8 @@ class Boss:
self.keymap.pop(sc, None)
def startup_first_child(self, os_window_id: Optional[int], startup_sessions: Sequence[Optional[Session]] = ()) -> None:
startup_sessions = startup_sessions or create_sessions(get_options(), self.args, default_session=get_options().startup_session)
for startup_session in startup_sessions:
si = startup_sessions or create_sessions(get_options(), self.args, default_session=get_options().startup_session)
for startup_session in si:
self.add_os_window(startup_session, os_window_id=os_window_id)
os_window_id = None
if self.args.start_as != 'normal':
@ -2252,7 +2252,7 @@ class Boss:
return
from .launch import force_window_launch
from .open_actions import actions_for_launch
actions = []
actions: List[KeyAction] = []
for url in urls:
actions.extend(actions_for_launch(url))
tab = self.active_tab

View File

@ -1051,6 +1051,9 @@ class Screen:
def line(self, num: int) -> Line:
pass
def visual_line(self, num: int) -> Line:
pass
def draw(self, text: str) -> None:
pass

View File

@ -368,9 +368,9 @@ def _main() -> None:
if not cwd_ok:
os.chdir(os.path.expanduser('~'))
if getattr(sys, 'cmdline_args_for_open', False):
usage = 'file_or_url ...'
appname = 'kitty +open'
msg = (
usage: Optional[str] = 'file_or_url ...'
appname: Optional[str] = 'kitty +open'
msg: Optional[str] = (
'Run kitty and open the specified files or URLs in it, using launch-actions.conf. For details'
' see https://sw.kovidgoyal.net/kitty/open_actions/#scripting-the-opening-of-files-with-kitty-on-macos'
'\n\nAll the normal kitty options can be used.')