micropython-stubber 1.16.0__tar.gz → 1.16.2__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 (113) hide show
  1. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/PKG-INFO +2 -1
  2. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/pyproject.toml +3 -2
  3. micropython_stubber-1.16.2/src/stubber/__init__.py +4 -0
  4. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/src/stubber/board/createstubs.py +14 -4
  5. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/src/stubber/board/createstubs_db.py +10 -3
  6. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/src/stubber/board/createstubs_db_min.py +24 -21
  7. micropython_stubber-1.16.2/src/stubber/board/createstubs_db_mpy.mpy +0 -0
  8. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/src/stubber/board/createstubs_lvgl.py +10 -3
  9. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/src/stubber/board/createstubs_lvgl_min.py +51 -48
  10. micropython_stubber-1.16.2/src/stubber/board/createstubs_lvgl_mpy.mpy +0 -0
  11. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/src/stubber/board/createstubs_mem.py +10 -3
  12. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/src/stubber/board/createstubs_mem_min.py +24 -21
  13. micropython_stubber-1.16.2/src/stubber/board/createstubs_mem_mpy.mpy +0 -0
  14. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/src/stubber/board/createstubs_min.py +52 -49
  15. micropython_stubber-1.16.2/src/stubber/board/createstubs_mpy.mpy +0 -0
  16. micropython_stubber-1.16.2/src/stubber/board/info.py +183 -0
  17. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/src/stubber/board/modulelist.txt +5 -0
  18. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/src/stubber/publish/defaults.py +1 -0
  19. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/src/stubber/publish/merge_docstubs.py +1 -1
  20. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/src/stubber/rst/lookup.py +1 -1
  21. micropython_stubber-1.16.0/src/stubber/__init__.py +0 -4
  22. micropython_stubber-1.16.0/src/stubber/board/createstubs_db_mpy.mpy +0 -0
  23. micropython_stubber-1.16.0/src/stubber/board/createstubs_lvgl_mpy.mpy +0 -0
  24. micropython_stubber-1.16.0/src/stubber/board/createstubs_mem_mpy.mpy +0 -0
  25. micropython_stubber-1.16.0/src/stubber/board/createstubs_mpy.mpy +0 -0
  26. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/LICENSE +0 -0
  27. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/readme.md +0 -0
  28. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/src/stubber/basicgit.py +0 -0
  29. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/src/stubber/board/board_info.csv +0 -0
  30. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/src/stubber/board/boot.py +0 -0
  31. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/src/stubber/board/logging.py +0 -0
  32. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/src/stubber/board/main.py +0 -0
  33. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/src/stubber/board/pyrightconfig.json +0 -0
  34. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/src/stubber/codemod/__init__.py +0 -0
  35. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/src/stubber/codemod/_partials/__init__.py +0 -0
  36. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/src/stubber/codemod/_partials/db_main.py +0 -0
  37. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/src/stubber/codemod/_partials/lvgl_main.py +0 -0
  38. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/src/stubber/codemod/_partials/modules_reader.py +0 -0
  39. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/src/stubber/codemod/add_comment.py +0 -0
  40. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/src/stubber/codemod/add_method.py +0 -0
  41. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/src/stubber/codemod/board.py +0 -0
  42. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/src/stubber/codemod/enrich.py +0 -0
  43. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/src/stubber/codemod/merge_docstub.py +0 -0
  44. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/src/stubber/codemod/modify_list.py +0 -0
  45. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/src/stubber/codemod/utils.py +0 -0
  46. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/src/stubber/commands/__init__.py +0 -0
  47. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/src/stubber/commands/build_cmd.py +0 -0
  48. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/src/stubber/commands/cli.py +0 -0
  49. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/src/stubber/commands/clone_cmd.py +0 -0
  50. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/src/stubber/commands/config_cmd.py +0 -0
  51. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/src/stubber/commands/enrich_folder_cmd.py +0 -0
  52. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/src/stubber/commands/get_core_cmd.py +0 -0
  53. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/src/stubber/commands/get_docstubs_cmd.py +0 -0
  54. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/src/stubber/commands/get_frozen_cmd.py +0 -0
  55. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/src/stubber/commands/get_lobo_cmd.py +0 -0
  56. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/src/stubber/commands/merge_cmd.py +0 -0
  57. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/src/stubber/commands/minify_cmd.py +0 -0
  58. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/src/stubber/commands/publish_cmd.py +0 -0
  59. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/src/stubber/commands/stub_cmd.py +0 -0
  60. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/src/stubber/commands/switch_cmd.py +0 -0
  61. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/src/stubber/commands/upd_fallback_cmd.py +0 -0
  62. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/src/stubber/commands/upd_module_list_cmd.py +0 -0
  63. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/src/stubber/commands/variants_cmd.py +0 -0
  64. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/src/stubber/cst_transformer.py +0 -0
  65. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/src/stubber/data/board_info.csv +0 -0
  66. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/src/stubber/data/board_info.json +0 -0
  67. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/src/stubber/data/micropython_tags.csv +0 -0
  68. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/src/stubber/data/requirements-core-micropython.txt +0 -0
  69. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/src/stubber/data/requirements-core-pycopy.txt +0 -0
  70. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/src/stubber/downloader.py +0 -0
  71. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/src/stubber/freeze/__init__.py +0 -0
  72. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/src/stubber/freeze/common.py +0 -0
  73. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/src/stubber/freeze/freeze_folder.py +0 -0
  74. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/src/stubber/freeze/freeze_manifest_2.py +0 -0
  75. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/src/stubber/freeze/get_frozen.py +0 -0
  76. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/src/stubber/get_cpython.py +0 -0
  77. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/src/stubber/get_lobo.py +0 -0
  78. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/src/stubber/minify.py +0 -0
  79. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/src/stubber/publish/__init__.py +0 -0
  80. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/src/stubber/publish/bump.py +0 -0
  81. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/src/stubber/publish/candidates.py +0 -0
  82. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/src/stubber/publish/database.py +0 -0
  83. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/src/stubber/publish/enums.py +0 -0
  84. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/src/stubber/publish/helpers.py +0 -0
  85. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/src/stubber/publish/missing_class_methods.py +0 -0
  86. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/src/stubber/publish/package.py +0 -0
  87. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/src/stubber/publish/pathnames.py +0 -0
  88. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/src/stubber/publish/publish.py +0 -0
  89. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/src/stubber/publish/pypi.py +0 -0
  90. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/src/stubber/publish/stubpackage.py +0 -0
  91. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/src/stubber/rst/__init__.py +0 -0
  92. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/src/stubber/rst/classsort.py +0 -0
  93. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/src/stubber/rst/output_dict.py +0 -0
  94. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/src/stubber/rst/reader.py +0 -0
  95. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/src/stubber/rst/report_return.py +0 -0
  96. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/src/stubber/rst/rst_utils.py +0 -0
  97. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/src/stubber/stubber.py +0 -0
  98. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/src/stubber/stubs_from_docs.py +0 -0
  99. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/src/stubber/tools/__init__.py +0 -0
  100. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/src/stubber/tools/manifestfile.py +0 -0
  101. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/src/stubber/tools/readme.md +0 -0
  102. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/src/stubber/update_fallback.py +0 -0
  103. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/src/stubber/update_module_list.py +0 -0
  104. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/src/stubber/utils/__init__.py +0 -0
  105. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/src/stubber/utils/config.py +0 -0
  106. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/src/stubber/utils/makeversionhdr.py +0 -0
  107. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/src/stubber/utils/manifest.py +0 -0
  108. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/src/stubber/utils/post.py +0 -0
  109. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/src/stubber/utils/repos.py +0 -0
  110. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/src/stubber/utils/stubmaker.py +0 -0
  111. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/src/stubber/utils/typed_config_toml.py +0 -0
  112. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/src/stubber/utils/versions.py +0 -0
  113. {micropython_stubber-1.16.0 → micropython_stubber-1.16.2}/src/stubber/variants.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: micropython-stubber
3
- Version: 1.16.0
3
+ Version: 1.16.2
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
@@ -28,6 +28,7 @@ Requires-Dist: importlib-metadata (>=1.0,<2.0) ; python_version < "3.8"
28
28
  Requires-Dist: libcst (>=1.1.0,<2.0.0)
29
29
  Requires-Dist: loguru (>=0.6,<0.8)
30
30
  Requires-Dist: mypy (==1.7.0)
31
+ Requires-Dist: mypy-gitlab-code-quality (>=1.1.0,<2.0.0)
31
32
  Requires-Dist: packaging (>=21.3,<24.0)
32
33
  Requires-Dist: pipx (>=1.1.0,<2.0.0)
33
34
  Requires-Dist: pygithub (>=2.1.1,<3.0.0)
@@ -8,7 +8,7 @@ repo-path = "./repos"
8
8
 
9
9
  [tool.poetry]
10
10
  name = "micropython-stubber"
11
- version = "1.16.0"
11
+ version = "1.16.2"
12
12
  description = "Tooling to create and maintain stubs for MicroPython"
13
13
  authors = ["Jos Verlinde <jos_verlinde@hotmail.com>"]
14
14
  license = "MIT"
@@ -70,6 +70,7 @@ tomli-w = "^1.0.0"
70
70
  typed-config = "^1.3.0"
71
71
  pyserial = "^3.5"
72
72
  executing = "^2.0.1"
73
+ mypy-gitlab-code-quality = "^1.1.0"
73
74
 
74
75
  [tool.poetry.extras]
75
76
  tools = ["esptool"]
@@ -87,7 +88,7 @@ sphinxcontrib-mermaid = ">=0.9.2"
87
88
  [tool.poetry.group.dev]
88
89
  optional = true
89
90
  [tool.poetry.group.dev.dependencies]
90
- coverage = "^6.4.3"
91
+ coverage = ">=6.4.3,<8.0.0"
91
92
  distro = "^1.8.0"
92
93
  mock = "^4.0.3"
93
94
  pydeps = "^1.10.22"
@@ -0,0 +1,4 @@
1
+ """get the version"""
2
+
3
+
4
+ __version__ = "1.16.2"
@@ -20,7 +20,7 @@ try:
20
20
  except ImportError:
21
21
  from ucollections import OrderedDict # type: ignore
22
22
 
23
- __version__ = "v1.16.0"
23
+ __version__ = "v1.16.2"
24
24
  ENOENT = 2
25
25
  _MAX_CLASS_LEVEL = 2 # Max class nesting
26
26
  LIBS = [".", "/lib", "/sd/lib", "/flash/lib", "lib"]
@@ -455,15 +455,20 @@ def _info(): # type:() -> dict[str, str]
455
455
  "version": "",
456
456
  "build": "",
457
457
  "ver": "",
458
- "port": "stm32"
459
- if sys.platform.startswith("pyb")
460
- else sys.platform, # port: esp32 / win32 / linux / stm32
458
+ "port": sys.platform, # port: esp32 / win32 / linux / stm32
461
459
  "board": "GENERIC",
462
460
  "cpu": "",
463
461
  "mpy": "",
464
462
  "arch": "",
465
463
  }
466
464
  )
465
+ # change port names to be consistent with the repo
466
+ if info["port"].startswith("pyb"):
467
+ info["port"] = "stm32"
468
+ elif info["port"] == "win32":
469
+ info["port"] = "windows"
470
+ elif info["port"] == "linux":
471
+ info["port"] = "unix"
467
472
  try:
468
473
  info["version"] = ".".join([str(n) for n in sys.implementation.version])
469
474
  except AttributeError:
@@ -715,6 +720,7 @@ def main():
715
720
  "ak8963",
716
721
  "apa102",
717
722
  "apa106",
723
+ "argparse",
718
724
  "array",
719
725
  "asyncio/__init__",
720
726
  "asyncio/core",
@@ -763,6 +769,7 @@ def main():
763
769
  "esp32",
764
770
  "espidf",
765
771
  "espnow",
772
+ "ffi",
766
773
  "flashbdev",
767
774
  "framebuf",
768
775
  "freesans20",
@@ -799,6 +806,7 @@ def main():
799
806
  "micropython",
800
807
  "mip",
801
808
  "mip/__init__",
809
+ "mip/__main__",
802
810
  "motor",
803
811
  "mpu6500",
804
812
  "mpu9250",
@@ -826,6 +834,7 @@ def main():
826
834
  "queue",
827
835
  "random",
828
836
  "requests",
837
+ "requests/__init__",
829
838
  "rp2",
830
839
  "rtch",
831
840
  "samd",
@@ -838,6 +847,7 @@ def main():
838
847
  "stm",
839
848
  "struct",
840
849
  "sys",
850
+ "termios",
841
851
  "time",
842
852
  "tpcalib",
843
853
  "uarray",
@@ -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.15.2
21
+ This variant was generated from createstubs.py by micropython-stubber v1.16.2
22
22
  """
23
23
  # Copyright (c) 2019-2023 Jos Verlinde
24
24
 
@@ -39,7 +39,7 @@ try:
39
39
  except ImportError:
40
40
  from ucollections import OrderedDict # type: ignore
41
41
 
42
- __version__ = "v1.16.0"
42
+ __version__ = "v1.16.2"
43
43
  ENOENT = 2
44
44
  _MAX_CLASS_LEVEL = 2 # Max class nesting
45
45
  LIBS = [".", "/lib", "/sd/lib", "/flash/lib", "lib"]
@@ -448,13 +448,20 @@ def _info(): # type:() -> dict[str, str]
448
448
  "version": "",
449
449
  "build": "",
450
450
  "ver": "",
451
- "port": "stm32" if sys.platform.startswith("pyb") else sys.platform, # port: esp32 / win32 / linux / stm32
451
+ "port": sys.platform, # port: esp32 / win32 / linux / stm32
452
452
  "board": "GENERIC",
453
453
  "cpu": "",
454
454
  "mpy": "",
455
455
  "arch": "",
456
456
  }
457
457
  )
458
+ # change port names to be consistent with the repo
459
+ if info["port"].startswith("pyb"):
460
+ info["port"] = "stm32"
461
+ elif info["port"] == "win32":
462
+ info["port"] = "windows"
463
+ elif info["port"] == "linux":
464
+ info["port"] = "unix"
458
465
  try:
459
466
  info["version"] = ".".join([str(n) for n in sys.implementation.version])
460
467
  except AttributeError:
@@ -42,7 +42,7 @@ try:from machine import reset
42
42
  except P:pass
43
43
  try:from collections import OrderedDict as d
44
44
  except P:from ucollections import OrderedDict as d
45
- __version__='v1.16.0'
45
+ __version__='v1.16.2'
46
46
  w=2
47
47
  x=2
48
48
  e=[J,'/lib','/sd/lib','/flash/lib','lib']
@@ -190,20 +190,23 @@ def U(s):
190
190
  if A in s:s=s.split(A,1)[0]
191
191
  return s.split('-')[1]if'-'in s else C
192
192
  def _info():
193
- k='ev3-pybricks';j='pycom';i='pycopy';f='GENERIC';c='arch';b='cpu';a='ver';V='with';G='mpy';F='build';A=d({O:sys.implementation.name,D:C,F:C,a:C,'port':'stm32'if sys.platform.startswith('pyb')else sys.platform,K:f,b:C,G:C,c:C})
193
+ n='ev3-pybricks';m='pycom';l='pycopy';k='unix';j='win32';i='GENERIC';f='arch';c='cpu';b='ver';Y='with';I='mpy';G='port';F='build';A=d({O:sys.implementation.name,D:C,F:C,b:C,G:sys.platform,K:i,c:C,I:C,f:C})
194
+ if A[G].startswith('pyb'):A[G]='stm32'
195
+ elif A[G]==j:A[G]='windows'
196
+ elif A[G]=='linux':A[G]=k
194
197
  try:A[D]=J.join([W(A)for A in sys.implementation.version])
195
198
  except H:pass
196
- try:Y=sys.implementation._machine if'_machine'in Q(sys.implementation)else os.uname().machine;A[K]=Y.strip();A[b]=Y.split(V)[1].strip();A[G]=sys.implementation._mpy if'_mpy'in Q(sys.implementation)else sys.implementation.mpy if G in Q(sys.implementation)else C
199
+ try:Z=sys.implementation._machine if'_machine'in Q(sys.implementation)else os.uname().machine;A[K]=Z.strip();A[c]=Z.split(Y)[1].strip();A[I]=sys.implementation._mpy if'_mpy'in Q(sys.implementation)else sys.implementation.mpy if I in Q(sys.implementation)else C
197
200
  except(H,R):pass
198
201
  B.collect()
199
- for M in[A+'/board_info.csv'for A in e]:
200
- if h(M):
201
- I=A[K].strip()
202
- if g(A,I,M):break
203
- if V in I:
204
- I=I.split(V)[0].strip()
205
- if g(A,I,M):break
206
- A[K]=f
202
+ for N in[A+'/board_info.csv'for A in e]:
203
+ if h(N):
204
+ M=A[K].strip()
205
+ if g(A,M,N):break
206
+ if Y in M:
207
+ M=M.split(Y)[0].strip()
208
+ if g(A,M,N):break
209
+ A[K]=i
207
210
  A[K]=A[K].replace(' ',T);B.collect()
208
211
  try:
209
212
  A[F]=U(os.uname()[3])
@@ -211,20 +214,20 @@ def _info():
211
214
  if not A[F]and';'in sys.version:A[F]=U(sys.version.split(';')[1])
212
215
  except(H,R):pass
213
216
  if A[F]and L(A[F])>5:A[F]=C
214
- if A[D]==C and sys.platform not in('unix','win32'):
215
- try:l=os.uname();A[D]=l.release
217
+ if A[D]==C and sys.platform not in(k,j):
218
+ try:o=os.uname();A[D]=o.release
216
219
  except(R,H,TypeError):pass
217
- for(m,n,o)in[(i,i,'const'),(j,j,'FAT'),(k,'pybricks.hubs','EV3Brick')]:
218
- try:p=__import__(n,E,E,o);A[O]=m;del p;break
220
+ for(p,q,r)in[(l,l,'const'),(m,m,'FAT'),(n,'pybricks.hubs','EV3Brick')]:
221
+ try:s=__import__(q,E,E,r);A[O]=p;del s;break
219
222
  except(P,S):pass
220
- if A[O]==k:A['release']='2.0.0'
223
+ if A[O]==n:A['release']='2.0.0'
221
224
  if A[O]==X:
222
225
  if A[D]and A[D].endswith('.0')and A[D]>='1.10.0'and A[D]<='1.19.9':A[D]=A[D][:-2]
223
- if G in A and A[G]:
224
- N=int(A[G]);Z=[E,'x86','x64','armv6','armv6m','armv7m','armv7em','armv7emsp','armv7emdp','xtensa','xtensawin'][N>>10]
225
- if Z:A[c]=Z
226
- A[G]='v{}.{}'.format(N&255,N>>8&3)
227
- A[a]=f"v{A[D]}-{A[F]}"if A[F]else f"v{A[D]}";return A
226
+ if I in A and A[I]:
227
+ V=int(A[I]);a=[E,'x86','x64','armv6','armv6m','armv7m','armv7em','armv7emsp','armv7emdp','xtensa','xtensawin'][V>>10]
228
+ if a:A[f]=a
229
+ A[I]='v{}.{}'.format(V&255,V>>8&3)
230
+ A[b]=f"v{A[D]}-{A[F]}"if A[F]else f"v{A[D]}";return A
228
231
  def g(info,board_descr,filename):
229
232
  with I(filename,'r')as B:
230
233
  while 1:
@@ -3,7 +3,7 @@ Create stubs for the lvgl modules on a MicroPython board.
3
3
 
4
4
  Note that the stubs can be very large, and it may be best to directly store them on an SD card if your device supports this.
5
5
 
6
- This variant was generated from createstubs.py by micropython-stubber v1.15.2
6
+ This variant was generated from createstubs.py by micropython-stubber v1.16.2
7
7
  """
8
8
  # Copyright (c) 2019-2023 Jos Verlinde
9
9
 
@@ -24,7 +24,7 @@ try:
24
24
  except ImportError:
25
25
  from ucollections import OrderedDict # type: ignore
26
26
 
27
- __version__ = "v1.15.2a0"
27
+ __version__ = "v1.16.2"
28
28
  ENOENT = 2
29
29
  _MAX_CLASS_LEVEL = 2 # Max class nesting
30
30
  LIBS = [".", "/lib", "/sd/lib", "/flash/lib", "lib"]
@@ -433,13 +433,20 @@ def _info(): # type:() -> dict[str, str]
433
433
  "version": "",
434
434
  "build": "",
435
435
  "ver": "",
436
- "port": "stm32" if sys.platform.startswith("pyb") else sys.platform, # port: esp32 / win32 / linux / stm32
436
+ "port": sys.platform, # port: esp32 / win32 / linux / stm32
437
437
  "board": "GENERIC",
438
438
  "cpu": "",
439
439
  "mpy": "",
440
440
  "arch": "",
441
441
  }
442
442
  )
443
+ # change port names to be consistent with the repo
444
+ if info["port"].startswith("pyb"):
445
+ info["port"] = "stm32"
446
+ elif info["port"] == "win32":
447
+ info["port"] = "windows"
448
+ elif info["port"] == "linux":
449
+ info["port"] = "unix"
443
450
  try:
444
451
  info["version"] = ".".join([str(n) for n in sys.implementation.version])
445
452
  except AttributeError:
@@ -22,10 +22,10 @@ R=len
22
22
  Q=KeyError
23
23
  P=IndexError
24
24
  O=dir
25
- N=print
26
- M=ImportError
27
- L=True
28
- K='family'
25
+ M=print
26
+ N=ImportError
27
+ K=True
28
+ L='family'
29
29
  J='board'
30
30
  I='.'
31
31
  H=AttributeError
@@ -38,10 +38,10 @@ B=''
38
38
  import gc as C,os,sys
39
39
  from ujson import dumps as a
40
40
  try:from machine import reset
41
- except M:pass
41
+ except N:pass
42
42
  try:from collections import OrderedDict as b
43
- except M:from ucollections import OrderedDict as b
44
- __version__='v1.15.2a0'
43
+ except N:from ucollections import OrderedDict as b
44
+ __version__='v1.16.2'
45
45
  u=2
46
46
  v=2
47
47
  w=[I,'/lib','/sd/lib','/flash/lib','lib']
@@ -54,7 +54,7 @@ class Stubber:
54
54
  except H:pass
55
55
  A._report=[];A.info=_info();C.collect()
56
56
  if B:A._fwid=B.lower()
57
- elif A.info[K]==l:A._fwid='{family}-{ver}-{port}-{board}'.format(**A.info)
57
+ elif A.info[L]==l:A._fwid='{family}-{ver}-{port}-{board}'.format(**A.info)
58
58
  else:A._fwid='{family}-{ver}-{port}'.format(**A.info)
59
59
  A._start_free=C.mem_free()
60
60
  if path:
@@ -62,7 +62,7 @@ class Stubber:
62
62
  else:path=get_root()
63
63
  A.path='{}/stubs/{}'.format(path,A.flat_fwid).replace('//',G)
64
64
  try:c(path+G)
65
- except F:N('error creating stub folder {}'.format(path))
65
+ except F:M('error creating stub folder {}'.format(path))
66
66
  A.problematic=['upip','upysh','webrepl_setup','http_client','http_client_ssl','http_server','http_server_ssl'];A.excluded=['webrepl','_webrepl','port_diag','example_sub_led.py','example_pub_button.py'];A.modules=[]
67
67
  def get_obj_attributes(L,item_instance):
68
68
  I=item_instance;D=[];J=[]
@@ -97,29 +97,29 @@ class Stubber:
97
97
  if H is E:O=D.replace(I,S)+'.py';H=J.path+G+O
98
98
  else:O=H.split(G)[-1]
99
99
  if G in D:D=D.replace(G,I)
100
- K=E
101
- try:K=__import__(D,E,E,'*');T=C.mem_free()
102
- except M:return A
100
+ L=E
101
+ try:L=__import__(D,E,E,'*');T=C.mem_free()
102
+ except N:return A
103
103
  c(H)
104
- with V(H,'w')as N:P=str(J.info).replace('OrderedDict(',B).replace('})','}');R='"""\nModule: \'{0}\' on {1}\n"""\n# MCU: {2}\n# Stubber: {3}\n'.format(D,J._fwid,P,__version__);N.write(R);N.write('from typing import Any\nfrom _typeshed import Incomplete\n\n');J.write_object_stub(N,K,D,B)
104
+ with V(H,'w')as M:P=str(J.info).replace('OrderedDict(',B).replace('})','}');R='"""\nModule: \'{0}\' on {1}\n"""\n# MCU: {2}\n# Stubber: {3}\n'.format(D,J._fwid,P,__version__);M.write(R);M.write('from typing import Any\nfrom _typeshed import Incomplete\n\n');J.write_object_stub(M,L,D,B)
105
105
  J._report.append('{{"module": "{}", "file": "{}"}}'.format(D,H.replace('\\',G)))
106
106
  if D not in{'os','sys','logging','gc'}:
107
- try:del K
107
+ try:del L
108
108
  except(F,Q):pass
109
109
  try:del sys.modules[D]
110
110
  except Q:pass
111
- C.collect();return L
111
+ C.collect();return K
112
112
  def write_object_stub(K,fp,object_expr,obj_name,indent,in_class=0):
113
- d='{0}{1} = {2} # type: {3}\n';c='bound_method';b='Incomplete';P=in_class;O=object_expr;M='Exception';H=fp;D=indent;C.collect()
113
+ d='{0}{1} = {2} # type: {3}\n';c='bound_method';b='Incomplete';P=in_class;O=object_expr;N='Exception';H=fp;D=indent;C.collect()
114
114
  if O in K.problematic:return
115
115
  S,L=K.get_obj_attributes(O)
116
- if L:N(L)
116
+ if L:M(L)
117
117
  for(E,J,G,T,f)in S:
118
- if E in['classmethod','staticmethod','BaseException',M]:continue
118
+ if E in['classmethod','staticmethod','BaseException',N]:continue
119
119
  if E[0].isdigit():continue
120
120
  if G=="<class 'type'>"and R(D)<=v*4:
121
- U=B;V=E.endswith(M)or E.endswith('Error')or E in['KeyboardInterrupt','StopIteration','SystemExit']
122
- if V:U=M
121
+ U=B;V=E.endswith(N)or E.endswith('Error')or E in['KeyboardInterrupt','StopIteration','SystemExit']
122
+ if V:U=N
123
123
  A='\n{}class {}({}):\n'.format(D,E,U)
124
124
  if V:A+=D+' ...\n';H.write(A);return
125
125
  H.write(A);K.write_object_stub(H,T,'{0}.{1}'.format(obj_name,E),D+' ',P+1);A=D+' def __init__(self, *argv, **kwargs) -> None:\n';A+=D+' ...\n\n';H.write(A)
@@ -161,11 +161,11 @@ class Stubber:
161
161
  G=s.format(B.path,filename);C.collect()
162
162
  try:
163
163
  with V(G,'w')as D:
164
- B.write_json_header(D);E=L
164
+ B.write_json_header(D);E=K
165
165
  for H in B._report:B.write_json_node(D,H,E);E=A
166
166
  B.write_json_end(D)
167
167
  I=B._start_free-C.mem_free()
168
- except F:N('Failed to create the report.')
168
+ except F:M('Failed to create the report.')
169
169
  def write_json_header(B,f):A='firmware';f.write('{');f.write(a({A:B.info})[1:-1]);f.write(Z);f.write(a({t:{D:__version__},'stubtype':A})[1:-1]);f.write(Z);f.write('"modules" :[\n')
170
170
  def write_json_node(A,f,n,first):
171
171
  if not first:f.write(Z)
@@ -181,7 +181,7 @@ def c(path):
181
181
  except F as D:
182
182
  if D.args[0]==u:
183
183
  try:os.mkdir(B)
184
- except F as E:N('failed to create folder {}'.format(B));raise E
184
+ except F as E:M('failed to create folder {}'.format(B));raise E
185
185
  C=A+1
186
186
  def T(s):
187
187
  A=' on '
@@ -189,20 +189,23 @@ def T(s):
189
189
  if A in s:s=s.split(A,1)[0]
190
190
  return s.split('-')[1]if'-'in s else B
191
191
  def _info():
192
- h='ev3-pybricks';g='pycom';f='pycopy';c='GENERIC';a='arch';Z='cpu';Y='ver';V='with';G='mpy';F='build';A=b({K:sys.implementation.name,D:B,F:B,Y:B,'port':'stm32'if sys.platform.startswith('pyb')else sys.platform,J:c,Z:B,G:B,a:B})
192
+ k='ev3-pybricks';j='pycom';i='pycopy';h='unix';g='win32';f='GENERIC';c='arch';a='cpu';Z='ver';W='with';K='mpy';G='port';F='build';A=b({L:sys.implementation.name,D:B,F:B,Z:B,G:sys.platform,J:f,a:B,K:B,c:B})
193
+ if A[G].startswith('pyb'):A[G]='stm32'
194
+ elif A[G]==g:A[G]='windows'
195
+ elif A[G]=='linux':A[G]=h
193
196
  try:A[D]=I.join([str(A)for A in sys.implementation.version])
194
197
  except H:pass
195
- try:W=sys.implementation._machine if'_machine'in O(sys.implementation)else os.uname().machine;A[J]=W.strip();A[Z]=W.split(V)[1].strip();A[G]=sys.implementation._mpy if'_mpy'in O(sys.implementation)else sys.implementation.mpy if G in O(sys.implementation)else B
198
+ try:X=sys.implementation._machine if'_machine'in O(sys.implementation)else os.uname().machine;A[J]=X.strip();A[a]=X.split(W)[1].strip();A[K]=sys.implementation._mpy if'_mpy'in O(sys.implementation)else sys.implementation.mpy if K in O(sys.implementation)else B
196
199
  except(H,P):pass
197
200
  C.collect()
198
- for N in[A+'/board_info.csv'for A in w]:
199
- if e(N):
200
- L=A[J].strip()
201
- if d(A,L,N):break
202
- if V in L:
203
- L=L.split(V)[0].strip()
204
- if d(A,L,N):break
205
- A[J]=c
201
+ for U in[A+'/board_info.csv'for A in w]:
202
+ if e(U):
203
+ M=A[J].strip()
204
+ if d(A,M,U):break
205
+ if W in M:
206
+ M=M.split(W)[0].strip()
207
+ if d(A,M,U):break
208
+ A[J]=f
206
209
  A[J]=A[J].replace(' ',S);C.collect()
207
210
  try:
208
211
  A[F]=T(os.uname()[3])
@@ -210,27 +213,27 @@ def _info():
210
213
  if not A[F]and';'in sys.version:A[F]=T(sys.version.split(';')[1])
211
214
  except(H,P):pass
212
215
  if A[F]and R(A[F])>5:A[F]=B
213
- if A[D]==B and sys.platform not in('unix','win32'):
214
- try:i=os.uname();A[D]=i.release
216
+ if A[D]==B and sys.platform not in(h,g):
217
+ try:m=os.uname();A[D]=m.release
215
218
  except(P,H,TypeError):pass
216
- for(j,k,m)in[(f,f,'const'),(g,g,'FAT'),(h,'pybricks.hubs','EV3Brick')]:
217
- try:n=__import__(k,E,E,m);A[K]=j;del n;break
218
- except(M,Q):pass
219
- if A[K]==h:A['release']='2.0.0'
220
- if A[K]==l:
219
+ for(n,o,p)in[(i,i,'const'),(j,j,'FAT'),(k,'pybricks.hubs','EV3Brick')]:
220
+ try:q=__import__(o,E,E,p);A[L]=n;del q;break
221
+ except(N,Q):pass
222
+ if A[L]==k:A['release']='2.0.0'
223
+ if A[L]==l:
221
224
  if A[D]and A[D].endswith('.0')and A[D]>='1.10.0'and A[D]<='1.19.9':A[D]=A[D][:-2]
222
- if G in A and A[G]:
223
- U=int(A[G]);X=[E,'x86','x64','armv6','armv6m','armv7m','armv7em','armv7emsp','armv7emdp','xtensa','xtensawin'][U>>10]
224
- if X:A[a]=X
225
- A[G]='v{}.{}'.format(U&255,U>>8&3)
226
- A[Y]=f"v{A[D]}-{A[F]}"if A[F]else f"v{A[D]}";return A
225
+ if K in A and A[K]:
226
+ V=int(A[K]);Y=[E,'x86','x64','armv6','armv6m','armv7m','armv7em','armv7emsp','armv7emdp','xtensa','xtensawin'][V>>10]
227
+ if Y:A[c]=Y
228
+ A[K]='v{}.{}'.format(V&255,V>>8&3)
229
+ A[Z]=f"v{A[D]}-{A[F]}"if A[F]else f"v{A[D]}";return A
227
230
  def d(info,board_descr,filename):
228
231
  with V(filename,'r')as C:
229
232
  while 1:
230
233
  B=C.readline()
231
234
  if not B:break
232
235
  D,E=B.split(',')[0].strip(),B.split(',')[1].strip()
233
- if D==board_descr:info[J]=E;return L
236
+ if D==board_descr:info[J]=E;return K
234
237
  return A
235
238
  def get_root():
236
239
  try:A=os.getcwd()
@@ -242,7 +245,7 @@ def get_root():
242
245
  return B
243
246
  def e(filename):
244
247
  try:
245
- if os.stat(filename)[0]>>14:return L
248
+ if os.stat(filename)[0]>>14:return K
246
249
  return A
247
250
  except F:return A
248
251
  def f():sys.exit(1)
@@ -256,7 +259,7 @@ def read_path():
256
259
  return path
257
260
  def g():
258
261
  try:B=bytes('abc',encoding='utf8');C=g.__module__;return A
259
- except(h,H):return L
262
+ except(h,H):return K
260
263
  def main():
261
264
  D='lvgl'
262
265
  try:import lvgl as A
@@ -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.15.2
12
+ This variant was generated from createstubs.py by micropython-stubber v1.16.2
13
13
  """
14
14
  # Copyright (c) 2019-2023 Jos Verlinde
15
15
 
@@ -30,7 +30,7 @@ try:
30
30
  except ImportError:
31
31
  from ucollections import OrderedDict # type: ignore
32
32
 
33
- __version__ = "v1.16.0"
33
+ __version__ = "v1.16.2"
34
34
  ENOENT = 2
35
35
  _MAX_CLASS_LEVEL = 2 # Max class nesting
36
36
  LIBS = [".", "/lib", "/sd/lib", "/flash/lib", "lib"]
@@ -439,13 +439,20 @@ def _info(): # type:() -> dict[str, str]
439
439
  "version": "",
440
440
  "build": "",
441
441
  "ver": "",
442
- "port": "stm32" if sys.platform.startswith("pyb") else sys.platform, # port: esp32 / win32 / linux / stm32
442
+ "port": sys.platform, # port: esp32 / win32 / linux / stm32
443
443
  "board": "GENERIC",
444
444
  "cpu": "",
445
445
  "mpy": "",
446
446
  "arch": "",
447
447
  }
448
448
  )
449
+ # change port names to be consistent with the repo
450
+ if info["port"].startswith("pyb"):
451
+ info["port"] = "stm32"
452
+ elif info["port"] == "win32":
453
+ info["port"] = "windows"
454
+ elif info["port"] == "linux":
455
+ info["port"] = "unix"
449
456
  try:
450
457
  info["version"] = ".".join([str(n) for n in sys.implementation.version])
451
458
  except AttributeError:
@@ -41,7 +41,7 @@ try:from machine import reset
41
41
  except O:pass
42
42
  try:from collections import OrderedDict as d
43
43
  except O:from ucollections import OrderedDict as d
44
- __version__='v1.16.0'
44
+ __version__='v1.16.2'
45
45
  v=2
46
46
  w=2
47
47
  e=[I,'/lib','/sd/lib','/flash/lib','lib']
@@ -189,20 +189,23 @@ def U(s):
189
189
  if A in s:s=s.split(A,1)[0]
190
190
  return s.split('-')[1]if'-'in s else C
191
191
  def _info():
192
- k='ev3-pybricks';j='pycom';i='pycopy';f='GENERIC';c='arch';b='cpu';a='ver';V='with';G='mpy';F='build';A=d({M:sys.implementation.name,D:C,F:C,a:C,'port':'stm32'if sys.platform.startswith('pyb')else sys.platform,J:f,b:C,G:C,c:C})
192
+ n='ev3-pybricks';m='pycom';l='pycopy';k='unix';j='win32';i='GENERIC';f='arch';c='cpu';b='ver';Y='with';K='mpy';G='port';F='build';A=d({M:sys.implementation.name,D:C,F:C,b:C,G:sys.platform,J:i,c:C,K:C,f:C})
193
+ if A[G].startswith('pyb'):A[G]='stm32'
194
+ elif A[G]==j:A[G]='windows'
195
+ elif A[G]=='linux':A[G]=k
193
196
  try:A[D]=I.join([W(A)for A in sys.implementation.version])
194
197
  except H:pass
195
- try:Y=sys.implementation._machine if'_machine'in P(sys.implementation)else os.uname().machine;A[J]=Y.strip();A[b]=Y.split(V)[1].strip();A[G]=sys.implementation._mpy if'_mpy'in P(sys.implementation)else sys.implementation.mpy if G in P(sys.implementation)else C
198
+ try:Z=sys.implementation._machine if'_machine'in P(sys.implementation)else os.uname().machine;A[J]=Z.strip();A[c]=Z.split(Y)[1].strip();A[K]=sys.implementation._mpy if'_mpy'in P(sys.implementation)else sys.implementation.mpy if K in P(sys.implementation)else C
196
199
  except(H,Q):pass
197
200
  B.collect()
198
- for N in[A+'/board_info.csv'for A in e]:
199
- if h(N):
200
- K=A[J].strip()
201
- if g(A,K,N):break
202
- if V in K:
203
- K=K.split(V)[0].strip()
204
- if g(A,K,N):break
205
- A[J]=f
201
+ for R in[A+'/board_info.csv'for A in e]:
202
+ if h(R):
203
+ N=A[J].strip()
204
+ if g(A,N,R):break
205
+ if Y in N:
206
+ N=N.split(Y)[0].strip()
207
+ if g(A,N,R):break
208
+ A[J]=i
206
209
  A[J]=A[J].replace(' ',T);B.collect()
207
210
  try:
208
211
  A[F]=U(os.uname()[3])
@@ -210,20 +213,20 @@ def _info():
210
213
  if not A[F]and';'in sys.version:A[F]=U(sys.version.split(';')[1])
211
214
  except(H,Q):pass
212
215
  if A[F]and L(A[F])>5:A[F]=C
213
- if A[D]==C and sys.platform not in('unix','win32'):
214
- try:l=os.uname();A[D]=l.release
216
+ if A[D]==C and sys.platform not in(k,j):
217
+ try:o=os.uname();A[D]=o.release
215
218
  except(Q,H,TypeError):pass
216
- for(m,n,o)in[(i,i,'const'),(j,j,'FAT'),(k,'pybricks.hubs','EV3Brick')]:
217
- try:p=__import__(n,E,E,o);A[M]=m;del p;break
219
+ for(p,q,r)in[(l,l,'const'),(m,m,'FAT'),(n,'pybricks.hubs','EV3Brick')]:
220
+ try:s=__import__(q,E,E,r);A[M]=p;del s;break
218
221
  except(O,S):pass
219
- if A[M]==k:A['release']='2.0.0'
222
+ if A[M]==n:A['release']='2.0.0'
220
223
  if A[M]==X:
221
224
  if A[D]and A[D].endswith('.0')and A[D]>='1.10.0'and A[D]<='1.19.9':A[D]=A[D][:-2]
222
- if G in A and A[G]:
223
- R=int(A[G]);Z=[E,'x86','x64','armv6','armv6m','armv7m','armv7em','armv7emsp','armv7emdp','xtensa','xtensawin'][R>>10]
224
- if Z:A[c]=Z
225
- A[G]='v{}.{}'.format(R&255,R>>8&3)
226
- A[a]=f"v{A[D]}-{A[F]}"if A[F]else f"v{A[D]}";return A
225
+ if K in A and A[K]:
226
+ V=int(A[K]);a=[E,'x86','x64','armv6','armv6m','armv7m','armv7em','armv7emsp','armv7emdp','xtensa','xtensawin'][V>>10]
227
+ if a:A[f]=a
228
+ A[K]='v{}.{}'.format(V&255,V>>8&3)
229
+ A[b]=f"v{A[D]}-{A[F]}"if A[F]else f"v{A[D]}";return A
227
230
  def g(info,board_descr,filename):
228
231
  with R(filename,'r')as C:
229
232
  while 1: