mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-06-24 18:07:01 +00:00
...
This commit is contained in:
parent
7a2003c371
commit
e91c008357
1 changed files with 3 additions and 3 deletions
|
|
@ -10,7 +10,7 @@ from contextlib import suppress
|
|||
from functools import partial
|
||||
from time import monotonic
|
||||
from typing import (
|
||||
Any, Dict, Generator, Iterable, List, Optional, Tuple, Union, cast
|
||||
Any, Dict, Iterator, Iterable, List, Optional, Tuple, Union, cast
|
||||
)
|
||||
|
||||
from .cli import emph, parse_args
|
||||
|
|
@ -138,9 +138,9 @@ class RCIO(TTYIO):
|
|||
def do_io(to: Optional[str], send: Dict[str, Any], no_response: bool, response_timeout: float) -> Dict[str, Any]:
|
||||
payload = send.get('payload')
|
||||
if not isinstance(payload, types.GeneratorType):
|
||||
send_data: Union[bytes, Iterable[bytes]] = encode_send(send)
|
||||
send_data: Union[bytes, Iterator[bytes]] = encode_send(send)
|
||||
else:
|
||||
def send_generator() -> Generator[bytes, None, None]:
|
||||
def send_generator() -> Iterator[bytes]:
|
||||
assert payload is not None
|
||||
for chunk in payload:
|
||||
send['payload'] = chunk
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue