Repository navigation
Add stubs for RPi.GPIO - #11345
Add stubs for RPi.GPIO#11345
Conversation
This comment has been minimized.
This comment has been minimized.
srittau
left a comment
There was a problem hiding this comment.
Thanks, LGTM. Let's see whether it breaks our stub uploader.
| from typing_extensions import TypeAlias | ||
|
|
||
| VERSION: str | ||
| RPI_INFO: dict[str, Any] |
There was a problem hiding this comment.
This could be a TypedDict, but this can always be done later.
There was a problem hiding this comment.
Thank you for the review @srittau
I just tried that, and mypy failed with: https://github.com/fperrin/typeshed/actions/runs/7710857960/job/21015067471?pr=3
mypy --platform win32 --python-version 3.9 on the test cases for 'requests': FAILURE
...
File "mypy/fixup.py", line 127, in visit_symbol_table
File "mypy/lookup.py", line 31, in lookup_fully_qualified
AssertionError: Cannot find module for resource.struct_rusage
I really doubt this is related to my change, but who knows...
There was a problem hiding this comment.
@fperrin sorry about that! That's entirely unrelated, and it's very much on our minds right now: see
There was a problem hiding this comment.
in that case I'll ignore that failure and push Sebastian's suggestion
|
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
|
Cross-referencing the following for discoverability: |
Hi,
These stubs cover the entirety of the API exposed to Python.
The name of the project on PyPi is
RPi.GPIOwith a., hopefully that won't cause any issue.There is very little activity upstream, but that module is still useful, indeed it comes by default with Raspbian as provided with brand new Pi modules.