micropython-stubber 1.23.2__tar.gz → 1.23.3__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.23.2 → micropython_stubber-1.23.3}/PKG-INFO +3 -3
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/pyproject.toml +3 -3
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/mpflash/basicgit.py +27 -7
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/mpflash/common.py +2 -5
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/mpflash/mpboard_id/store.py +8 -3
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/mpflash/mpremoteboard/mpy_fw_info.py +27 -16
- micropython_stubber-1.23.3/src/mpflash/poetry.lock +1687 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/pyproject.toml +1 -1
- micropython_stubber-1.23.3/src/stubber/__init__.py +3 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/board/createstubs.py +17 -35
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/board/createstubs_db.py +7 -8
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/board/createstubs_db_min.py +116 -117
- micropython_stubber-1.23.3/src/stubber/board/createstubs_db_mpy.mpy +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/board/createstubs_mem.py +7 -8
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/board/createstubs_mem_min.py +104 -105
- micropython_stubber-1.23.3/src/stubber/board/createstubs_mem_mpy.mpy +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/board/createstubs_min.py +116 -117
- micropython_stubber-1.23.3/src/stubber/board/createstubs_mpy.mpy +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/codemod/enrich.py +0 -6
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/publish/merge_docstubs.py +4 -8
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/publish/stubpackage.py +4 -8
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/rst/lookup.py +0 -2
- micropython_stubber-1.23.2/src/mpflash/poetry.lock +0 -1599
- micropython_stubber-1.23.2/src/stubber/__init__.py +0 -3
- micropython_stubber-1.23.2/src/stubber/board/createstubs_db_mpy.mpy +0 -0
- micropython_stubber-1.23.2/src/stubber/board/createstubs_mem_mpy.mpy +0 -0
- micropython_stubber-1.23.2/src/stubber/board/createstubs_mpy.mpy +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/LICENSE +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/readme.md +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/README.md +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/libusb_flash.ipynb +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/mpflash/__init__.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/mpflash/add_firmware.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/mpflash/ask_input.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/mpflash/bootloader/__init__.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/mpflash/bootloader/activate.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/mpflash/bootloader/detect.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/mpflash/bootloader/manual.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/mpflash/bootloader/micropython.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/mpflash/bootloader/touch1200.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/mpflash/cli_download.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/mpflash/cli_flash.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/mpflash/cli_group.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/mpflash/cli_list.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/mpflash/cli_main.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/mpflash/config.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/mpflash/connected.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/mpflash/download.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/mpflash/downloaded.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/mpflash/errors.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/mpflash/flash/__init__.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/mpflash/flash/esp.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/mpflash/flash/stm32.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/mpflash/flash/stm32_dfu.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/mpflash/flash/uf2/__init__.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/mpflash/flash/uf2/boardid.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/mpflash/flash/uf2/linux.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/mpflash/flash/uf2/macos.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/mpflash/flash/uf2/uf2disk.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/mpflash/flash/uf2/windows.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/mpflash/flash/worklist.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/mpflash/list.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/mpflash/logger.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/mpflash/mpboard_id/__init__.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/mpflash/mpboard_id/add_boards.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/mpflash/mpboard_id/board.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/mpflash/mpboard_id/board_id.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/mpflash/mpboard_id/board_info.zip +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/mpflash/mpremoteboard/__init__.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/mpflash/mpremoteboard/runner.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/mpflash/vendor/click_aliases.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/mpflash/vendor/dfu.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/mpflash/vendor/pydfu.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/mpflash/vendor/readme.md +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/mpflash/versions.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/stm32_udev_rules.md +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/board/board_info.csv +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/board/boot.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/board/createstubs_lvgl.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/board/createstubs_lvgl_min.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/board/createstubs_lvgl_mpy.mpy +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/board/fw_info.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/board/info.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/board/main.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/board/modulelist.txt +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/board/pyrightconfig.json +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/bulk/mcu_stubber.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/codemod/__init__.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/codemod/_partials/__init__.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/codemod/_partials/db_main.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/codemod/_partials/lvgl_main.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/codemod/_partials/modules_reader.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/codemod/add_comment.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/codemod/add_method.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/codemod/board.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/codemod/merge_docstub.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/codemod/modify_list.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/codemod/utils.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/commands/__init__.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/commands/build_cmd.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/commands/cli.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/commands/clone_cmd.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/commands/config_cmd.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/commands/enrich_folder_cmd.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/commands/get_core_cmd.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/commands/get_docstubs_cmd.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/commands/get_frozen_cmd.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/commands/get_mcu_cmd.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/commands/merge_cmd.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/commands/publish_cmd.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/commands/stub_cmd.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/commands/switch_cmd.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/commands/variants_cmd.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/cst_transformer.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/data/board_info.csv +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/data/board_info.json +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/data/micropython_tags.csv +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/data/requirements-core-micropython.txt +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/data/requirements-core-pycopy.txt +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/downloader.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/freeze/__init__.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/freeze/common.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/freeze/freeze_folder.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/freeze/freeze_manifest_2.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/freeze/get_frozen.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/get_cpython.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/get_lobo.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/minify.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/publish/__init__.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/publish/bump.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/publish/candidates.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/publish/database.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/publish/defaults.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/publish/enums.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/publish/helpers.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/publish/missing_class_methods.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/publish/package.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/publish/pathnames.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/publish/publish.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/publish/pypi.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/rst/__init__.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/rst/classsort.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/rst/output_dict.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/rst/reader.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/rst/report_return.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/rst/rst_utils.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/stubber.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/stubs_from_docs.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/tools/__init__.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/tools/manifestfile.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/tools/readme.md +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/update_fallback.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/update_module_list.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/utils/__init__.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/utils/config.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/utils/makeversionhdr.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/utils/manifest.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/utils/post.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/utils/repos.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/utils/stubmaker.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/utils/typed_config_toml.py +0 -0
- {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/variants.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: micropython-stubber
|
3
|
-
Version: 1.23.
|
3
|
+
Version: 1.23.3
|
4
4
|
Summary: Tooling to create and maintain stubs for MicroPython
|
5
5
|
Home-page: https://github.com/Josverl/micropython-stubber#readme
|
6
6
|
License: MIT
|
@@ -26,7 +26,7 @@ Requires-Dist: executing (>=2.0.1,<3.0.0)
|
|
26
26
|
Requires-Dist: importlib-metadata (>=1,<9) ; python_version < "3.8"
|
27
27
|
Requires-Dist: libcst (>=1.1.0,<2.0.0)
|
28
28
|
Requires-Dist: loguru (>=0.6,<0.8)
|
29
|
-
Requires-Dist: mpflash (>=1.0.
|
29
|
+
Requires-Dist: mpflash (>=1.0.5,<2.0.0)
|
30
30
|
Requires-Dist: mpremote (>=1.23.0,<2.0.0)
|
31
31
|
Requires-Dist: mypy (==1.10.1)
|
32
32
|
Requires-Dist: mypy-gitlab-code-quality (>=1.1.0,<2.0.0)
|
@@ -37,7 +37,7 @@ Requires-Dist: pypi-simple (>=1.0.0,<2.0.0)
|
|
37
37
|
Requires-Dist: pyright (>=1.1.341,<2.0.0)
|
38
38
|
Requires-Dist: pyserial (>=3.5,<4.0)
|
39
39
|
Requires-Dist: pysondb-v2 (>=2.1.0,<3.0.0)
|
40
|
-
Requires-Dist: python-minifier (>=2.7.0,<3.0.0) ; python_version < "3.
|
40
|
+
Requires-Dist: python-minifier (>=2.7.0,<3.0.0) ; python_version < "3.14"
|
41
41
|
Requires-Dist: requests (>=2.32.3,<3.0.0)
|
42
42
|
Requires-Dist: rich-click (>=1.8.3,<2.0.0)
|
43
43
|
Requires-Dist: tabulate (>=0.9.0,<0.10.0)
|
@@ -8,7 +8,7 @@ repo-path = "./repos"
|
|
8
8
|
|
9
9
|
[tool.poetry]
|
10
10
|
name = "micropython-stubber"
|
11
|
-
version = "1.23.
|
11
|
+
version = "1.23.3"
|
12
12
|
description = "Tooling to create and maintain stubs for MicroPython"
|
13
13
|
authors = ["Jos Verlinde <jos_verlinde@hotmail.com>"]
|
14
14
|
license = "MIT"
|
@@ -48,10 +48,10 @@ mpremote = "mpremote.main:main"
|
|
48
48
|
|
49
49
|
[tool.poetry.dependencies]
|
50
50
|
python = ">=3.9,<4.0"
|
51
|
-
python-minifier = { version = "^2.7.0", python = "<3.
|
51
|
+
python-minifier = { version = "^2.7.0", python = "<3.14" }
|
52
52
|
requests = "^2.32.3"
|
53
53
|
mypy = "1.10.1"
|
54
|
-
mpflash = "^1.0.
|
54
|
+
mpflash = "^1.0.5"
|
55
55
|
mpremote = "^1.23.0"
|
56
56
|
# others
|
57
57
|
autoflake = ">=1.7,<3.0"
|
@@ -10,7 +10,7 @@ from pathlib import Path
|
|
10
10
|
from typing import List, Optional, Union
|
11
11
|
|
12
12
|
import cachetools.func
|
13
|
-
from github import Auth, Github
|
13
|
+
from github import Auth, BadCredentialsException, Github
|
14
14
|
from loguru import logger as log
|
15
15
|
from packaging.version import parse
|
16
16
|
|
@@ -18,7 +18,11 @@ from packaging.version import parse
|
|
18
18
|
|
19
19
|
# Token with no permissions to avoid throttling
|
20
20
|
# https://docs.github.com/en/rest/using-the-rest-api/rate-limits-for-the-rest-api?apiVersion=2022-11-28#getting-a-higher-rate-limit
|
21
|
-
PAT_NO_ACCESS =
|
21
|
+
PAT_NO_ACCESS = (
|
22
|
+
"github_pat_"
|
23
|
+
+ "11AAHPVFQ0G4NTaQ73Bw5J"
|
24
|
+
+ "_fAp7K9sZ1qL8VFnI9g78eUlCdmOXHB3WzSdj2jtEYb4XF3N7PDJBl32qIxq"
|
25
|
+
)
|
22
26
|
PAT = os.environ.get("GITHUB_TOKEN") or PAT_NO_ACCESS
|
23
27
|
GH_CLIENT = Github(auth=Auth.Token(PAT))
|
24
28
|
|
@@ -35,9 +39,17 @@ def _run_local_git(
|
|
35
39
|
if repo:
|
36
40
|
if isinstance(repo, str):
|
37
41
|
repo = Path(repo)
|
38
|
-
result = subprocess.run(
|
42
|
+
result = subprocess.run(
|
43
|
+
cmd,
|
44
|
+
capture_output=capture_output,
|
45
|
+
check=True,
|
46
|
+
cwd=repo.absolute().as_posix(),
|
47
|
+
encoding="utf-8",
|
48
|
+
)
|
39
49
|
else:
|
40
|
-
result = subprocess.run(
|
50
|
+
result = subprocess.run(
|
51
|
+
cmd, capture_output=capture_output, check=True, encoding="utf-8"
|
52
|
+
)
|
41
53
|
except (NotADirectoryError, FileNotFoundError) as e: # pragma: no cover
|
42
54
|
return None
|
43
55
|
except subprocess.CalledProcessError as e: # pragma: no cover
|
@@ -76,7 +88,9 @@ def clone(remote_repo: str, path: Path, shallow: bool = False, tag: Optional[str
|
|
76
88
|
return False
|
77
89
|
|
78
90
|
|
79
|
-
def get_local_tag(
|
91
|
+
def get_local_tag(
|
92
|
+
repo: Optional[Union[str, Path]] = None, abbreviate: bool = True
|
93
|
+
) -> Union[str, None]:
|
80
94
|
"""
|
81
95
|
get the most recent git version tag of a local repo
|
82
96
|
repo Path should be in the form of : repo = "./repo/micropython"
|
@@ -125,12 +139,16 @@ def get_local_tags(repo: Optional[Path] = None, minver: Optional[str] = None) ->
|
|
125
139
|
@cachetools.func.ttl_cache(maxsize=16, ttl=60) # 60 seconds
|
126
140
|
def get_tags(repo: str, minver: Optional[str] = None) -> List[str]:
|
127
141
|
"""
|
128
|
-
Get list of tag of a repote github repo
|
142
|
+
Get list of tag of a repote github repo.
|
143
|
+
only the last -preview tag is kept
|
129
144
|
"""
|
130
145
|
if not repo or not isinstance(repo, str) or "/" not in repo: # type: ignore
|
131
146
|
return []
|
132
147
|
try:
|
133
148
|
gh_repo = GH_CLIENT.get_repo(repo)
|
149
|
+
except BadCredentialsException as e:
|
150
|
+
log.error(f"Github authentication error - {e}")
|
151
|
+
return []
|
134
152
|
except ConnectionError as e:
|
135
153
|
# TODO: unable to capture the exeption
|
136
154
|
log.warning(f"Unable to get tags - {e}")
|
@@ -138,7 +156,9 @@ def get_tags(repo: str, minver: Optional[str] = None) -> List[str]:
|
|
138
156
|
tags = [tag.name for tag in gh_repo.get_tags()]
|
139
157
|
if minver:
|
140
158
|
tags = [tag for tag in tags if parse(tag) >= parse(minver)]
|
141
|
-
|
159
|
+
# remove all but the last preview
|
160
|
+
tags = [t for t in sorted(tags[:-1]) if "-preview" not in t] + sorted(tags)[-1:]
|
161
|
+
return tags
|
142
162
|
|
143
163
|
|
144
164
|
def checkout_tag(tag: str, repo: Optional[Union[str, Path]] = None) -> bool:
|
@@ -30,11 +30,8 @@ PORT_FWTYPES = {
|
|
30
30
|
|
31
31
|
# Token with no permissions to avoid throttling
|
32
32
|
# https://docs.github.com/en/rest/using-the-rest-api/rate-limits-for-the-rest-api?apiVersion=2022-11-28#getting-a-higher-rate-limit
|
33
|
-
PAT_NO_ACCESS =
|
34
|
-
|
35
|
-
+ "_11AAHPVFQ0qAkDnSUaMKSp"
|
36
|
-
+ "_ZkDl5NRRwBsUN6EYg9ahp1Dvj4FDDONnXVgimxC2EtpY7Q7BUKBoQ0Jq72X"
|
37
|
-
)
|
33
|
+
PAT_NO_ACCESS = "github_pat_"+"11AAHPVFQ0G4NTaQ73Bw5J"+"_fAp7K9sZ1qL8VFnI9g78eUlCdmOXHB3WzSdj2jtEYb4XF3N7PDJBl32qIxq"
|
34
|
+
|
38
35
|
PAT = os.environ.get("GITHUB_TOKEN") or PAT_NO_ACCESS
|
39
36
|
GH_CLIENT = Github(auth=Auth.Token(PAT))
|
40
37
|
|
{micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/mpflash/mpboard_id/store.py
RENAMED
@@ -1,18 +1,18 @@
|
|
1
1
|
import functools
|
2
2
|
import zipfile
|
3
3
|
from pathlib import Path
|
4
|
-
from typing import List, Optional
|
4
|
+
from typing import Final, List, Optional
|
5
5
|
|
6
6
|
import jsons
|
7
7
|
|
8
8
|
from mpflash.mpboard_id.board import Board
|
9
9
|
|
10
10
|
###############################################################################################
|
11
|
-
HERE = Path(__file__).parent
|
11
|
+
HERE: Final = Path(__file__).parent
|
12
12
|
###############################################################################################
|
13
13
|
|
14
14
|
|
15
|
-
def write_boardinfo_json(board_list: List[Board], *, folder: Path):
|
15
|
+
def write_boardinfo_json(board_list: List[Board], *, folder: Optional[Path] = None):
|
16
16
|
"""Writes the board information to a JSON file.
|
17
17
|
|
18
18
|
Args:
|
@@ -21,6 +21,8 @@ def write_boardinfo_json(board_list: List[Board], *, folder: Path):
|
|
21
21
|
"""
|
22
22
|
import zipfile
|
23
23
|
|
24
|
+
if not folder:
|
25
|
+
folder = HERE
|
24
26
|
# create a zip file with the json file
|
25
27
|
with zipfile.ZipFile(folder / "board_info.zip", "w", compression=zipfile.ZIP_DEFLATED) as zipf:
|
26
28
|
# write the list to json file inside the zip
|
@@ -30,6 +32,9 @@ def write_boardinfo_json(board_list: List[Board], *, folder: Path):
|
|
30
32
|
|
31
33
|
@functools.lru_cache(maxsize=20)
|
32
34
|
def read_known_boardinfo(board_info: Optional[Path] = None) -> List[Board]:
|
35
|
+
"""Reads the board information from a JSON file in a zip file."""
|
36
|
+
|
37
|
+
import zipfile
|
33
38
|
|
34
39
|
if not board_info:
|
35
40
|
board_info = HERE / "board_info.zip"
|
@@ -36,7 +36,9 @@ def _info(): # type:() -> dict[str, str]
|
|
36
36
|
"version": "",
|
37
37
|
"build": "",
|
38
38
|
"ver": "",
|
39
|
-
"port":
|
39
|
+
"port": (
|
40
|
+
"stm32" if sys.platform.startswith("pyb") else sys.platform
|
41
|
+
), # port: esp32 / win32 / linux / stm32
|
40
42
|
"board": "GENERIC",
|
41
43
|
"cpu": "",
|
42
44
|
"mpy": "",
|
@@ -48,7 +50,11 @@ def _info(): # type:() -> dict[str, str]
|
|
48
50
|
except AttributeError:
|
49
51
|
pass
|
50
52
|
try:
|
51
|
-
machine =
|
53
|
+
machine = (
|
54
|
+
sys.implementation._machine
|
55
|
+
if "_machine" in dir(sys.implementation)
|
56
|
+
else os.uname().machine
|
57
|
+
)
|
52
58
|
info["board"] = machine.strip()
|
53
59
|
info["cpu"] = machine.split("with")[-1].strip() if "with" in machine else ""
|
54
60
|
info["mpy"] = (
|
@@ -100,7 +106,8 @@ def _info(): # type:() -> dict[str, str]
|
|
100
106
|
if (
|
101
107
|
info["version"]
|
102
108
|
and info["version"].endswith(".0")
|
103
|
-
and info["version"]
|
109
|
+
and info["version"]
|
110
|
+
>= "1.10.0" # versions from 1.10.0 to 1.20.0 do not have a micro .0
|
104
111
|
and info["version"] <= "1.19.9"
|
105
112
|
):
|
106
113
|
# drop the .0 for newer releases
|
@@ -110,19 +117,23 @@ def _info(): # type:() -> dict[str, str]
|
|
110
117
|
if "mpy" in info and info["mpy"]: # mpy on some v1.11+ builds
|
111
118
|
sys_mpy = int(info["mpy"])
|
112
119
|
# .mpy architecture
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
120
|
+
try:
|
121
|
+
arch = [
|
122
|
+
None,
|
123
|
+
"x86",
|
124
|
+
"x64",
|
125
|
+
"armv6",
|
126
|
+
"armv6m",
|
127
|
+
"armv7m",
|
128
|
+
"armv7em",
|
129
|
+
"armv7emsp",
|
130
|
+
"armv7emdp",
|
131
|
+
"xtensa",
|
132
|
+
"xtensawin",
|
133
|
+
"hazard3riscv", # assumed
|
134
|
+
][sys_mpy >> 10]
|
135
|
+
except IndexError:
|
136
|
+
arch = "unknown"
|
126
137
|
if arch:
|
127
138
|
info["arch"] = arch
|
128
139
|
# .mpy version.minor
|