-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Verify stub signatures for passing either an int
or a Pin
instance across all ports.
#768
Comments
@Josverl Are you planning to check this? I'm not sure it's worth tracking in an issue otherwise unless someone plans to do it, AFAIK it's already been covered by the PRs linked to the original issue. |
I plan to check if the stub signatures match this behavior, especially as I'm currently working to integrate method parameter typing and @Overloads, and I think that something as essential as Pins should be well represented in the type stubs. Therefore I'm tracking it as a todo in the MicoPython-stubs repo. |
Sounds great! |
Oh, I'd also missed this is the micropython-stubs repo. My mistake. 🤦 (Because it mentioned me I got an email notification for it that showed up with all my other MP related notifications, and I totally missed that we're no longer in the micropython org. No worries.) |
ref: #768 Signed-off-by: Jos Verlinde <[email protected]>
ref: #768 Signed-off-by: Jos Verlinde <[email protected]>
Actually I think since the two linked PRs merged it's possible to pass either an
int
or aPin
instance across all ports.Definitely the case described in the original report works now, it's possible to do either
machine.ADC(int)
ormachine.ADC(machine.Pin(int))
and the former will degrade into the latter.If someone runs across a machine API which requires a Pin object and doesn't accept an int, suggest they open a new issue and we can change it to use the existing helper functions internally.
Originally posted by @projectgus in micropython/micropython#4379 (comment)
The text was updated successfully, but these errors were encountered: