Update micropython boards stubs to v1.24.1 #783
Josverl
announced in
Announcements
Replies: 1 comment 5 replies
-
Hello, I'm using your stubs in a fork of the PyCharm MicroPython plugin. They're bundled directly with the plugin so that they are always available. I assume that the publish folder in this repository is the one with release-ready versions of the stubs and thus I take them from here. In the recent 1.24.1 update I noticed that some of the packages are missing asyncio/uasyncio stubs and they contain a removed.txt file with this description: "modules removed to avoid incorrect merge effects: Is this the right folder to get the stubs from? |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The new stubs contain additional type information for parameters and return types.
The depend on new functionality added in
micropython-stdlib-stubs==1.24.1
esp32:
rp2:
samd:
stm32:
Relevant and related updates in the MicroPython-stubs repo
reference-stubs
The reference stubs themselves are created using the stubber tool to combine and merge infromation from the following sources.
_threads
and pars ofhashlib
andrandom
_mpy_shed
module has been created based on the_typeshed
module. This allows the different micropython stub modules to refer to common types and constants, that are different than the standard CPython types and constants.micropython-stdlib-stubs
The stubs for the async and uasyncio modules of earlier versions had many issues.
In this version, the stunb for
asyncio
are based on typeshedstdlib.asyncio
stub, that has been tuned specifically for micropython by removing the features and functionality that is not available in MicroPython. However the Doc strings are taken from doc-stubs, to keep them in sync in line with the MicroPython DocumentaionFor distribution the
_mpy_shed
module is added to themicropython-stdlib-stubs
package.Significant effort has been done to improve the ability for mypy to perform type checking on the micropython code,
while maintaining compatibility with the way the micropython documentation, is structured.
There are further improvement to be made, but this is a significant step forward for mypy users.
While parts of the stdlib modules are hand-edited, they can be updated by running the
python build.py
.This functionality has not been merged into the stubber tool at this time.
This discussion was created from the release Update micropython boards stubs to v1.24.1.
Beta Was this translation helpful? Give feedback.
All reactions