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.
Files changed (162) hide show
  1. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/PKG-INFO +3 -3
  2. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/pyproject.toml +3 -3
  3. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/mpflash/basicgit.py +27 -7
  4. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/mpflash/common.py +2 -5
  5. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/mpflash/mpboard_id/store.py +8 -3
  6. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/mpflash/mpremoteboard/mpy_fw_info.py +27 -16
  7. micropython_stubber-1.23.3/src/mpflash/poetry.lock +1687 -0
  8. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/pyproject.toml +1 -1
  9. micropython_stubber-1.23.3/src/stubber/__init__.py +3 -0
  10. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/board/createstubs.py +17 -35
  11. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/board/createstubs_db.py +7 -8
  12. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/board/createstubs_db_min.py +116 -117
  13. micropython_stubber-1.23.3/src/stubber/board/createstubs_db_mpy.mpy +0 -0
  14. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/board/createstubs_mem.py +7 -8
  15. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/board/createstubs_mem_min.py +104 -105
  16. micropython_stubber-1.23.3/src/stubber/board/createstubs_mem_mpy.mpy +0 -0
  17. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/board/createstubs_min.py +116 -117
  18. micropython_stubber-1.23.3/src/stubber/board/createstubs_mpy.mpy +0 -0
  19. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/codemod/enrich.py +0 -6
  20. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/publish/merge_docstubs.py +4 -8
  21. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/publish/stubpackage.py +4 -8
  22. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/rst/lookup.py +0 -2
  23. micropython_stubber-1.23.2/src/mpflash/poetry.lock +0 -1599
  24. micropython_stubber-1.23.2/src/stubber/__init__.py +0 -3
  25. micropython_stubber-1.23.2/src/stubber/board/createstubs_db_mpy.mpy +0 -0
  26. micropython_stubber-1.23.2/src/stubber/board/createstubs_mem_mpy.mpy +0 -0
  27. micropython_stubber-1.23.2/src/stubber/board/createstubs_mpy.mpy +0 -0
  28. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/LICENSE +0 -0
  29. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/readme.md +0 -0
  30. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/README.md +0 -0
  31. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/libusb_flash.ipynb +0 -0
  32. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/mpflash/__init__.py +0 -0
  33. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/mpflash/add_firmware.py +0 -0
  34. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/mpflash/ask_input.py +0 -0
  35. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/mpflash/bootloader/__init__.py +0 -0
  36. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/mpflash/bootloader/activate.py +0 -0
  37. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/mpflash/bootloader/detect.py +0 -0
  38. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/mpflash/bootloader/manual.py +0 -0
  39. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/mpflash/bootloader/micropython.py +0 -0
  40. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/mpflash/bootloader/touch1200.py +0 -0
  41. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/mpflash/cli_download.py +0 -0
  42. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/mpflash/cli_flash.py +0 -0
  43. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/mpflash/cli_group.py +0 -0
  44. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/mpflash/cli_list.py +0 -0
  45. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/mpflash/cli_main.py +0 -0
  46. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/mpflash/config.py +0 -0
  47. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/mpflash/connected.py +0 -0
  48. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/mpflash/download.py +0 -0
  49. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/mpflash/downloaded.py +0 -0
  50. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/mpflash/errors.py +0 -0
  51. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/mpflash/flash/__init__.py +0 -0
  52. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/mpflash/flash/esp.py +0 -0
  53. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/mpflash/flash/stm32.py +0 -0
  54. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/mpflash/flash/stm32_dfu.py +0 -0
  55. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/mpflash/flash/uf2/__init__.py +0 -0
  56. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/mpflash/flash/uf2/boardid.py +0 -0
  57. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/mpflash/flash/uf2/linux.py +0 -0
  58. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/mpflash/flash/uf2/macos.py +0 -0
  59. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/mpflash/flash/uf2/uf2disk.py +0 -0
  60. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/mpflash/flash/uf2/windows.py +0 -0
  61. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/mpflash/flash/worklist.py +0 -0
  62. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/mpflash/list.py +0 -0
  63. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/mpflash/logger.py +0 -0
  64. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/mpflash/mpboard_id/__init__.py +0 -0
  65. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/mpflash/mpboard_id/add_boards.py +0 -0
  66. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/mpflash/mpboard_id/board.py +0 -0
  67. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/mpflash/mpboard_id/board_id.py +0 -0
  68. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/mpflash/mpboard_id/board_info.zip +0 -0
  69. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/mpflash/mpremoteboard/__init__.py +0 -0
  70. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/mpflash/mpremoteboard/runner.py +0 -0
  71. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/mpflash/vendor/click_aliases.py +0 -0
  72. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/mpflash/vendor/dfu.py +0 -0
  73. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/mpflash/vendor/pydfu.py +0 -0
  74. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/mpflash/vendor/readme.md +0 -0
  75. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/mpflash/versions.py +0 -0
  76. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/mpflash/stm32_udev_rules.md +0 -0
  77. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/board/board_info.csv +0 -0
  78. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/board/boot.py +0 -0
  79. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/board/createstubs_lvgl.py +0 -0
  80. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/board/createstubs_lvgl_min.py +0 -0
  81. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/board/createstubs_lvgl_mpy.mpy +0 -0
  82. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/board/fw_info.py +0 -0
  83. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/board/info.py +0 -0
  84. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/board/main.py +0 -0
  85. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/board/modulelist.txt +0 -0
  86. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/board/pyrightconfig.json +0 -0
  87. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/bulk/mcu_stubber.py +0 -0
  88. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/codemod/__init__.py +0 -0
  89. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/codemod/_partials/__init__.py +0 -0
  90. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/codemod/_partials/db_main.py +0 -0
  91. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/codemod/_partials/lvgl_main.py +0 -0
  92. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/codemod/_partials/modules_reader.py +0 -0
  93. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/codemod/add_comment.py +0 -0
  94. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/codemod/add_method.py +0 -0
  95. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/codemod/board.py +0 -0
  96. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/codemod/merge_docstub.py +0 -0
  97. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/codemod/modify_list.py +0 -0
  98. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/codemod/utils.py +0 -0
  99. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/commands/__init__.py +0 -0
  100. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/commands/build_cmd.py +0 -0
  101. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/commands/cli.py +0 -0
  102. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/commands/clone_cmd.py +0 -0
  103. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/commands/config_cmd.py +0 -0
  104. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/commands/enrich_folder_cmd.py +0 -0
  105. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/commands/get_core_cmd.py +0 -0
  106. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/commands/get_docstubs_cmd.py +0 -0
  107. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/commands/get_frozen_cmd.py +0 -0
  108. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/commands/get_mcu_cmd.py +0 -0
  109. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/commands/merge_cmd.py +0 -0
  110. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/commands/publish_cmd.py +0 -0
  111. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/commands/stub_cmd.py +0 -0
  112. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/commands/switch_cmd.py +0 -0
  113. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/commands/variants_cmd.py +0 -0
  114. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/cst_transformer.py +0 -0
  115. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/data/board_info.csv +0 -0
  116. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/data/board_info.json +0 -0
  117. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/data/micropython_tags.csv +0 -0
  118. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/data/requirements-core-micropython.txt +0 -0
  119. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/data/requirements-core-pycopy.txt +0 -0
  120. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/downloader.py +0 -0
  121. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/freeze/__init__.py +0 -0
  122. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/freeze/common.py +0 -0
  123. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/freeze/freeze_folder.py +0 -0
  124. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/freeze/freeze_manifest_2.py +0 -0
  125. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/freeze/get_frozen.py +0 -0
  126. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/get_cpython.py +0 -0
  127. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/get_lobo.py +0 -0
  128. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/minify.py +0 -0
  129. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/publish/__init__.py +0 -0
  130. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/publish/bump.py +0 -0
  131. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/publish/candidates.py +0 -0
  132. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/publish/database.py +0 -0
  133. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/publish/defaults.py +0 -0
  134. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/publish/enums.py +0 -0
  135. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/publish/helpers.py +0 -0
  136. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/publish/missing_class_methods.py +0 -0
  137. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/publish/package.py +0 -0
  138. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/publish/pathnames.py +0 -0
  139. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/publish/publish.py +0 -0
  140. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/publish/pypi.py +0 -0
  141. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/rst/__init__.py +0 -0
  142. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/rst/classsort.py +0 -0
  143. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/rst/output_dict.py +0 -0
  144. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/rst/reader.py +0 -0
  145. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/rst/report_return.py +0 -0
  146. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/rst/rst_utils.py +0 -0
  147. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/stubber.py +0 -0
  148. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/stubs_from_docs.py +0 -0
  149. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/tools/__init__.py +0 -0
  150. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/tools/manifestfile.py +0 -0
  151. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/tools/readme.md +0 -0
  152. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/update_fallback.py +0 -0
  153. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/update_module_list.py +0 -0
  154. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/utils/__init__.py +0 -0
  155. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/utils/config.py +0 -0
  156. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/utils/makeversionhdr.py +0 -0
  157. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/utils/manifest.py +0 -0
  158. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/utils/post.py +0 -0
  159. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/utils/repos.py +0 -0
  160. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/utils/stubmaker.py +0 -0
  161. {micropython_stubber-1.23.2 → micropython_stubber-1.23.3}/src/stubber/utils/typed_config_toml.py +0 -0
  162. {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.2
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.2,<2.0.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.12"
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.2"
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.12" } # no support for 3.12 yet
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.2"
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 = "github_pat" + "_11AAHPVFQ0qAkDnSUaMKSp" + "_ZkDl5NRRwBsUN6EYg9ahp1Dvj4FDDONnXVgimxC2EtpY7Q7BUKBoQ0Jq72X"
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(cmd, capture_output=capture_output, check=True, cwd=repo.absolute().as_posix(), encoding="utf-8")
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(cmd, capture_output=capture_output, check=True, encoding="utf-8")
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(repo: Optional[Union[str, Path]] = None, abbreviate: bool = True) -> Union[str, None]:
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
- return sorted(tags)
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
- "github_pat"
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
 
@@ -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": "stm32" if sys.platform.startswith("pyb") else sys.platform, # port: esp32 / win32 / linux / stm32
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 = sys.implementation._machine if "_machine" in dir(sys.implementation) else os.uname().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"] >= "1.10.0" # versions from 1.10.0 to 1.20.0 do not have a micro .0
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
- arch = [
114
- None,
115
- "x86",
116
- "x64",
117
- "armv6",
118
- "armv6m",
119
- "armv7m",
120
- "armv7em",
121
- "armv7emsp",
122
- "armv7emdp",
123
- "xtensa",
124
- "xtensawin",
125
- ][sys_mpy >> 10]
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