mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-19 15:04:50 +02:00
Make mypy happy
This commit is contained in:
@@ -275,8 +275,8 @@ class Boss:
|
|||||||
self.keymap.pop(sc, None)
|
self.keymap.pop(sc, None)
|
||||||
|
|
||||||
def startup_first_child(self, os_window_id: Optional[int], startup_sessions: Sequence[Optional[Session]] = ()) -> 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)
|
si = startup_sessions or create_sessions(get_options(), self.args, default_session=get_options().startup_session)
|
||||||
for startup_session in startup_sessions:
|
for startup_session in si:
|
||||||
self.add_os_window(startup_session, os_window_id=os_window_id)
|
self.add_os_window(startup_session, os_window_id=os_window_id)
|
||||||
os_window_id = None
|
os_window_id = None
|
||||||
if self.args.start_as != 'normal':
|
if self.args.start_as != 'normal':
|
||||||
@@ -2252,7 +2252,7 @@ class Boss:
|
|||||||
return
|
return
|
||||||
from .launch import force_window_launch
|
from .launch import force_window_launch
|
||||||
from .open_actions import actions_for_launch
|
from .open_actions import actions_for_launch
|
||||||
actions = []
|
actions: List[KeyAction] = []
|
||||||
for url in urls:
|
for url in urls:
|
||||||
actions.extend(actions_for_launch(url))
|
actions.extend(actions_for_launch(url))
|
||||||
tab = self.active_tab
|
tab = self.active_tab
|
||||||
|
|||||||
@@ -1051,6 +1051,9 @@ class Screen:
|
|||||||
def line(self, num: int) -> Line:
|
def line(self, num: int) -> Line:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
def visual_line(self, num: int) -> Line:
|
||||||
|
pass
|
||||||
|
|
||||||
def draw(self, text: str) -> None:
|
def draw(self, text: str) -> None:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|||||||
@@ -368,9 +368,9 @@ def _main() -> None:
|
|||||||
if not cwd_ok:
|
if not cwd_ok:
|
||||||
os.chdir(os.path.expanduser('~'))
|
os.chdir(os.path.expanduser('~'))
|
||||||
if getattr(sys, 'cmdline_args_for_open', False):
|
if getattr(sys, 'cmdline_args_for_open', False):
|
||||||
usage = 'file_or_url ...'
|
usage: Optional[str] = 'file_or_url ...'
|
||||||
appname = 'kitty +open'
|
appname: Optional[str] = 'kitty +open'
|
||||||
msg = (
|
msg: Optional[str] = (
|
||||||
'Run kitty and open the specified files or URLs in it, using launch-actions.conf. For details'
|
'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'
|
' 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.')
|
'\n\nAll the normal kitty options can be used.')
|
||||||
|
|||||||
Reference in New Issue
Block a user