reportUnusedVariable
false positives when used with an Unknown
list
#3545
Labels
addressed in next version
Issue is fixed and will appear in next published version
bug
Something isn't working
Note: if you are reporting a wrong signature of a function or a class in the standard library, then the typeshed tracker is better suited for this report: https://github.com/python/typeshed/issues.
Describe the bug
In the example below,
read
is unknown. Soimage
is unknown as well. Pyright doesn't see that I do use the variablex
to slice or access theimage
. Note this doesn't happen at the top level, it has to be inside of a function.To Reproduce
See minimal repro below
Expected behavior
No errors
Screenshots or Code
If applicable, add screenshots or the text of the code (surrounded by triple back ticks) to help explain your problem.
I don't think it's specific to cv2, butI'm using the types bundled withmicrosoft/python-type-stubs
VS Code extension or command-line
[email protected]
The text was updated successfully, but these errors were encountered: