You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 14, 2022. It is now read-only.
Repository navigation
This repository was archived by the owner on Apr 14, 2022. It is now read-only.
Go to definition (F12 or Ctrl+LMB) fails when clicking on a relative import #1022
Extension version (available under the Extensions sidebar): 2019.4.11987
OS and version: W10 N Professional 1809 (Build 17763.437)
Python version (& distribution if applicable, e.g. Anaconda): Python 3.7.3 64-bit
Type of virtual environment used (N/A | venv | virtualenv | conda | ...): happens with and without virtualenv
Relevant/affected Python packages and their versions: All with relative imports
Expected behaviour
Go to definition works
Actual behaviour
Go to definition fails ("No definition found for X"). Additionaly, showing definitions (from type hints) of members of these modules is not reliable.
Steps to reproduce:
execute code . in an empty folder
create a new file (e.g. test.py)
type import requests
put cursor on "requests", press F12, requests' init.py opens as expected
put cursor on .exceptions in the line from .exceptions import RequestsDependencyWarning, press F12
Logs
Output for Python in the Output panel (View→Output, change the drop-down the upper-right of the Output panel to Python)
Starting Microsoft Python language server.
[Info - 16:59:50] GetCurrentSearchPaths C:\Users\Benni\AppData\Local\Programs\Python\Python37\python.exe
[Info - 16:59:50] Python search paths:
[Info - 16:59:50] c:\users\benni\appdata\local\programs\python\python37\dlls
[Info - 16:59:50] c:\users\benni\appdata\local\programs\python\python37\lib
[Info - 16:59:50] c:\users\benni\appdata\local\programs\python\python37
[Info - 16:59:50] c:\users\benni\appdata\local\programs\python\python37\lib\site-packages
[Info - 16:59:50] c:\users\benni\appdata\local\programs\python\python37\lib\site-packages\enochecker-0.0.1-py3.7.egg
[Info - 16:59:50] c:\users\benni\appdata\local\programs\python\python37\lib\site-packages\psutil-5.6.1-py3.7-win-amd64.egg
[Info - 16:59:50] c:\users\benni\appdata\local\programs\python\python37\lib\site-packages\elastic_apm-4.2.2-py3.7-win-amd64.egg
[Info - 16:59:50] Configuration search paths:
[Info - 17:00:00] Microsoft Python Language Server version 0.2.63.0
[Info - 17:00:00] Initializing for C:\Users\Benni\AppData\Local\Programs\Python\Python37\python.exe
Output from Console under the Developer Tools panel (toggle Developer Tools on under Help; turn on source maps to make any tracebacks be useful by running Enable source map support for extension debugging)
[Extension Host] Python Extension: Cached data exists getEnvironmentVariables, extensions
console.ts:134 [Extension Host] Python Extension: Cached data exists getEnvironmentVariables, extension-output-#2
console.ts:134 [Extension Host] Python Extension: Cached data exists getEnvironmentVariables, c:\Users\Benni\vscodetest
console.ts:134 [Extension Host] Python Extension: Cached data exists getEnvironmentVariables, extension-output-#2
console.ts:134 [Extension Host] Python Extension: Cached data exists getEnvironmentVariables, c:\users\benni\appdata\local\programs\python\python37\lib\site-packages\requests\__init__.py
Benedikt Radtke (@Trolldemorted) commented on Mon Apr 29 2019
Environment data
Expected behaviour
Go to definition works
Actual behaviour
Go to definition fails ("No definition found for X"). Additionaly, showing definitions (from type hints) of members of these modules is not reliable.
Steps to reproduce:
code .in an empty folderimport requests.exceptionsin the linefrom .exceptions import RequestsDependencyWarning, press F12Logs
Output for
Pythonin theOutputpanel (View→Output, change the drop-down the upper-right of theOutputpanel toPython)Output from
Consoleunder theDeveloper Toolspanel (toggle Developer Tools on underHelp; turn on source maps to make any tracebacks be useful by runningEnable source map support for extension debugging)