support icon indicating copy to clipboard operation
support copied to clipboard

[Bug] ImportError: no module named 'typing'

Open abliss opened this issue 2 months ago • 3 comments

Describe the bug I want to write typed programs and run them on the Spike Prime hub, but I always get ImportError: no module named 'typing'.

To reproduce

  1. Write a test.py with from typing import Dict
  2. pybricksdev run ble test.py
  3. get error: ImportError: no module named 'typing'

Expected behavior I don't fully understand the python typing system but I roughly thought it would be "compiled out" and have no runtime overhead. I found https://micropython-stubs.readthedocs.io/en/main/typing_mpy.html which describes typing stubs for micropython, but it wasn't clear whether or how I could use this with pybricks.

abliss avatar Nov 09 '25 15:11 abliss