Closed solutionseekeras closed 2 months ago
This isn't how reportUnusedVariable
works in pyright. It is reported if the variable is not consumed anywhere in the function.
Pyright is working as designed here, so closing the issue.
Sounds fair, thanks for the quick response.
Are there any plans to add detection of this? If not, what's the reasoning?
Describe the bug
Pyright considers a variable to be used if it has been used at least once, even if it is later reassigned to without use.
Code or Screenshots
pyright <path-to-file>
results in0 errors, 0 warnings, 0 informations
.VS Code extension or command-line pyright 1.1.377 on the command-line.