mirror of
https://github.com/kovidgoyal/kitty.git
synced 2024-09-20 11:07:38 +03:00
Workaround for mypy bug
This commit is contained in:
parent
0c0b9e6b9c
commit
f3b3d6c0ef
@ -94,7 +94,7 @@ def cwd_of_child(self) -> str:
|
||||
if reported_cwd and not window.child_is_remote and (self.request_type is CwdRequestType.last_reported or window.at_prompt):
|
||||
return reported_cwd
|
||||
if self.request_type is CwdRequestType.root:
|
||||
return window.child.current_cwd or ''
|
||||
return window.get_cwd_of_root_child() or ''
|
||||
return window.get_cwd_of_child(oldest=self.request_type is CwdRequestType.oldest) or ''
|
||||
|
||||
def modify_argv_for_launch_with_cwd(self, argv: List[str]) -> str:
|
||||
@ -1388,6 +1388,9 @@ def cmd_output(self, which: CommandOutput = CommandOutput.last_run, as_ansi: boo
|
||||
def get_cwd_of_child(self, oldest: bool = False) -> Optional[str]:
|
||||
return self.child.get_foreground_cwd(oldest) or self.child.current_cwd
|
||||
|
||||
def get_cwd_of_root_child(self) -> Optional[str]:
|
||||
return self.child.current_cwd
|
||||
|
||||
@property
|
||||
def cwd_of_child(self) -> Optional[str]:
|
||||
return self.get_cwd_of_child()
|
||||
|
Loading…
Reference in New Issue
Block a user