Skip to content

'Go to Definition' should be special-cased for typing aliases for collections.abc ABCs #8035

@jonathandung

Description

@jonathandung

Type: Bug

When I click 'Go to Definition' on a type such as Iterable, even if it is imported directly from _collections_abc, I expect to be directed to either typing.pyi (the stub) or collections/abc.py (the definition). However, I am brought to neither and instead end up at the definition of the alias in typing.py, which is frankly useless to most! I know the type annotations are in typing.pyi to avoid code duplication (the symbols are after all available from both collections.abc and typing, though the latter is deprecated), and maybe this is why the implementation was thought to be in typing.py. However, I think it worth it to special case these abstract base classes to avoid this whim.

Extension version: 2026.2.101
VS Code version: Code 1.117.0 (10c8e557c8b9f9ed0a87f61f1c9a44bde731c409, 2026-04-21T16:12:14-07:00)
OS version: Windows_NT x64 10.0.26200
Modes:

System Info
Item Value
CPUs 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz (8 x 2419)
GPU Status 2d_canvas: enabled
GPU0: VENDOR= 0x8086, DEVICE=0x9a49 [Intel(R) Iris(R) Xe Graphics], DRIVER_VENDOR=Intel, DRIVER_VERSION=32.0.101.6737 ACTIVE
GPU1: VENDOR= 0x1414, DEVICE=0x008c [Microsoft Basic Render Driver], DRIVER_VERSION=10.0.26100.8246
Machine model name:
Machine model version:
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
trees_in_viz: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
Load (avg) undefined
Memory (System) 7.85GB (1.70GB free)
Process Argv --crash-reporter-id 9453c078-702b-4b0c-be82-802577994672
Screen Reader no
VM 0%
A/B Experiments
vsliv368cf:30146710
binariesv615:30325510
nativeloc1:31344060
dwcopilot:31170013
dwoutputs:31242946
copilot_t_ci:31333650
e5gg6876:31282496
pythonrdcb7:31342333
6518g693:31463988
aj953862:31281341
6abeh943:31336334
envsdeactivate2:31505458
cloudbuttont:31379625
42190218_ostrepl:31403339
ec5jj548:31422691
cp_cls_t_966_ss:31454198
inlinechat_v2_hd992725:31505030
4je02754:31466945
8hhj4413:31478653
38bie571_auto:31429954
cp_cls_t_1081:31454832
conptydll_true:31498968
ia-use-proxy-models-svc:31452481
e9c30283:31461165
test_treatment2:31471001
46204921:31447328
control_6dc23131:31497324
idci7584:31464702
e3e4d672:31494082
ei9d7968:31496641
nes-extended-on:31455476
chat:31457767
8hig5102:31480529
89g7j272:31504412
7e187181:31503455
cpptoolson-v2:31475363
i2gc6536:31499202
ghj88844:31499326
ec1eg703:31491645
client_tst_t:31495907
ddid_c:31478207
getcmakediagnosticson:31489824
pro_large_t:31499376
cp_cls_c_1082:31504161
719di409_sum_t:31505221
logging_enabled_new:31498466
j0d79568:31499440
nes-dist-check-on:31503267
748c7209:31497895
e8jdj427:31505714

Metadata

Metadata

Assignees

Labels

ai-triage-respondedIndicate whether the AI triage agent has responded to this issue.team needs to reproduceIssue has not been reproduced yet

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions