This commit is contained in:
Kovid Goyal 2020-03-09 17:24:51 +05:30
parent ac2c21e046
commit 3c2f3ecd8e
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
3 changed files with 6 additions and 6 deletions

View File

@ -300,7 +300,7 @@ class UnicodeInput(Handler):
def update_codepoints(self):
codepoints = None
if self.mode is HEX:
q: Tuple[str, Optional[Union[str, Sequence[int]]]] = self.mode, None
q: Tuple[str, Optional[Union[str, Sequence[int]]]] = (self.mode, None)
codepoints = self.recent
elif self.mode is EMOTICONS:
q = self.mode, None

View File

@ -209,14 +209,14 @@ class Boss:
if w is not None:
yield w
return
if field == 'env':
if field != 'env':
pat: MatchPatternType = re.compile(exp)
else:
kp, vp = exp.partition('=')[::2]
if vp:
pat: MatchPatternType = re.compile(kp), re.compile(vp)
pat = re.compile(kp), re.compile(vp)
else:
pat = re.compile(kp), None
else:
pat = re.compile(exp)
for window in self.all_windows:
if window.matches(field, pat):
yield window

View File

@ -35,7 +35,7 @@ class ScrollWindow(RemoteCommand):
def message_to_kitty(self, global_opts: RCOptions, opts: 'CLIOptions', args: ArgsType) -> PayloadType:
amt = args[0]
amount: Tuple[Union[str, int], Optional[str]] = amt, None
amount: Tuple[Union[str, int], Optional[str]] = (amt, None)
if amt not in ('start', 'end'):
pages = 'p' in amt
amt = amt.replace('p', '')