We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 22a816f commit c910551Copy full SHA for c910551
1 file changed
pythonFiles/completion.py
@@ -551,7 +551,7 @@ def _process_request(self, request):
551
552
self._normalize_request_path(request)
553
path = self._get_top_level_module(request.get('path', ''))
554
- if path not in sys.path:
+ if len(path) > 0 and path not in sys.path:
555
sys.path.insert(0, path)
556
lookup = request.get('lookup', 'completions')
557
@@ -563,9 +563,10 @@ def _process_request(self, request):
563
all_scopes=True),
564
request['id'])
565
566
- script = jedi.api.Script(
+ script = jedi.Script(
567
source=request.get('source', None), line=request['line'] + 1,
568
- column=request['column'], path=request.get('path', ''))
+ column=request['column'], path=request.get('path', ''),
569
+ sys_path=sys.path)
570
571
if lookup == 'definitions':
572
defs = []
0 commit comments