pylance-release
pylance-release copied to clipboard
Go to Definition of submodule works on import but not where used `No definition found for "..."`
Type: Bug
Having this code:
import mylib.a
mylib.a.do_something()
I can use Go to Definition in line 1 at the a
But I CANNOT in line 2 between the two dots No definition found for 'a'
Go to Definition does work on the function call tho! 🙃
Commenting this a little:
import mylib.a <-- Go to Definition works here
mylib.a.do_something(BLA)
^ ^-- Go to Definition of the function call works
^-- Does NOT work with the cursor here!!
Extension version: 2024.9.100 VS Code version: Code 1.93.1 (38c31bc77e0dd6ae88a4e9cc93428cc27a56ba40, 2024-09-11T17:20:05.685Z) OS version: Windows_NT x64 10.0.19045 Modes:
System Info
| Item | Value |
|---|---|
| CPUs | 12th Gen Intel(R) Core(TM) i7-12800H (20 x 2803) |
| GPU Status | 2d_canvas: enabled canvas_oop_rasterization: enabled_on direct_rendering_display_compositor: disabled_off_ok gpu_compositing: enabled multiple_raster_threads: enabled_on opengl: enabled_on rasterization: enabled raw_draw: disabled_off_ok skia_graphite: disabled_off video_decode: enabled video_encode: enabled vulkan: disabled_off webgl: enabled webgl2: enabled webgpu: enabled webnn: disabled_off |
| Load (avg) | undefined |
| Memory (System) | 31.67GB (15.51GB free) |
| Process Argv | --crash-reporter-id dcd794d7-92eb-44e8-8b31-3421f7667089 |
| Screen Reader | no |
| VM | 0% |
A/B Experiments
vsliv368:30146709
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscod805:30301674
binariesv615:30325510
vsaa593:30376534
py29gd2263:31024239
vscaat:30438848
c4g48928:30535728
azure-dev_surveyonecf:30548226
962ge761:30959799
pythongtdpath:30769146
welcomedialog:30910333
pythonnoceb:30805159
asynctok:30898717
pythonmypyd1:30879173
h48ei257:31000450
pythontbext0:30879054
accentitlementsc:30995553
dsvsc016:30899300
dsvsc017:30899301
dsvsc018:30899302
cppperfnew:31000557
dsvsc020:30976470
pythonait:31006305
dsvsc021:30996838
724cj586:31013169
a69g1124:31058053
dvdeprecation:31068756
dwnewjupytercf:31046870
newcmakeconfigv2:31071590
impr_priority:31102340
refactort:31108082
pythonrstrctxt:31112756
flightc:31134773
wkspc-onlycs-t:31132770
wkspc-ranged-t:31125599
autoexpandse:31133494
ei213698:31121563
iacca1:31138162
I was able to repro this. Thanks for the issue.