From 1cb6250f143bace771dbd08d1bab4038ea694c93 Mon Sep 17 00:00:00 2001 From: pagedown Date: Tue, 30 Nov 2021 18:54:44 +0800 Subject: [PATCH] Remove duplicate imports --- kitty/open_actions.py | 1 - kitty/remote_control.py | 1 - 2 files changed, 2 deletions(-) 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\\'