rcp ars should be a sequnce not a set
This commit is contained in:
parent
e8de2def96
commit
a75235a260
@ -341,7 +341,7 @@ def load_watch_modules(watchers: Iterable[str]) -> Optional[Watchers]:
|
||||
class LaunchKwds(TypedDict):
|
||||
|
||||
allow_remote_control: bool
|
||||
remote_control_passwords: Optional[Dict[str, FrozenSet[str]]]
|
||||
remote_control_passwords: Optional[Dict[str, Sequence[str]]]
|
||||
cwd_from: Optional[CwdRequest]
|
||||
cwd: Optional[str]
|
||||
location: Optional[str]
|
||||
@ -406,7 +406,7 @@ def launch(
|
||||
tm = boss.active_tab_manager
|
||||
opts.os_window_title = get_os_window_title(tm.os_window_id) if tm else None
|
||||
env = get_env(opts, active_child)
|
||||
remote_control_restrictions: Optional[Dict[str, FrozenSet[str]]] = None
|
||||
remote_control_restrictions: Optional[Dict[str, Sequence[str]]] = None
|
||||
if opts.allow_remote_control and opts.remote_control_password:
|
||||
from kitty.options.utils import remote_control_password
|
||||
remote_control_restrictions = {}
|
||||
|
||||
2
kitty/options/types.py
generated
2
kitty/options/types.py
generated
@ -612,7 +612,7 @@ class Options:
|
||||
kitten_alias: typing.Dict[str, str] = {}
|
||||
modify_font: typing.Dict[str, kitty.fonts.FontModification] = {}
|
||||
narrow_symbols: typing.Dict[typing.Tuple[int, int], int] = {}
|
||||
remote_control_password: typing.Dict[str, typing.FrozenSet[str]] = {}
|
||||
remote_control_password: typing.Dict[str, typing.Sequence[str]] = {}
|
||||
symbol_map: typing.Dict[typing.Tuple[int, int], str] = {}
|
||||
watcher: typing.Dict[str, str] = {}
|
||||
map: typing.List[kitty.options.utils.KeyDefinition] = []
|
||||
|
||||
@ -675,14 +675,14 @@ def config_or_absolute_path(x: str, env: Optional[Dict[str, str]] = None) -> Opt
|
||||
return resolve_abs_or_config_path(x, env)
|
||||
|
||||
|
||||
def remote_control_password(val: str, current_val: Dict[str, str]) -> Iterable[Tuple[str, FrozenSet[str]]]:
|
||||
def remote_control_password(val: str, current_val: Dict[str, str]) -> Iterable[Tuple[str, Sequence[str]]]:
|
||||
val = val.strip()
|
||||
if val:
|
||||
parts = to_cmdline(val, expand=False)
|
||||
if len(parts) == 1:
|
||||
yield parts[0], frozenset()
|
||||
yield parts[0], tuple()
|
||||
else:
|
||||
yield parts[0], frozenset(parts[1:])
|
||||
yield parts[0], tuple(parts[1:])
|
||||
|
||||
|
||||
def clipboard_control(x: str) -> Tuple[str, ...]:
|
||||
|
||||
@ -10,7 +10,7 @@ from contextlib import suppress
|
||||
from operator import attrgetter
|
||||
from time import monotonic
|
||||
from typing import (
|
||||
Any, Deque, Dict, FrozenSet, Generator, Iterable, Iterator, List,
|
||||
Any, Deque, Dict, Generator, Iterable, Iterator, List,
|
||||
NamedTuple, Optional, Sequence, Set, Tuple, Union
|
||||
)
|
||||
|
||||
@ -442,7 +442,7 @@ class Tab: # {{{
|
||||
watchers: Optional[Watchers] = None,
|
||||
overlay_behind: bool = False,
|
||||
is_clone_launch: str = '',
|
||||
remote_control_passwords: Optional[Dict[str, FrozenSet[str]]] = None,
|
||||
remote_control_passwords: Optional[Dict[str, Sequence[str]]] = None,
|
||||
) -> Window:
|
||||
child = self.launch_child(
|
||||
use_shell=use_shell, cmd=cmd, stdin=stdin, cwd_from=cwd_from, cwd=cwd, env=env,
|
||||
|
||||
@ -14,8 +14,8 @@ from gettext import gettext as _
|
||||
from itertools import chain
|
||||
from time import monotonic
|
||||
from typing import (
|
||||
TYPE_CHECKING, Any, Callable, Deque, Dict, FrozenSet, Iterable, List,
|
||||
NamedTuple, Optional, Pattern, Sequence, Tuple, Union
|
||||
TYPE_CHECKING, Any, Callable, Deque, Dict, Iterable, List, NamedTuple,
|
||||
Optional, Pattern, Sequence, Tuple, Union
|
||||
)
|
||||
|
||||
from .child import ProcessDesc
|
||||
@ -472,7 +472,7 @@ class Window:
|
||||
copy_colors_from: Optional['Window'] = None,
|
||||
watchers: Optional[Watchers] = None,
|
||||
allow_remote_control: bool = False,
|
||||
remote_control_passwords: Optional[Dict[str, FrozenSet[str]]] = None,
|
||||
remote_control_passwords: Optional[Dict[str, Sequence[str]]] = None,
|
||||
):
|
||||
if watchers:
|
||||
self.watchers = watchers
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user