microbit-foundation / micropython-microbit-stubs

Type stubs for MicroPython for micro:bit to support the micro:bit Python Editor V3
https://python.microbit.org/
Other
3 stars 2 forks source link

PWM methods should go into the `MicroBitDigitalPin` class #28

Closed microbit-carlos closed 2 years ago

microbit-carlos commented 2 years ago

Right now the write_analog, set_analog_period, and set_analog_period_microseconds methods are only declared in the MicroBitAnalogDigitalPin class, but these PWM methods are available in all digital pins.

https://github.com/microbit-foundation/micropython-microbit-stubs/blob/7499fc8799b3a88e5038a2324dae264b1516ede7/typeshed/stdlib/microbit/__init__.pyi#L171-L193

microbit-carlos commented 2 years ago

The MicroPython docs, which had this issue, were fixed here: https://github.com/bbcmicrobit/micropython/pull/629/files

microbit-matt-hillsdon commented 2 years ago

https://microbit-micropython.readthedocs.io/en/v2-docs/pin.html#microbit.MicroBitDigitalPin