micropython-stubber 1.20.6__tar.gz → 1.23.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/PKG-INFO +1 -1
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/pyproject.toml +1 -1
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/mpflash/mpflash/cli_flash.py +1 -1
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/mpflash/mpflash/cli_main.py +1 -1
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/mpflash/mpflash/config.py +5 -9
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/mpflash/mpflash/downloaded.py +3 -2
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/mpflash/mpflash/flash.py +17 -14
- micropython_stubber-1.23.0/src/mpflash/mpflash/flash_stm32.py +18 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/mpflash/mpflash/flash_stm32_dfu.py +3 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/mpflash/mpflash/flash_uf2.py +38 -16
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/mpflash/mpflash/flash_uf2_linux.py +10 -4
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/mpflash/mpflash/flash_uf2_macos.py +5 -2
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/mpflash/mpflash/flash_uf2_windows.py +7 -3
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/mpflash/mpflash/mpremoteboard/__init__.py +8 -3
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/mpflash/mpflash/worklist.py +3 -2
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/mpflash/poetry.lock +1 -1
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/mpflash/pyproject.toml +5 -1
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/__init__.py +1 -1
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/board/createstubs.py +3 -3
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/board/createstubs_db.py +4 -4
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/board/createstubs_db_min.py +1 -1
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/board/createstubs_db_mpy.mpy +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/board/createstubs_mem.py +4 -4
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/board/createstubs_mem_min.py +1 -1
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/board/createstubs_mem_mpy.mpy +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/board/createstubs_min.py +1 -1
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/board/createstubs_mpy.mpy +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/commands/build_cmd.py +1 -1
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/commands/cli.py +7 -3
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/commands/clone_cmd.py +14 -3
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/commands/enrich_folder_cmd.py +2 -1
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/commands/get_core_cmd.py +5 -3
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/commands/get_docstubs_cmd.py +5 -3
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/commands/get_frozen_cmd.py +4 -2
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/commands/get_mcu_cmd.py +8 -3
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/commands/merge_cmd.py +2 -1
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/commands/publish_cmd.py +1 -1
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/commands/stub_cmd.py +2 -1
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/commands/switch_cmd.py +12 -4
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/commands/variants_cmd.py +2 -1
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/tools/manifestfile.py +72 -27
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/tools/readme.md +3 -2
- micropython_stubber-1.20.6/src/mpflash/mpflash/flash_stm32.py +0 -24
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/LICENSE +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/readme.md +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/mpflash/README.md +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/mpflash/libusb_flash.ipynb +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/mpflash/mpflash/__init__.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/mpflash/mpflash/add_firmware.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/mpflash/mpflash/ask_input.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/mpflash/mpflash/bootloader/__init__.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/mpflash/mpflash/bootloader/manual.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/mpflash/mpflash/bootloader/micropython.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/mpflash/mpflash/bootloader/touch1200.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/mpflash/mpflash/cli_download.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/mpflash/mpflash/cli_group.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/mpflash/mpflash/cli_list.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/mpflash/mpflash/common.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/mpflash/mpflash/connected.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/mpflash/mpflash/download.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/mpflash/mpflash/errors.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/mpflash/mpflash/flash_esp.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/mpflash/mpflash/flash_stm32_cube.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/mpflash/mpflash/flash_uf2_boardid.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/mpflash/mpflash/list.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/mpflash/mpflash/logger.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/mpflash/mpflash/mpboard_id/__init__.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/mpflash/mpflash/mpboard_id/add_boards.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/mpflash/mpflash/mpboard_id/board.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/mpflash/mpflash/mpboard_id/board_id.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/mpflash/mpflash/mpboard_id/board_info.zip +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/mpflash/mpflash/mpboard_id/store.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/mpflash/mpflash/mpremoteboard/mpy_fw_info.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/mpflash/mpflash/mpremoteboard/runner.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/mpflash/mpflash/uf2disk.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/mpflash/mpflash/vendor/basicgit.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/mpflash/mpflash/vendor/click_aliases.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/mpflash/mpflash/vendor/dfu.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/mpflash/mpflash/vendor/pydfu.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/mpflash/mpflash/vendor/readme.md +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/mpflash/mpflash/vendor/versions.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/mpflash/stm32_udev_rules.md +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/basicgit.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/board/board_info.csv +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/board/boot.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/board/createstubs_lvgl.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/board/createstubs_lvgl_min.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/board/createstubs_lvgl_mpy.mpy +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/board/fw_info.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/board/info.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/board/main.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/board/modulelist.txt +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/board/pyrightconfig.json +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/bulk/mcu_stubber.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/codemod/__init__.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/codemod/_partials/__init__.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/codemod/_partials/db_main.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/codemod/_partials/lvgl_main.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/codemod/_partials/modules_reader.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/codemod/add_comment.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/codemod/add_method.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/codemod/board.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/codemod/enrich.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/codemod/merge_docstub.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/codemod/modify_list.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/codemod/utils.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/commands/__init__.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/commands/config_cmd.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/cst_transformer.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/data/board_info.csv +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/data/board_info.json +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/data/micropython_tags.csv +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/data/requirements-core-micropython.txt +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/data/requirements-core-pycopy.txt +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/downloader.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/freeze/__init__.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/freeze/common.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/freeze/freeze_folder.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/freeze/freeze_manifest_2.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/freeze/get_frozen.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/get_cpython.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/get_lobo.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/minify.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/publish/__init__.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/publish/bump.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/publish/candidates.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/publish/database.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/publish/defaults.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/publish/enums.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/publish/helpers.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/publish/merge_docstubs.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/publish/missing_class_methods.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/publish/package.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/publish/pathnames.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/publish/publish.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/publish/pypi.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/publish/stubpackage.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/rst/__init__.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/rst/classsort.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/rst/lookup.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/rst/output_dict.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/rst/reader.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/rst/report_return.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/rst/rst_utils.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/stubber.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/stubs_from_docs.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/tools/__init__.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/update_fallback.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/update_module_list.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/utils/__init__.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/utils/config.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/utils/makeversionhdr.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/utils/manifest.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/utils/post.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/utils/repos.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/utils/stubmaker.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/utils/typed_config_toml.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/utils/versions.py +0 -0
- {micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/variants.py +0 -0
@@ -4,18 +4,15 @@ import os
|
|
4
4
|
from pathlib import Path
|
5
5
|
from typing import List
|
6
6
|
|
7
|
-
import pkg_resources
|
8
7
|
import platformdirs
|
8
|
+
from importlib.metadata import version
|
9
9
|
|
10
10
|
from mpflash.logger import log
|
11
11
|
|
12
12
|
|
13
13
|
def get_version():
|
14
14
|
name = __package__ or "mpflash"
|
15
|
-
|
16
|
-
return pkg_resources.get_distribution(name).version
|
17
|
-
except pkg_resources.DistributionNotFound:
|
18
|
-
return "Package not found"
|
15
|
+
return version(name)
|
19
16
|
|
20
17
|
|
21
18
|
class MPtoolConfig:
|
@@ -32,16 +29,15 @@ class MPtoolConfig:
|
|
32
29
|
@property
|
33
30
|
def interactive(self):
|
34
31
|
# No interactions in CI
|
35
|
-
if os.getenv(
|
32
|
+
if os.getenv("GITHUB_ACTIONS") == "true":
|
36
33
|
log.warning("Disabling interactive mode in CI")
|
37
34
|
return False
|
38
35
|
return self._interactive
|
39
|
-
|
36
|
+
|
40
37
|
@interactive.setter
|
41
|
-
def interactive(self, value:bool):
|
38
|
+
def interactive(self, value: bool):
|
42
39
|
self._interactive = value
|
43
40
|
|
44
41
|
|
45
|
-
|
46
42
|
config = MPtoolConfig()
|
47
43
|
__version__ = get_version()
|
@@ -4,7 +4,7 @@ from typing import Dict, List, Optional
|
|
4
4
|
import jsonlines
|
5
5
|
from loguru import logger as log
|
6
6
|
|
7
|
-
from mpflash.common import FWInfo
|
7
|
+
from mpflash.common import PORT_FWTYPES, FWInfo
|
8
8
|
from mpflash.vendor.versions import clean_version
|
9
9
|
|
10
10
|
from .config import config
|
@@ -109,7 +109,7 @@ def filter_downloaded_fwlist(
|
|
109
109
|
log.trace(f"Filtering firmware for {version} : {len(fw_list)} found.")
|
110
110
|
# filter by port
|
111
111
|
if port:
|
112
|
-
fw_list = [fw for fw in fw_list if fw.port == port]
|
112
|
+
fw_list = [fw for fw in fw_list if fw.port == port and Path(fw.firmware).suffix in PORT_FWTYPES[port]]
|
113
113
|
log.trace(f"Filtering firmware for {port} : {len(fw_list)} found.")
|
114
114
|
|
115
115
|
if board_id:
|
@@ -120,6 +120,7 @@ def filter_downloaded_fwlist(
|
|
120
120
|
# the firmware variant should match exactly the board_id
|
121
121
|
fw_list = [fw for fw in fw_list if fw.variant == board_id]
|
122
122
|
log.trace(f"Filtering firmware for {board_id} : {len(fw_list)} found.")
|
123
|
+
|
123
124
|
if selector and port in selector:
|
124
125
|
fw_list = [fw for fw in fw_list if fw.filename.endswith(selector[port])]
|
125
126
|
return fw_list
|
@@ -30,20 +30,23 @@ def flash_list(
|
|
30
30
|
continue
|
31
31
|
log.info(f"Updating {mcu.board} on {mcu.serialport} to {fw_info.version}")
|
32
32
|
updated = None
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
33
|
+
try:
|
34
|
+
if mcu.port in UF2_PORTS and fw_file.suffix == ".uf2":
|
35
|
+
if not enter_bootloader(mcu, bootloader):
|
36
|
+
continue
|
37
|
+
updated = flash_uf2(mcu, fw_file=fw_file, erase=erase)
|
38
|
+
elif mcu.port in ["stm32"]:
|
39
|
+
if not enter_bootloader(mcu, bootloader):
|
40
|
+
continue
|
41
|
+
updated = flash_stm32(mcu, fw_file, erase=erase)
|
42
|
+
elif mcu.port in ["esp32", "esp8266"]:
|
43
|
+
# bootloader is handled by esptool for esp32/esp8266
|
44
|
+
updated = flash_esp(mcu, fw_file=fw_file, erase=erase)
|
45
|
+
else:
|
46
|
+
log.error(f"Don't (yet) know how to flash {mcu.port}-{mcu.board} on {mcu.serialport}")
|
47
|
+
except Exception as e:
|
48
|
+
log.error(f"Failed to flash {mcu.board} on {mcu.serialport}")
|
49
|
+
log.exception(e)
|
47
50
|
|
48
51
|
if updated:
|
49
52
|
flashed.append(updated)
|
@@ -0,0 +1,18 @@
|
|
1
|
+
"""Flash STM32 boards using pydfu"""
|
2
|
+
|
3
|
+
from pathlib import Path
|
4
|
+
|
5
|
+
from loguru import logger as log
|
6
|
+
|
7
|
+
# from .flash_stm32_cube import flash_stm32_cubecli
|
8
|
+
from .flash_stm32_dfu import dfu_init, flash_stm32_dfu
|
9
|
+
from mpflash.mpremoteboard import MPRemoteBoard
|
10
|
+
|
11
|
+
|
12
|
+
def flash_stm32(mcu: MPRemoteBoard, fw_file: Path, *, erase: bool, stm32_dfu: bool = True):
|
13
|
+
# sourcery skip: lift-return-into-if
|
14
|
+
dfu_init()
|
15
|
+
if updated := flash_stm32_dfu(mcu, fw_file=fw_file, erase=erase):
|
16
|
+
mcu.wait_for_restart()
|
17
|
+
log.success(f"Flashed {mcu.version} to {mcu.board}")
|
18
|
+
return updated
|
{micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/mpflash/mpflash/flash_stm32_dfu.py
RENAMED
@@ -39,6 +39,7 @@ def dfu_init():
|
|
39
39
|
log.error("pydfu not found")
|
40
40
|
return None
|
41
41
|
if platform.system() == "Windows":
|
42
|
+
log.debug("Initializing libusb backend on Windows...")
|
42
43
|
init_libusb_windows()
|
43
44
|
|
44
45
|
|
@@ -59,6 +60,8 @@ def flash_stm32_dfu(
|
|
59
60
|
Returns:
|
60
61
|
Optional[MPRemoteBoard]: The flashed remote board if successful, None otherwise.
|
61
62
|
"""
|
63
|
+
log.info("Using pydfu to flash STM32 boards")
|
64
|
+
|
62
65
|
if not pydfu:
|
63
66
|
log.error("pydfu not found, please install it with 'pip install pydfu' if supported")
|
64
67
|
return None
|
@@ -12,6 +12,8 @@ from loguru import logger as log
|
|
12
12
|
from rich.progress import track
|
13
13
|
|
14
14
|
from mpflash.mpremoteboard import MPRemoteBoard
|
15
|
+
import tenacity
|
16
|
+
from tenacity import stop_after_attempt, wait_fixed
|
15
17
|
|
16
18
|
from .common import PORT_FWTYPES
|
17
19
|
from .flash_uf2_boardid import get_board_id
|
@@ -37,31 +39,51 @@ def flash_uf2(mcu: MPRemoteBoard, fw_file: Path, erase: bool) -> Optional[MPRemo
|
|
37
39
|
log.error(f"UF2 not supported on {mcu.board} on {mcu.serialport}")
|
38
40
|
return None
|
39
41
|
if erase:
|
40
|
-
|
42
|
+
destination = waitfor_uf2()
|
41
43
|
|
44
|
+
if not destination or not destination.exists() or not (destination / "INFO_UF2.TXT").exists():
|
45
|
+
log.error("Board is not in bootloader mode")
|
46
|
+
return None
|
47
|
+
|
48
|
+
log.info("Board is in bootloader mode")
|
49
|
+
board_id = get_board_id(destination) # type: ignore
|
50
|
+
log.info(f"Board ID: {board_id}")
|
51
|
+
try:
|
52
|
+
cp_firmware_to_uf2(fw_file, destination)
|
53
|
+
log.success("Done copying, resetting the board and wait for it to restart")
|
54
|
+
except tenacity.RetryError:
|
55
|
+
log.error("Failed to copy the firmware file to the board.")
|
56
|
+
return None
|
57
|
+
|
58
|
+
if sys.platform in ["linux"]:
|
59
|
+
dismount_uf2_linux()
|
60
|
+
|
61
|
+
mcu.wait_for_restart()
|
62
|
+
# time.sleep(1) # 5 secs to short on linux
|
63
|
+
return mcu
|
64
|
+
|
65
|
+
|
66
|
+
def waitfor_uf2():
|
67
|
+
"""
|
68
|
+
Wait for the UF2 drive to mount
|
69
|
+
"""
|
42
70
|
if sys.platform == "linux":
|
43
|
-
|
71
|
+
return wait_for_UF2_linux()
|
44
72
|
elif sys.platform == "win32":
|
45
|
-
|
73
|
+
return wait_for_UF2_windows()
|
46
74
|
elif sys.platform == "darwin":
|
47
75
|
log.warning(f"OS {sys.platform} not tested/supported")
|
48
|
-
|
76
|
+
return wait_for_UF2_macos()
|
49
77
|
else:
|
50
78
|
log.warning(f"OS {sys.platform} not tested/supported")
|
51
79
|
return None
|
52
80
|
|
53
|
-
if not destination or not destination.exists() or not (destination / "INFO_UF2.TXT").exists():
|
54
|
-
log.error("Board is not in bootloader mode")
|
55
|
-
return None
|
56
81
|
|
57
|
-
|
58
|
-
|
59
|
-
|
82
|
+
@tenacity.retry(stop=stop_after_attempt(3), wait=wait_fixed(1), reraise=False)
|
83
|
+
def cp_firmware_to_uf2(fw_file, destination):
|
84
|
+
"""
|
85
|
+
Copy the firmware file to the destination,
|
86
|
+
Retry 3 times with 1s delay
|
87
|
+
"""
|
60
88
|
log.info(f"Copying {fw_file} to {destination}.")
|
61
89
|
shutil.copy(fw_file, destination)
|
62
|
-
log.success("Done copying, resetting the board and wait for it to restart")
|
63
|
-
if sys.platform in ["linux"]:
|
64
|
-
dismount_uf2_linux()
|
65
|
-
for _ in track(range(5 + 2), description="Waiting for the board to restart", transient=True, refresh_per_second=2):
|
66
|
-
time.sleep(1) # 5 secs to short on linux
|
67
|
-
return mcu
|
{micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/mpflash/mpflash/flash_uf2_linux.py
RENAMED
@@ -42,7 +42,10 @@ def get_uf2_drives():
|
|
42
42
|
uf2.mountpoint = uf2_part["mountpoint"]
|
43
43
|
yield uf2
|
44
44
|
elif disk["type"] == "disk" and disk.get("children") and len(disk.get("children")) > 0:
|
45
|
-
if
|
45
|
+
if (
|
46
|
+
disk.get("children")[0]["type"] == "part"
|
47
|
+
and disk.get("children")[0]["fstype"] == "vfat"
|
48
|
+
):
|
46
49
|
uf2_part = disk.get("children")[0]
|
47
50
|
# print( json.dumps(uf2_part, indent=4))
|
48
51
|
uf2 = UF2Disk()
|
@@ -70,7 +73,7 @@ def pmount(disk: UF2Disk):
|
|
70
73
|
log.debug(f"Mounted {disk.label} at {disk.mountpoint}")
|
71
74
|
glb_dismount_me.append(disk)
|
72
75
|
else:
|
73
|
-
log.
|
76
|
+
log.trace(f"\n{disk.label} already mounted at {disk.mountpoint}")
|
74
77
|
|
75
78
|
|
76
79
|
def pumount(disk: UF2Disk):
|
@@ -101,9 +104,12 @@ def wait_for_UF2_linux(s_max: int = 10):
|
|
101
104
|
uf2_drives = []
|
102
105
|
# while not destination and wait > 0:
|
103
106
|
for _ in track(
|
104
|
-
range(s_max),
|
107
|
+
range(s_max),
|
108
|
+
description="Waiting for mcu to mount as a drive",
|
109
|
+
transient=True,
|
110
|
+
refresh_per_second=2,
|
111
|
+
total=s_max,
|
105
112
|
):
|
106
|
-
# log.info(f"Waiting for mcu to mount as a drive : {wait} seconds left")
|
107
113
|
uf2_drives += list(get_uf2_drives())
|
108
114
|
for drive in get_uf2_drives():
|
109
115
|
pmount(drive)
|
{micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/mpflash/mpflash/flash_uf2_macos.py
RENAMED
@@ -10,14 +10,17 @@ from typing import Optional
|
|
10
10
|
from rich.progress import track
|
11
11
|
|
12
12
|
|
13
|
-
|
14
13
|
def wait_for_UF2_macos(s_max: int = 10) -> Optional[Path]:
|
15
14
|
"""Wait for the MCU to mount as a drive"""
|
16
15
|
if s_max < 1:
|
17
16
|
s_max = 10
|
18
17
|
destination = None
|
19
18
|
for _ in track(
|
20
|
-
range(s_max),
|
19
|
+
range(s_max),
|
20
|
+
description="Waiting for mcu to mount as a drive",
|
21
|
+
transient=True,
|
22
|
+
refresh_per_second=2,
|
23
|
+
total=s_max,
|
21
24
|
):
|
22
25
|
# log.info(f"Waiting for mcu to mount as a drive : {n} seconds left")
|
23
26
|
vol_mounts = Path("/Volumes").iterdir()
|
{micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/mpflash/mpflash/flash_uf2_windows.py
RENAMED
@@ -11,14 +11,18 @@ import psutil
|
|
11
11
|
from rich.progress import track
|
12
12
|
|
13
13
|
|
14
|
-
|
15
|
-
|
16
14
|
def wait_for_UF2_windows(s_max: int = 10) -> Optional[Path]:
|
17
15
|
"""Wait for the MCU to mount as a drive"""
|
18
16
|
if s_max < 1:
|
19
17
|
s_max = 10
|
20
18
|
destination = None
|
21
|
-
for _ in track(
|
19
|
+
for _ in track(
|
20
|
+
range(s_max),
|
21
|
+
description="Waiting for mcu to mount as a drive",
|
22
|
+
transient=True,
|
23
|
+
refresh_per_second=2,
|
24
|
+
total=s_max,
|
25
|
+
):
|
22
26
|
# log.info(f"Waiting for mcu to mount as a drive : {n} seconds left")
|
23
27
|
drives = [drive.device for drive in psutil.disk_partitions()]
|
24
28
|
for drive in drives:
|
@@ -91,7 +91,9 @@ class MPRemoteBoard:
|
|
91
91
|
|
92
92
|
if sys.platform == "win32":
|
93
93
|
# Windows sort of comports by number - but fallback to device name
|
94
|
-
return sorted(
|
94
|
+
return sorted(
|
95
|
+
output, key=lambda x: int(x.split()[0][3:]) if x.split()[0][3:].isdigit() else x
|
96
|
+
)
|
95
97
|
# sort by device name
|
96
98
|
return sorted(output)
|
97
99
|
|
@@ -127,7 +129,9 @@ class MPRemoteBoard:
|
|
127
129
|
self.description = descr = info["board"]
|
128
130
|
pos = descr.rfind(" with")
|
129
131
|
short_descr = descr[:pos].strip() if pos != -1 else ""
|
130
|
-
if board_name := find_board_id_by_description(
|
132
|
+
if board_name := find_board_id_by_description(
|
133
|
+
descr, short_descr, version=self.version
|
134
|
+
):
|
131
135
|
self.board = board_name
|
132
136
|
else:
|
133
137
|
self.board = "UNKNOWN_BOARD"
|
@@ -211,7 +215,8 @@ class MPRemoteBoard:
|
|
211
215
|
transient=True,
|
212
216
|
get_time=lambda: time.time(),
|
213
217
|
show_speed=False,
|
214
|
-
refresh_per_second=
|
218
|
+
refresh_per_second=2,
|
219
|
+
total=timeout,
|
215
220
|
):
|
216
221
|
time.sleep(1)
|
217
222
|
try:
|
@@ -3,7 +3,7 @@ from typing import Dict, List, Optional, Tuple
|
|
3
3
|
|
4
4
|
from loguru import logger as log
|
5
5
|
|
6
|
-
from mpflash.common import FWInfo, filtered_comports
|
6
|
+
from mpflash.common import FWInfo, filtered_comports, PORT_FWTYPES
|
7
7
|
from mpflash.errors import MPFlashError
|
8
8
|
|
9
9
|
from .downloaded import find_downloaded_firmware
|
@@ -54,8 +54,9 @@ def auto_update(
|
|
54
54
|
if not board_firmwares:
|
55
55
|
log.error(f"No {target_version} firmware found for {mcu.board} on {mcu.serialport}.")
|
56
56
|
continue
|
57
|
+
|
57
58
|
if len(board_firmwares) > 1:
|
58
|
-
log.
|
59
|
+
log.warning(f"Multiple {target_version} firmwares found for {mcu.board} on {mcu.serialport}.")
|
59
60
|
|
60
61
|
# just use the last firmware
|
61
62
|
fw_info = board_firmwares[-1]
|
@@ -1585,4 +1585,4 @@ files = [
|
|
1585
1585
|
[metadata]
|
1586
1586
|
lock-version = "2.0"
|
1587
1587
|
python-versions = ">=3.8.1,<4.0"
|
1588
|
-
content-hash = "
|
1588
|
+
content-hash = "99cc10bd15b033a47635e31676205b38443b15697fb189b01a8eb7f2f175acf8"
|
@@ -1,6 +1,6 @@
|
|
1
1
|
[tool.poetry]
|
2
2
|
name = "mpflash"
|
3
|
-
version = "0.
|
3
|
+
version = "0.9.0"
|
4
4
|
description = "Flash and download tool for MicroPython firmwares"
|
5
5
|
authors = ["Jos Verlinde <jos_verlinde@hotmail.com>"]
|
6
6
|
license = "MIT"
|
@@ -40,6 +40,10 @@ rich-click = "^1.8.1"
|
|
40
40
|
tenacity = "8.2.3"
|
41
41
|
|
42
42
|
|
43
|
+
[tool.poetry.group.dev]
|
44
|
+
optional = true
|
45
|
+
[tool.poetry.group.dev.dependencies]
|
46
|
+
|
43
47
|
[tool.poetry.group.test]
|
44
48
|
optional = true
|
45
49
|
[tool.poetry.group.test.dependencies]
|
@@ -24,7 +24,7 @@ try:
|
|
24
24
|
except ImportError:
|
25
25
|
from ucollections import OrderedDict # type: ignore
|
26
26
|
|
27
|
-
__version__ = "v1.
|
27
|
+
__version__ = "v1.23.0"
|
28
28
|
ENOENT = 2
|
29
29
|
_MAX_CLASS_LEVEL = 2 # Max class nesting
|
30
30
|
LIBS = ["lib", "/lib", "/sd/lib", "/flash/lib", "."]
|
@@ -595,10 +595,10 @@ def _info(): # type:() -> dict[str, str]
|
|
595
595
|
if (
|
596
596
|
info["version"]
|
597
597
|
and info["version"].endswith(".0")
|
598
|
-
and info["version"] >= "1.10.0" # versions from 1.10.0 to 1.
|
598
|
+
and info["version"] >= "1.10.0" # versions from 1.10.0 to 1.23.0 do not have a micro .0
|
599
599
|
and info["version"] <= "1.19.9"
|
600
600
|
):
|
601
|
-
# versions from 1.10.0 to 1.
|
601
|
+
# versions from 1.10.0 to 1.23.0 do not have a micro .0
|
602
602
|
info["version"] = info["version"][:-2]
|
603
603
|
|
604
604
|
# spell-checker: disable
|
{micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/board/createstubs_db.py
RENAMED
@@ -18,7 +18,7 @@ Create stubs for (all) modules on a MicroPython board.
|
|
18
18
|
- cross compilation, using mpy-cross, to avoid the compilation step on the micropython device
|
19
19
|
|
20
20
|
|
21
|
-
This variant was generated from createstubs.py by micropython-stubber v1.
|
21
|
+
This variant was generated from createstubs.py by micropython-stubber v1.23.0
|
22
22
|
"""
|
23
23
|
|
24
24
|
# Copyright (c) 2019-2024 Jos Verlinde
|
@@ -43,7 +43,7 @@ try:
|
|
43
43
|
except ImportError:
|
44
44
|
from ucollections import OrderedDict # type: ignore
|
45
45
|
|
46
|
-
__version__ = "v1.
|
46
|
+
__version__ = "v1.23.0"
|
47
47
|
ENOENT = 2
|
48
48
|
_MAX_CLASS_LEVEL = 2 # Max class nesting
|
49
49
|
LIBS = ["lib", "/lib", "/sd/lib", "/flash/lib", "."]
|
@@ -606,10 +606,10 @@ def _info(): # type:() -> dict[str, str]
|
|
606
606
|
if (
|
607
607
|
info["version"]
|
608
608
|
and info["version"].endswith(".0")
|
609
|
-
and info["version"] >= "1.10.0" # versions from 1.10.0 to 1.
|
609
|
+
and info["version"] >= "1.10.0" # versions from 1.10.0 to 1.23.0 do not have a micro .0
|
610
610
|
and info["version"] <= "1.19.9"
|
611
611
|
):
|
612
|
-
# versions from 1.10.0 to 1.
|
612
|
+
# versions from 1.10.0 to 1.23.0 do not have a micro .0
|
613
613
|
info["version"] = info["version"][:-2]
|
614
614
|
|
615
615
|
# spell-checker: disable
|
{micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/board/createstubs_db_min.py
RENAMED
@@ -51,7 +51,7 @@ try:from machine import reset
|
|
51
51
|
except O:pass
|
52
52
|
try:from collections import OrderedDict as l
|
53
53
|
except O:from ucollections import OrderedDict as l
|
54
|
-
__version__='v1.
|
54
|
+
__version__='v1.23.0'
|
55
55
|
A3=2
|
56
56
|
A4=2
|
57
57
|
A5=['lib','/lib','/sd/lib','/flash/lib',J]
|
{micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/board/createstubs_db_mpy.mpy
RENAMED
Binary file
|
{micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/board/createstubs_mem.py
RENAMED
@@ -9,7 +9,7 @@
|
|
9
9
|
- cross compilation, using mpy-cross,
|
10
10
|
to avoid the compilation step on the micropython device
|
11
11
|
|
12
|
-
This variant was generated from createstubs.py by micropython-stubber v1.
|
12
|
+
This variant was generated from createstubs.py by micropython-stubber v1.23.0
|
13
13
|
"""
|
14
14
|
|
15
15
|
# Copyright (c) 2019-2024 Jos Verlinde
|
@@ -34,7 +34,7 @@ try:
|
|
34
34
|
except ImportError:
|
35
35
|
from ucollections import OrderedDict # type: ignore
|
36
36
|
|
37
|
-
__version__ = "v1.
|
37
|
+
__version__ = "v1.23.0"
|
38
38
|
ENOENT = 2
|
39
39
|
_MAX_CLASS_LEVEL = 2 # Max class nesting
|
40
40
|
LIBS = ["lib", "/lib", "/sd/lib", "/flash/lib", "."]
|
@@ -597,10 +597,10 @@ def _info(): # type:() -> dict[str, str]
|
|
597
597
|
if (
|
598
598
|
info["version"]
|
599
599
|
and info["version"].endswith(".0")
|
600
|
-
and info["version"] >= "1.10.0" # versions from 1.10.0 to 1.
|
600
|
+
and info["version"] >= "1.10.0" # versions from 1.10.0 to 1.23.0 do not have a micro .0
|
601
601
|
and info["version"] <= "1.19.9"
|
602
602
|
):
|
603
|
-
# versions from 1.10.0 to 1.
|
603
|
+
# versions from 1.10.0 to 1.23.0 do not have a micro .0
|
604
604
|
info["version"] = info["version"][:-2]
|
605
605
|
|
606
606
|
# spell-checker: disable
|
{micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/board/createstubs_mem_mpy.mpy
RENAMED
Binary file
|
{micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/board/createstubs_min.py
RENAMED
@@ -50,7 +50,7 @@ try:from machine import reset
|
|
50
50
|
except N:pass
|
51
51
|
try:from collections import OrderedDict as h
|
52
52
|
except N:from ucollections import OrderedDict as h
|
53
|
-
__version__='v1.
|
53
|
+
__version__='v1.23.0'
|
54
54
|
A0=2
|
55
55
|
A1=2
|
56
56
|
A5=['lib','/lib','/sd/lib','/flash/lib',J]
|
{micropython_stubber-1.20.6 → micropython_stubber-1.23.0}/src/stubber/board/createstubs_mpy.mpy
RENAMED
Binary file
|
@@ -1,9 +1,10 @@
|
|
1
1
|
"""
|
2
2
|
command line interface - main group
|
3
3
|
"""
|
4
|
+
|
4
5
|
import sys
|
5
6
|
|
6
|
-
import click
|
7
|
+
import rich_click as click
|
7
8
|
from loguru import logger as log
|
8
9
|
from stubber import __version__
|
9
10
|
|
@@ -11,11 +12,12 @@ from stubber import __version__
|
|
11
12
|
@click.group(chain=True)
|
12
13
|
@click.version_option(package_name="micropython-stubber", prog_name="micropython-stubber✏️ ")
|
13
14
|
@click.option(
|
15
|
+
"-V",
|
14
16
|
"-v",
|
15
17
|
"--verbose",
|
16
18
|
count=True,
|
17
19
|
default=0,
|
18
|
-
help="-
|
20
|
+
help="-V for DEBUG, -VV for TRACE",
|
19
21
|
is_eager=True,
|
20
22
|
)
|
21
23
|
@click.pass_context
|
@@ -46,6 +48,8 @@ def set_loglevel(verbose: int) -> str:
|
|
46
48
|
else:
|
47
49
|
format_str = "<green>{time:YYYY-MM-DD HH:mm:ss.SSS}</green> | <level>{level: <8}</level> | <cyan>{name}</cyan>:<cyan>{function}</cyan>:<cyan>{line}</cyan> - <level>{message}</level>"
|
48
50
|
|
49
|
-
log.add(
|
51
|
+
log.add(
|
52
|
+
sys.stderr, level=level, backtrace=True, diagnose=True, colorize=True, format=format_str
|
53
|
+
)
|
50
54
|
log.info(f"micropython-stubber {__version__}")
|
51
55
|
return level
|
@@ -7,7 +7,7 @@ import os
|
|
7
7
|
from pathlib import Path
|
8
8
|
from typing import List, Tuple, Union
|
9
9
|
|
10
|
-
import click
|
10
|
+
import rich_click as click
|
11
11
|
import stubber.basicgit as git
|
12
12
|
from loguru import logger as log
|
13
13
|
from stubber.utils.config import CONFIG
|
@@ -20,8 +20,19 @@ from .cli import stubber_cli
|
|
20
20
|
|
21
21
|
|
22
22
|
@stubber_cli.command(name="clone")
|
23
|
-
@click.option(
|
24
|
-
|
23
|
+
@click.option(
|
24
|
+
"--path",
|
25
|
+
"-p",
|
26
|
+
default=CONFIG.repo_path.as_posix(),
|
27
|
+
type=click.Path(file_okay=False, dir_okay=True),
|
28
|
+
)
|
29
|
+
@click.option(
|
30
|
+
"--add-stubs/--no-stubs",
|
31
|
+
"stubs",
|
32
|
+
default=False,
|
33
|
+
is_flag=True,
|
34
|
+
help="Also clone the micropython-stubs repo",
|
35
|
+
)
|
25
36
|
def cli_clone(path: Union[str, Path], stubs: bool = False):
|
26
37
|
"""
|
27
38
|
Clone/fetch the micropython repos locally.
|