From fe91b74ba7028f3b531096c9ae3dc036a8bd4eb0 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 2 Jan 2022 09:38:14 +0530 Subject: [PATCH] ... --- kitty/remote_control.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kitty/remote_control.py b/kitty/remote_control.py index 77a47dc3c..c81c1536c 100644 --- a/kitty/remote_control.py +++ b/kitty/remote_control.py @@ -5,12 +5,12 @@ import json import os import re import sys -import types from contextlib import suppress from functools import partial from time import monotonic +from types import GeneratorType from typing import ( - Any, Dict, Iterator, Iterable, List, Optional, Tuple, Union, cast + Any, Dict, Iterable, Iterator, List, Optional, Tuple, Union, cast ) from .cli import emph, parse_args @@ -137,7 +137,7 @@ 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): + if not isinstance(payload, GeneratorType): send_data: Union[bytes, Iterator[bytes]] = encode_send(send) else: def send_generator() -> Iterator[bytes]: