GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Provide sys_path to jedi (#1471) · adInfimum/vscode-python@c910551

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • pythonFiles
    • completion.py
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎pythonFiles/completion.py‎

Copy file name to clipboardExpand all lines: pythonFiles/completion.py
+4-3Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,7 @@ def _process_request(self, request):
551551

552552
self._normalize_request_path(request)
553553
path = self._get_top_level_module(request.get('path', ''))
554-
if path not in sys.path:
554+
if len(path) > 0 and path not in sys.path:
555555
sys.path.insert(0, path)
556556
lookup = request.get('lookup', 'completions')
557557

@@ -563,9 +563,10 @@ def _process_request(self, request):
563563
all_scopes=True),
564564
request['id'])
565565

566-
script = jedi.api.Script(
566+
script = jedi.Script(
567567
source=request.get('source', None), line=request['line'] + 1,
568-
column=request['column'], path=request.get('path', ''))
568+
column=request['column'], path=request.get('path', ''),
569+
sys_path=sys.path)
569570

570571
if lookup == 'definitions':
571572
defs = []

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.