Skip to content

Commit

Permalink
Remove unused typing_extensions dependence and fix var warning from ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
manateelazycat committed Jul 27, 2023
1 parent ac36a81 commit 45c186a
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions core/copilot.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import time
import subprocess
from typing_extensions import Required
from core.utils import *
from subprocess import PIPE
from core.lspserver import LspServerSender, LspServerReceiver
Expand Down Expand Up @@ -95,6 +94,8 @@ def message_dispatcher(self):
self.wait_response = message
self.wait_id = None
elif 'result' in message and 'completions' in message['result']:
completion_candidates = []

for completion in message['result']['completions']:
label = completion['text']
labels = label.strip().split("\n")
Expand Down Expand Up @@ -124,11 +125,7 @@ def message_dispatcher(self):

completion_candidates.append(candidate)

eval_in_emacs(
"lsp-bridge-search-backend--record-items", "copilot", completion_candidates
)

completion_candidates = []
eval_in_emacs("lsp-bridge-search-backend--record-items", "copilot", completion_candidates)
except:
logger.error(traceback.format_exc())

Expand Down

0 comments on commit 45c186a

Please sign in to comment.