stubber.modcat¶
Used to define where stub modules should and should not be copied to, or merged to
This is shared between stubber, and external build scripts.
Attributes¶
Modules that should only be in stdlib, and not in the individual packages |
|
Port-specific frozen modules that are partial/complementary implementations extending C-modules. |
|
List of modules that are documented with the base name only, |
|
Modules to copy from reference modules to the docstubs |
|
Modules to remove from merged stubs, U_MODULES will be recreated later |
Module Contents¶
- stubber.modcat.STDLIB_ONLY_MODULES = ['abc', 'array', 'collections', 'io', 'builtins', 'asyncio', 'sys', 'types', 'ssl', 'os',...¶
Modules that should only be in stdlib, and not in the individual packages
- stubber.modcat.STUBS_COPY_FILTER¶
- stubber.modcat.COMPLEMENTARY_FROZEN_MODULES: Final[Dict[str, List[str]]]¶
Port-specific frozen modules that are partial/complementary implementations extending C-modules.
These frozen modules do NOT replace the full C-module stub; instead, they add new port-specific classes/functions that are not part of the standard C implementation. Their unique definitions are appended to the merged stub rather than being skipped entirely.
Example: ports/esp32/modules/machine.py adds the PCNT (Pulse Counter) class to the standard machine module for ESP32. See: https://github.com/micropython/micropython/blob/master/ports/esp32/modules/machine.py
- stubber.modcat.STDLIB_UMODULES = ['ucollections']¶
- stubber.modcat.U_MODULES = ['array', 'asyncio', 'binascii', 'bluetooth', 'cryptolib', 'errno', 'hashlib', 'heapq', 'io',...¶
List of modules that are documented with the base name only, but can also be imported with a u prefix
- stubber.modcat.CP_REFERENCE_TO_DOCSTUB: Final = ['asyncio', 'rp2/PIOASMEmit.pyi', 'rp2/asm_pio.pyi', 'rp2/asm_pio_rp2040.pyi', 'rp2/asm_pio_rp2350.pyi']¶
Modules to copy from reference modules to the docstubs
- stubber.modcat.RM_MERGED¶
Modules to remove from merged stubs, U_MODULES will be recreated later