Call For Suggestions: Nominate Python Packages for Typing Improvements

Sharing my response to Danny in the Pyscript repo here for visibility:

There is an initial release for the webassembly port of MicroPython that including an initial stub for the pyscript module that is released to PyPI :
micropython-webassembly-stubs · PyPI

That is based on the MicroPython specific tools I created, and parttly stubs created by pyright --createstub

The challenge is to create processes and tools to maintain consistent stubs and documentation without increasing the efforts, or complexity to do so for all maintainers.

Missing typing finctionality:
One thing that is missing specifically for micropython is that today it is not possible for type checkers to select on the MicroPython version, nor on the port (webassembly in this context)
So rather than maintain one set of stubs with conditions, multiple packages are needed, increasing the complexity for both maintenance and use

IDE Tooling:
to simplify maintenance - IDEs could / should provide better support for mixed language files:

  • .c file with embedded documentation in .RsT or .md and Python samples
  • .pyi file with embedded .RsT /MD with embedded Python samples
1 Like