Go to definition does not work for Pandas and other libraries
See original GitHub issueIssue Type: Bug
Go To Definition
does not work for Pandas and any other source type. For example, in this very simple code snippet, i try to CMD+click on a DataFrame symbol and as a seasoned engineer, i expect to go directly to sources of DataFrame class definition, because i have no time to google for documentation nor i generally trust it, because it’s either not that extensive or out of date. And sources have more things to show.
import pandas as pd
pd.DataFrame([{'foo': 1, 'bar': 2}])
navigation does not work also for any module in the sys.path
:
import os,sys
# (i have all my exploratory notebooks in `notebooks` folder and my other code in packages up the level)
sys.path.append(os.path.abspath('..'))
this does not work for symbols defined in the same notebook as well:
e.g. def foo(): print(1)
in one cell, and foo()
in the other cell doesn’t get me jumping the way i’d expect from an IDE.
Extension version: 2021.3.600686576 VS Code version: Code - Insiders 1.54.0-insider (Universal) (e590188f17162393f50feec19263398e6fe02d13, 2021-02-26T20:39:12.763Z) OS version: Darwin x64 19.6.0
A/B Experiments
vsliv695:30137379
vsins829:30139715
vsliv368:30146709
vsreu685:30147344
python383:30185418
pythonvspyt602:30263608
vspor879:30202332
vspor708:30202333
vspor363:30204092
vstry244:30244315
pythonvsdeb440:30224570
pythonvsded773:30223139
pythonvspyt875:30259475
pythonvspyt639:30264824
pythontb:30258533
Issue Analytics
- State:
- Created 3 years ago
- Comments:13 (8 by maintainers)
Top GitHub Comments
yes! it works! thanks!
@nfx. While digging in on this I found a straight up bug here. Basically outgoing links (goto def and whatnot) from inside a notebook file to anything outside a notebook file were not working. I have a fix in progress and should hit the insiders build of the Python extension soonish. Just follow this issue and you should see when it gets closed.