Cleanup previous PR

This commit is contained in:
Kovid Goyal
2022-06-06 17:19:52 +05:30
parent fc217dafba
commit 79f7954048
7 changed files with 47 additions and 27 deletions

View File

@@ -3,8 +3,7 @@
# License: GPLv3 Copyright: 2021, Kovid Goyal <kovid at kovidgoyal.net>
import shlex
from typing import Any, Dict, Iterable, List, Tuple, Union
from typing import Any, Container, Dict, Iterable, Tuple, Union
from kitty.conf.utils import (
KeyFuncWrapper, KittensKeyDefinition, parse_kittens_key
@@ -59,8 +58,10 @@ def syntax_aliases(raw: str) -> Dict[str, str]:
return ans
def pattern_list(raw: str) -> Tuple[str, ...]:
return tuple(shlex.split(raw, comments=True))
def store_multiple(val: str, current_val: Container[str]) -> Iterable[Tuple[str, str]]:
val = val.strip()
if val not in current_val:
yield val, val
def parse_map(val: str) -> Iterable[KittensKeyDefinition]: