A typeshed for checking MicroPython code
Project description
micropython-typeshed
This package contains a custom typeshed suitable for type-checking or completing MicroPython code.
The goal has been to provide MicroPython specific stubs also for modules present in CPython's stdlib, which
some type-checkers (e.g. MyPy) may consider special.
For this reason, the stubs are arranged into typeshed layout (i.e. under stdlib and stubs folders).
This means, it doesn't suffice to install this package into a venv -- you also
need to set your type-checker's typeshed path to the installation directory of this package.
The stubs and typeshed helpers are compiled from the following sources
- https://pypi.org/project/micropython-rp2-rpi_pico2_w-stubs/
- https://pypi.org/project/micropython-esp32-stubs/
- https://pypi.org/project/micropython-stm32-pybv11-stubs/
- https://pypi.org/project/micropython-samd-stubs/
Installation
You can install this package into a venv (e.g. pip install micropython-typeshed) or into a plain directory
(e.g. python3 -m pip install micropython-typeshed --target typeshed --no-user).
Using with Pyright and basedpyright
You need to indicate the installed location via the -t (or --typeshedpath) option (e.g.
pyright -t .venv/lib/python3.10/site-packages my-code.py or pyright -t typeshed my-code.py).
Using with MyPy
You need to indicate the installed location via the --custom-typeshed-dir option (e.g. mypy --custom-typeshed-dir typeshed my-code.py).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file micropython_typeshed-0.1.0.tar.gz.
File metadata
- Download URL: micropython_typeshed-0.1.0.tar.gz
- Upload date:
- Size: 262.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d91006d1150347229653e858e86e7c129f0bb0548e06dab5c9b28aaee88705cb
|
|
| MD5 |
85e53ecbbe3fcc7337636148c2773980
|
|
| BLAKE2b-256 |
db6e500500ea38909fed81881a6708858ed1ae0c5dadc83861ccbe10481b6053
|
File details
Details for the file micropython_typeshed-0.1.0-py3-none-any.whl.
File metadata
- Download URL: micropython_typeshed-0.1.0-py3-none-any.whl
- Upload date:
- Size: 323.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
df93dd3f9ce214f339ee0a0f4515e2b097085ca8362e92873546de79179aee08
|
|
| MD5 |
f7b66f378dd5cf4b5e744ebcc5ba08db
|
|
| BLAKE2b-256 |
9f9de61aa526d3f76b9e9ff3ca0fe33e1fd80f2382d92192a6553bb6e7dda447
|