A typeshed for checking CircuitPython code
Project description
circuitpython-typeshed
This package contains a custom typeshed suitable for type-checking or completing CircuitPython code.
The goal has been to provide CircuitPython 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.
- Most stubs come from circuitpython-stubs, including the stubs present in the sdist of said package
but omitted from the wheel (
math,os,random,struct,ssl,time). - Typeshed helpers and some stdlib stubs come from micropython-stdlib-stubs.
- Remaining stdlib stubs come from micropython-rp2-stubs.
Installation
You can install this package into a venv (e.g. pip install circuitython-typeshed) or into a plain directory
(e.g. python3 -m pip install circuitpython-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 circuitpython_typeshed-0.1.0.tar.gz.
File metadata
- Download URL: circuitpython_typeshed-0.1.0.tar.gz
- Upload date:
- Size: 445.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ab26c830d9894ce87c768e58e91e6e752783fca938187eba0a90ad010b85d8c5
|
|
| MD5 |
b4f0d0da3bf1b2e6ed132e56e4b7876a
|
|
| BLAKE2b-256 |
9da3f007f0bcc4b20cbc6bd8ccec833fe4dba2833d40ec6871ddbba86694c377
|
File details
Details for the file circuitpython_typeshed-0.1.0-py3-none-any.whl.
File metadata
- Download URL: circuitpython_typeshed-0.1.0-py3-none-any.whl
- Upload date:
- Size: 1.1 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dd3673af76d67314d0d3e8e47a737687378d1ce8a3f750cf4e4fe0884a4d3bf2
|
|
| MD5 |
e81fdca49a91a7d8f78cefd456e64fd2
|
|
| BLAKE2b-256 |
a510364e0ddaf189c2619ace1af7016a63e2039dbce47a9e901380d451698a8b
|