Josverl / micropython-stubber

Generate and maintain stubs for different MicroPython ports to use with VSCode and Pylance, PyRight, Thonny, PyCharm or MyPy
https://micropython-stubber.readthedocs.io
Other
173 stars 14 forks source link

Add Bluetooth Library #13

Closed askpatrickw closed 3 years ago

askpatrickw commented 4 years ago

Is there any concern with adding bluetooth\ubluetooth to createstubs?

I'm happy to submit a PR, but I wanted to check that all is needed is to add it to the hardcoded list starting around line 80.

This would be my PR https://github.com/askpatrickw/micropython-stubber/commit/7fba58e7362f62a4759f5aa11466e4d0373de492#diff-f980488c64e09b41b963829d88a15d94

Josverl commented 4 years ago

Hi Patrick , sorry for the tardiness yes that is one of the ways that should allow the stubs to be generated for the bluetooth module. another way is to uncomment & change one line in the script

    # stubber.add_modules(['xyz'])  TO 
   stubber.add_modules(['bluetooth'])

for which firmware are you generating ? if it is a common firmware i'm happy to merge your PR

askpatrickw commented 4 years ago

Hi @Josverl sorry long in getting back to you, this was on MicroPython on a TinyPico (If I remember correctly) not a fork.

Josverl commented 3 years ago

Hi Patrick , I have updated the code and createstubs.py version 1.3.4 includes the stubbing of the Bluetooth module if it is included in the firmware.

i've ran the stubber on a nightly of the 1.13 build and you can pick up the bluetooth stub module on the micropython-stubs repo

Thanks for pointing this out.