stubber

stubber [OPTIONS] COMMAND1 [ARGS]... [COMMAND2 [ARGS]...]...

Options

--version

Show the version and exit.

-v, --verbose

-v for DEBUG

build

Commandline interface to publish stubs.

stubber build [OPTIONS]

Options

--family <family>
Default

micropython

-V, --version, --Version <versions>

multiple:

Default

1.19.1

-p, --port <ports>

multiple:

Default

auto

-b, --board <boards>

multiple:

Default

GENERIC

--clean

clean folders after processing and publishing

clone

Clone/fetch the micropython repos locally.

The local repos are used to generate frozen-stubs and doc-stubs.

stubber clone [OPTIONS]

Options

-p, --path <path>
--add-stubs, --no-stubs

Also clone the micropython-stubs repo

enrich

Enrich the stubs in stub_folder with the docstubs in docstubs_folder.

stubber enrich [OPTIONS]

Options

-s, --stubs <stubs_folder>

folder containing the firmware stubs to be updated

Default

repos/micropython-stubs/stubs

-ds, --docstubs <docstubs_folder>

folder containing the docstubs to be applied

Default

repos/micropython-stubs/stubs

--diff

Show diff

Default

False

--dry-run

Dry run does not write the files back

Default

False

get-core

Download core CPython stubs from PyPi.

Get the core (CPython compat) modules for both MicroPython and Pycopy.

stubber get-core [OPTIONS]

Options

-stubs, --stub-folder <stub_folder>
Default

repos/micropython-stubs/stubs

--pyi, --no-pyi

Create .pyi files for the (new) frozen modules

Default

True

--black, --no-black

Run black on the (new) frozen modules

Default

True

get-docstubs

Build stubs from documentation.

Read the Micropython library documentation files and use them to build stubs that can be used for static typechecking.

stubber get-docstubs [OPTIONS]

Options

-p, --path <path>
Default

repos

--stub-path, --stub-folder <target>

Destination of the files to be generated.

Default

repos/micropython-stubs/stubs

-f, --family <basename>

Micropython family.

Default

micropython

-b, --black, -nb, --no-black

Run black

Default

True

get-frozen

Get the frozen stubs for MicroPython.

Get the frozen modules for the checked out version of MicroPython

stubber get-frozen [OPTIONS]

Options

-stubs, --stub-folder <stub_folder>
Default

repos/micropython-stubs/stubs

--version, --tag <version>

Version number to use. [default: Git tag]

--pyi, --no-pyi

Create .pyi files for the (new) frozen modules

Default

True

--black, --no-black

Run black on the (new) frozen modules

Default

True

get-lobo

Get the frozen stubs for Lobo-esp32.

stubber get-lobo [OPTIONS]

Options

-stubs, --stub-folder <stub_folder>
Default

repos/micropython-stubs/stubs

--pyi, --no-pyi

Create .pyi files for the (new) frozen modules

Default

True

--black, --no-black

Run black on the (new) frozen modules

Default

True

merge

Enrich the stubs in stub_folder with the docstubs in docstubs_folder.

stubber merge [OPTIONS]

Options

--family <family>
Default

micropython

-V, --version, --Version <versions>

‘latest’, ‘auto’, or one or more versions

Default

auto

minify

Minify createstubs*.py.

Creates a minified version of the SOURCE micropython file in TARGET (file or folder). The goal is to use less memory / not to run out of memory, while generating Firmware stubs.

stubber minify [OPTIONS]

Options

-s, --source <source>
Default

board/createstubs.py

-t, --target <target>
Default

./minified

-d, --diff

Show the functional changes made to the source script.

-c, -xc, --compile

Cross compile after minification.

-a, --all

Minify all variants (normal, _mem and _db).

--report, --no-report

Keep or disable minimal progress reporting in the minified version.

Default

True

publish

Commandline interface to publish stubs.

stubber publish [OPTIONS]

Options

--family <family>
Default

micropython

-V, --version, --Version <versions>

multiple:

Default

1.19.1

-p, --port <ports>

multiple:

Default

auto

-b, --board <boards>

multiple:

Default

GENERIC

--pypi, --test-pypi

publish to PYPI or Test-PYPI

Default

False

--dry-run

go though the motions but do not publish

--force

create new post release even if no changes detected

--clean

clean folders after processing and publishing

show-config

Show the current configuration

stubber show-config [OPTIONS]

stub

Create or update .pyi type hint files.

stubber stub [OPTIONS]

Options

-s, --source <source>

switch

Switch to a specific version of the micropython repos.

Specify the version of the MicroPython repo. use of the –tag or –version is deprocated

The Micropython-lib repo will be checked out to a commit that corresponds in time to that version tag, in order to allow non-current versions to be stubbed correctly.

The repros must be cloned already

stubber switch [OPTIONS] [[v1.9.3|v1.9.4|latest]]

Options

-p, --path <path>

Arguments

TAG

Optional argument

update-fallback

Update the fallback stubs.

The fallback stubs are updated/collated from files of the firmware-stubs, doc-stubs and core-stubs.

stubber update-fallback [OPTIONS]

Options

--version <version>

Version number to use

Default

v1_18

--stub-folder <stub_folder>

Destination of the files to be generated.

Default

repos/micropython-stubs/stubs

update-module-list

Update the module list based on the information in the data folder

stubber update-module-list [OPTIONS]