You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 22, 2026. It is now read-only.
For a couple of years now (since this commit) the Micropython implementations of the standard libraries have been importable without needing a u prefix, so you can just import json or asyncio instead of ujson or uasyncio. This is now the preferred way to use these libraries, and their example code generally uses them this way. Unfortunately the current Intellij plugin does not recognise these imports as fetching the Micropython version, and it uses the type hints from the standard CPython libraries instead.
The Micropython versions of these libraries have some minor differences and extensions, so otherwise working code that say await asyncio.sleep_ms(100) gets flagged with a Cannot find reference 'sleep_ms' in '__init__.pyi' and if you remove the await then it fails to flag the Coroutine 'sleep_ms' is not awaited that it should.
It would be very helpful if the stub .pyi files were updated to provide Micropython-specific hints for the standard libraries under the standard names as well as with the u prefix, so that it properly hints code written in the now-preferred manner.
For a couple of years now (since this commit) the Micropython implementations of the standard libraries have been importable without needing a
uprefix, so you can just importjsonorasyncioinstead ofujsonoruasyncio. This is now the preferred way to use these libraries, and their example code generally uses them this way. Unfortunately the current Intellij plugin does not recognise these imports as fetching the Micropython version, and it uses the type hints from the standard CPython libraries instead.The Micropython versions of these libraries have some minor differences and extensions, so otherwise working code that say
await asyncio.sleep_ms(100)gets flagged with aCannot find reference 'sleep_ms' in '__init__.pyi'and if you remove theawaitthen it fails to flag theCoroutine 'sleep_ms' is not awaitedthat it should.It would be very helpful if the stub
.pyifiles were updated to provide Micropython-specific hints for the standard libraries under the standard names as well as with theuprefix, so that it properly hints code written in the now-preferred manner.