Skip to main content

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

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

micropython_typeshed-0.1.0.tar.gz (262.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

micropython_typeshed-0.1.0-py3-none-any.whl (323.6 kB view details)

Uploaded Python 3

File details

Details for the file micropython_typeshed-0.1.0.tar.gz.

File metadata

File hashes

Hashes for micropython_typeshed-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d91006d1150347229653e858e86e7c129f0bb0548e06dab5c9b28aaee88705cb
MD5 85e53ecbbe3fcc7337636148c2773980
BLAKE2b-256 db6e500500ea38909fed81881a6708858ed1ae0c5dadc83861ccbe10481b6053

See more details on using hashes here.

File details

Details for the file micropython_typeshed-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for micropython_typeshed-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 df93dd3f9ce214f339ee0a0f4515e2b097085ca8362e92873546de79179aee08
MD5 f7b66f378dd5cf4b5e744ebcc5ba08db
BLAKE2b-256 9f9de61aa526d3f76b9e9ff3ca0fe33e1fd80f2382d92192a6553bb6e7dda447

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page