Make mypy 1.11 happy
This commit is contained in:
parent
681a2b7b28
commit
ae8da889c4
3 changed files with 11 additions and 7 deletions
|
|
@ -317,8 +317,10 @@ def format_cmd(p: Callable[..., None], name: str, cmd: RemoteCommand) -> None:
|
|||
else:
|
||||
title = f'{title} (optional)'
|
||||
p(f':code:`{title}`')
|
||||
p(' ', desc), p()
|
||||
p(), p()
|
||||
p(' ', desc)
|
||||
p()
|
||||
p()
|
||||
p()
|
||||
|
||||
with open('generated/rc.rst', 'w') as f:
|
||||
p = partial(print, file=f)
|
||||
|
|
|
|||
|
|
@ -48,10 +48,12 @@ def setup_debug_print() -> bool:
|
|||
|
||||
|
||||
def send_to_kitten(x: Any) -> None:
|
||||
f = sys.__stdout__
|
||||
assert f is not None
|
||||
try:
|
||||
sys.__stdout__.buffer.write(json.dumps(x).encode())
|
||||
sys.__stdout__.buffer.write(b'\n')
|
||||
sys.__stdout__.buffer.flush()
|
||||
f.buffer.write(json.dumps(x).encode())
|
||||
f.buffer.write(b'\n')
|
||||
f.buffer.flush()
|
||||
except BrokenPipeError:
|
||||
raise SystemExit('Pipe to kitten was broken while sending data to it')
|
||||
|
||||
|
|
|
|||
|
|
@ -836,8 +836,8 @@ def peer_message_received(self, msg_bytes: bytes, peer_id: int, is_remote_contro
|
|||
focused_os_window = os_window_id
|
||||
if opts.background_opacity != get_options().background_opacity:
|
||||
self._set_os_window_background_opacity(os_window_id, opts.background_opacity)
|
||||
if data.get('notify_on_os_window_death'):
|
||||
self.os_window_death_actions[os_window_id] = partial(self.notify_on_os_window_death, data['notify_on_os_window_death'])
|
||||
if n := data.get('notify_on_os_window_death'):
|
||||
self.os_window_death_actions[os_window_id] = partial(self.notify_on_os_window_death, n)
|
||||
if focused_os_window > 0:
|
||||
focus_os_window(focused_os_window, True, activation_token)
|
||||
elif activation_token and is_wayland() and os_window_id:
|
||||
|
|
|
|||
Loading…
Reference in a new issue