pimoroni / pimoroni-pico

Libraries and examples to support Pimoroni Pico add-ons in C++ and MicroPython.
https://shop.pimoroni.com/collections/pico
MIT License
1.28k stars 485 forks source link

Provide MicroPython stubs for frozen libraries #178

Closed aivarannamaa closed 6 months ago

aivarannamaa commented 3 years ago

It would be nice if there was something like https://pypi.org/project/circuitpython-stubs for Pimoroni Pico libs, which could be used for code completion, linting etc.

arunura commented 3 years ago

+1

Gadgetoid commented 1 year ago

I looked at introspecting the raw .c files to gather information for stubs, but it's no trivial problem. I did some preliminary digging into stubber mentioned in #742, but since our C++ libraries have largely static APIs it seems like it might just be easier to hand-write them all than get buried in tooling hell.

As such I've started a stubs repository here https://github.com/pimoroni/pimoroni-pico-stubs

I need to figure out how to make this installable and - of course - add all the many, many missing modules.