Python code style fixes
This commit is contained in:
parent
0954ff31d9
commit
4d95e32a1e
@ -49,20 +49,24 @@ class JediCompleter(Completer):
|
|||||||
self._exit = False
|
self._exit = False
|
||||||
self._start_completion_thread()
|
self._start_completion_thread()
|
||||||
|
|
||||||
|
|
||||||
def _start_completion_thread(self):
|
def _start_completion_thread(self):
|
||||||
self._completion_thread = Thread(target=self.SetCandidates)
|
self._completion_thread = Thread(target=self.SetCandidates)
|
||||||
self._completion_thread.start()
|
self._completion_thread.start()
|
||||||
|
|
||||||
|
|
||||||
def SupportedFiletypes(self):
|
def SupportedFiletypes(self):
|
||||||
""" Just python """
|
""" Just python """
|
||||||
return ['python']
|
return ['python']
|
||||||
|
|
||||||
|
|
||||||
def CandidatesForQueryAsyncInner(self, query):
|
def CandidatesForQueryAsyncInner(self, query):
|
||||||
self._query = query
|
self._query = query
|
||||||
self._candidates = None
|
self._candidates = None
|
||||||
self._candidates_ready.clear()
|
self._candidates_ready.clear()
|
||||||
self._query_ready.set()
|
self._query_ready.set()
|
||||||
|
|
||||||
|
|
||||||
def AsyncCandidateRequestReadyInner(self):
|
def AsyncCandidateRequestReadyInner(self):
|
||||||
if self._completion_thread.is_alive():
|
if self._completion_thread.is_alive():
|
||||||
return WaitAndClear(self._candidates_ready, timeout=0.005)
|
return WaitAndClear(self._candidates_ready, timeout=0.005)
|
||||||
@ -70,9 +74,11 @@ class JediCompleter(Completer):
|
|||||||
self._start_completion_thread()
|
self._start_completion_thread()
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
||||||
def CandidatesFromStoredRequestInner(self):
|
def CandidatesFromStoredRequestInner(self):
|
||||||
return self._candidates or []
|
return self._candidates or []
|
||||||
|
|
||||||
|
|
||||||
def SetCandidates(self):
|
def SetCandidates(self):
|
||||||
while True:
|
while True:
|
||||||
WaitAndClear(self._query_ready)
|
WaitAndClear(self._query_ready)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user