Closed fguillen closed 3 years ago
I think the from pgzero.builtins import ...
approach is best, as it doesn't seem easy to teach each of the type checkers about the extra builtins. The ability to import screen
from there is fixed in 9fe032577c93fd89be2b844be45d951bbabb08dd.
Is there any way to prevent Pylance for complaining about Variable not defined?
From here: https://github.com/microsoft/pyright/issues/1688
=== Describe the bug I am developing using pgzero library and I see that Pylance is complaning about many of the definitions to not be found
This is specially annoying since I am introducing kids to programming and they are very incomfortable with all these warnings around (which is good), teaching them to ignore warnings is not a good thing I think :(
To Reproduce This is a totally valid pgzero code:
Expected behavior It should be not any "not defined warnings" but there are 3:
I can hide the warning in
Actor
andclock
by adding:but for
screen
I didn't find any solution :/Screenshots or Code
VS Code extension or command-line
I am running pyright by pylance as an extension in VS Code