This in microbit/__init__.pyi needs reconsidering:
from . import accelerometer as accelerometer
from . import compass as compass
from . import display as display
from . import i2c as i2c
from . import microphone as microphone
from . import speaker as speaker
from . import spi as spi
from . import uart as uart
None of these are modules at runtime in MicroPython, though they were documented using the directives for modules in the docs. They are actually e.g. MicroBitCompass objects.
audio is actually a module, but for unclear reasons cannot be imported as microbit.audio (via import or from microbit.audio import ...).
If we do this we need to carefully consider the impact on the V3 Editor UI. I think it's unlikely we'll make this change without a significant rethink of how we present this information there.
This in
microbit/__init__.pyi
needs reconsidering:None of these are modules at runtime in MicroPython, though they were documented using the directives for modules in the docs. They are actually e.g. MicroBitCompass objects.
audio
is actually a module, but for unclear reasons cannot be imported asmicrobit.audio
(viaimport
orfrom microbit.audio import ...
).