diff --git a/kitty/open_actions.py b/kitty/open_actions.py index 3ad087c93..9d7a48665 100644 --- a/kitty/open_actions.py +++ b/kitty/open_actions.py @@ -133,7 +133,6 @@ def url_matches_criterion(purl: 'ParseResult', url: str, unquoted_path: str, mc: if mc.type == 'file': import fnmatch - import posixpath try: fname = posixpath.basename(unquoted_path) except Exception: diff --git a/kitty/remote_control.py b/kitty/remote_control.py index f51462967..5983e3b7f 100644 --- a/kitty/remote_control.py +++ b/kitty/remote_control.py @@ -29,7 +29,6 @@ active_async_requests: Dict[str, float] = {} def encode_response_for_peer(response: Any) -> bytes: - import json return b'\x1bP@kitty-cmd' + json.dumps(response).encode('utf-8') + b'\x1b\\'