You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am a coach of a WRO Junior team working in Pyton on EV3. The team is using VSCode and Pybricks v2.0 with moderate success for a year.
I am now trying to improve VSCode environment to help kids concentrate on development instead on hunting typing and similar issues.
One of the settings I changed is python.analysis.typeCheckingMode which I set to basic.
It instantly marked all places where ev3.buttons.pressed() is used as error ("Argument missing for parameter "self"").
For example:
ev3=EV3Brick()
btns=ev3.buttons.pressed()
All that code worked and is working just fine, of course. The error is only there for Pylance for some reason.
Interesting is that similar code using classes the same way is not marked as error.
I know I can make the error go away with #type: ignore but that is not really a solution.
What should I change to make this non-error go away?
Here is a screenshot of a test project and the error (bottom part is an example of the similar code not being marked as error):
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am a coach of a WRO Junior team working in Pyton on EV3. The team is using VSCode and Pybricks v2.0 with moderate success for a year.
I am now trying to improve VSCode environment to help kids concentrate on development instead on hunting typing and similar issues.
One of the settings I changed is
python.analysis.typeCheckingModewhich I set tobasic.It instantly marked all places where
ev3.buttons.pressed()is used as error ("Argument missing for parameter "self"").For example:
All that code worked and is working just fine, of course. The error is only there for Pylance for some reason.
Interesting is that similar code using classes the same way is not marked as error.
I know I can make the error go away with
#type: ignorebut that is not really a solution.What should I change to make this non-error go away?
Here is a screenshot of a test project and the error (bottom part is an example of the similar code not being marked as error):

Beta Was this translation helpful? Give feedback.
All reactions