Incorrect/misleading error message for zip
#1705
Labels
bug
Something isn't working
fixed in next version (main)
A fix has been implemented and will appear in an upcoming version
Issue Type: Bug
Consider the following three functions (I've tried to remove as much unnecessary code as possible):
The above code is wrong:
get_samples_from_vocab
expects aList[str]
as first argument, while I am giving it anIterator[str]
. But this is what pylance shows me:If I hover
random pairs
, the error message is:Fair enough. If I hover any other part of the expression to learn more, however, I get this:
Which doesn't make sense (
List[str],List[str]
is a perfectly valid signature for the arguments ofzip
).It's only if I hover on
vocab
that I get the actual error that appears to be causing the other ones:And indeed, if I fix it that problem, the other errors go away:
Extension version: 2021.8.3-pre.1
VS Code version: Code 1.59.1 (3866c3553be8b268c8a7f8c0482c0c0177aa8bfa, 2021-08-19T11:54:37.513Z)
OS version: Linux x64 5.10.56-1-lts
Restricted Mode: No
System Info
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
opengl: enabled_on
rasterization: disabled_software
skia_renderer: enabled_on
video_decode: disabled_software
vulkan: disabled_off
webgl: enabled
webgl2: enabled
The text was updated successfully, but these errors were encountered: