pybricks-api
pybricks-api copied to clipboard
pybricks.common.BLE: Update type hints and add missing documentation
Hi @laurensvalk and @dlech
I'm implementing the Pybricks BLE interfaces in my pybricks-ble project, and noticed that some of the type hints are inaccurate/incomplete. That makes the type checker unhappy when trying to mimic Pybricks behaviour, but with the changes in this PR I was able to get everything working (see https://github.com/fkleon/pybricks-ble/pull/9).
Update API docs and code completions for the following changes:
- BLE: Optional
broadcast_channelin the hub constructors, and addition of thebroadcast_enable()method: https://github.com/pybricks/pybricks-micropython/pull/269 (changed inv3.6.0b2) - BLE:
broadcastaccepts either a single value, a tuple, or a list.observeeither returns a single value, or a tuple. (changed inv3.3.0b9)