ITADN
Josverl/micropython-stubber

版本发布 8

v1.28.0
? · 2026-04-11

## What's Changed * Add additional umodule deprecations for MicroPython library standardization * Add --exclude CLI parameter for board-specific module exclusions by @andrewleech in https://github.com/Josverl/micropython-stubber/pull/701 * Ensure lib directory exists before mip_install by @andrewleech in https://github.com/Josverl/micropython-stubber/pull/703 * Add board/variant info to frozen stubs manifest files * Handle C-modules extended by frozen Python modules (ESP32 machine/PCNT) * Inspect `__doc__` property in createstubs.py * Use inspect module in createstubs.py for async/generator detection and parameter signatures. * Report stub location after creating stubs. ## Documentation * docs: add dedicated Quick Start page for contributing board stubs, remove redundant pages, and fix inconsistencies * docs: add WSL2 note to prerequisites and show my-stubs folder in tree view ## Dependencies etc * ci: replace deprecated macos-13 runner with macos-latest * build(deps): bump urllib3 from 2.5.0 to 2.6.0 * mpremote v1.28.0 * mpflash v1.28.0 ## New Contributors * @andrewleech made their first contribution in https://github.com/Josverl/micropython-stubber/pull/701 **Full Changelog**: https://github.com/Josverl/micropython-stubber/compare/v1.26.3...v1.28.0

Revise stub merge architecture to provide detailed parameter type hints and return typesv1.24.0
? · 2025-02-05

## Pull Request Description The main change is a refactor of the docstub merging process, which now makes use of a set of reference stubs with parameter type information that is missing from , or only avaialble in the description, the micropython documentation. The new build-chain follows the following steps and logic: The subber tool is used to : 1. switch to a specific version of the micropython library documentation. `stubber clone` `stubber switch stable` 2. Generate docstubs from the micropython library documentation. This part has recieved significant updates , and makes use of new additions to the code-refactoring and merging logic that has received significant updates. tghis allows to enrich the doc-stubs with return and parameter type information from the reference stubs. The result has the docstrings based on the micropython documentation, and the parameter and return types are based on the reference-stubs. This also allows for methods or classes that are not mentioned or missing in the MicroPython documentation to be included in the docstubs. `stubber docstubs --enrich` 3. Optionally: update `micropython-stdlib-stubs` with the new docstubs. Updating the docstubs also takes advantage of the new functionality to enrich the target with the parameter and return type information from the reference-stubs. (also see the stdlib section below) `python build.py` (in stubs-repo: publish\micropython-stdlib-stubs) 4. Generate stubs for the frozen modules for the specific version of micropython. [can be done out-of-sequence] This retrieves the frozen modules for all ports and boards from the micropython repository, and generates the stubs for them. These stubs are enriched with the parameter and return type information from the doc-stubs. `stubber frozen --version {version}` 5. Create firmware-stubs for a specific MCU and firmware. [can be done out-of-sequence] The firmware shouild be flashed to the MCU, and it should be conencted via USB or serial. `stubber MCU` 6. The MCU-stubs are merged with the docstubs. `stubber merge --port {port} --board {board} --version {version}` 7. During this step the distribution packages are built by combining files from the merged-stubs, the frozen-stubs , and a few micropython-core files. Only a few chages have been done to this part of the build-chain. All package information is now stored in a SQLite database for change detection. `stubber build --port {port} --board {board} --version {version}` 8. Publish the distribution packages to pypi , and update the database with the relevant hashes for change detection. Only a few chages have been done to this part of the build-chain. All package information is now stored in a SQLite database for change detection. `stubber publish --port {port} --board {board} --version {version}` ### Docstub Merges & Enrichment Refactors docstub merging, adds type details, and streamlines overload handling. - stubber: Merge @overload (series of commits 1–5) Add functionality to merge source and target containing `@overload` decorators, where the the source-stub can have multiple decoroators. - Added ability to merge only the parameter type info, without overwriting existing docstrings. - Updated algorithm to match the source and destination candidates to avoid applying the same source to multiple destinations and other forms of duplication - Reduced the number of module specific configurations that were part of stubber.rst.lookup ( can now be done directly in the reference-stubs) - Merge TypeAliases / TypeVars With the additional type information in the reference-stubs, the docstubs can now be enriched with the parameter and return type information from the reference-stubs. For this more TypeAliases and TypeVars have been added to the reference-stubs, that also need to be taken into account during the merge. The merge process has been updated to handle these cases. ## What's Changed * build(deps): bump importlib-metadata from 7.1.0 to 8.0.0 by @dependabot in https://github.com/Josverl/micropython-stubber/pull/593 * build(deps-dev): bump ipykernel from 6.29.4 to 6.29.5 by @dependabot in https://github.com/Josverl/micropython-stubber/pull/600 * build(deps-dev): bump sphinx-click from 5.1.0 to 6.0.0 by @dependabot in https://github.com/Josverl/micropython-stubber/pull/597 * build(deps): bump mypy from 1.9.0 to 1.10.1 by @dependabot in https://github.com/Josverl/micropython-stubber/pull/594 * build(deps): bump libcst from 1.3.1 to 1.4.0 by @dependabot in https://github.com/Josverl/micropython-stubber/pull/596 * build(deps): bump pyright from 1.1.361 to 1.1.370 by @dependabot in https://github.com/Josverl/micropython-stubber/pull/601 * Migrate database management to SQLite and enhance table formatting by @Josverl in https://github.com/Josverl/micropython-stubber/pull/631 * mpflash: Fix macOS specific ports scanning issues by @Josverl in https://github.com/Josverl/micropython-stubber/pull/634 * Stubber: Fix retrieving the hashes from the database during build & publish. by @Josverl in https://github.com/Josverl/micropython-stubber/pull/638 * Enhance board ID handling and repository fetching by @Josverl in https://github.com/Josverl/micropython-stubber/pull/632 **Full Changelog**: https://github.com/Josverl/micropython-stubber/compare/v1.23.1...v1.24.0

v1.23.1
? · 2024-07-01
v1.23.0
? · 2024-06-25
v1.20.4
? · 2024-06-12
mpflash mpflash_v0.8.0
? · 2024-06-01

## What's Changed * Improve list display on 80 column terminals * Allow filtering of serial ports for all commands * Refactor handling of known board_ids and descriptions * Update board_info list for the MicroPython v1.23.0 release * Add `add_boards.py` script. **Full Changelog**: https://github.com/Josverl/micropython-stubber/compare/mpflash-v0.7.0...mpflash_v0.8.0

v1.20.0
? · 2024-04-29
v1.19.0
? · 2024-04-15