adafruit / circup

CircuitPython library updater.
MIT License
129 stars 37 forks source link

Adding option to install library stubs from PyPi #229

Closed Jessseee closed 4 months ago

Jessseee commented 5 months ago

Implementation of feature request #140, this is something I would really like to see as a PyCharm user.

As described in the PyCharm + CircuitPython setup guide there are packages available on PyPi that contain stubs for libraries from the Adafruit Library Bundle, these packages help give the IDE you are using context for your CircuitPython code so that code hinting can work properly.

Instead of having to manually install these stubs after installing packages using CircUp, this PR adds the --stubs flag to the circup install command which enables a step in the installation process to try to install the available stubs package using pip.

This would currently only work for libraries in the Adafruit CircuitPython Bundle, as I don't see an easy way to find out whether there are stubs packages on PyPi for any other CircuitPython libraries.

Jessseee commented 5 months ago

Ah yes, I was debating where to put it, but with that explanation, it would indeed make more sense to put it in the install command.

Jessseee commented 5 months ago

@FoamyGuy Moved the installation of the stubs packages to commands.py and reverted any changes I made to backends.py. Sorry for spamming the CI, I had a small fight with your pre-commit pipeline. 😅