micropython-stubber 1.16.1__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.
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/PKG-INFO +1 -1
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/pyproject.toml +2 -2
- micropython_stubber-1.16.2/src/stubber/__init__.py +4 -0
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/board/createstubs.py +14 -4
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/board/createstubs_db.py +10 -3
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/board/createstubs_db_min.py +24 -21
- micropython_stubber-1.16.2/src/stubber/board/createstubs_db_mpy.mpy +0 -0
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/board/createstubs_lvgl.py +10 -3
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/board/createstubs_lvgl_min.py +51 -48
- micropython_stubber-1.16.2/src/stubber/board/createstubs_lvgl_mpy.mpy +0 -0
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/board/createstubs_mem.py +10 -3
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/board/createstubs_mem_min.py +24 -21
- micropython_stubber-1.16.2/src/stubber/board/createstubs_mem_mpy.mpy +0 -0
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/board/createstubs_min.py +52 -49
- micropython_stubber-1.16.2/src/stubber/board/createstubs_mpy.mpy +0 -0
- micropython_stubber-1.16.2/src/stubber/board/info.py +183 -0
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/board/modulelist.txt +5 -0
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/publish/defaults.py +1 -0
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/publish/merge_docstubs.py +1 -1
- micropython_stubber-1.16.1/src/stubber/__init__.py +0 -4
- micropython_stubber-1.16.1/src/stubber/board/createstubs_db_mpy.mpy +0 -0
- micropython_stubber-1.16.1/src/stubber/board/createstubs_lvgl_mpy.mpy +0 -0
- micropython_stubber-1.16.1/src/stubber/board/createstubs_mem_mpy.mpy +0 -0
- micropython_stubber-1.16.1/src/stubber/board/createstubs_mpy.mpy +0 -0
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/LICENSE +0 -0
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/readme.md +0 -0
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/basicgit.py +0 -0
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/board/board_info.csv +0 -0
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/board/boot.py +0 -0
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/board/logging.py +0 -0
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/board/main.py +0 -0
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/board/pyrightconfig.json +0 -0
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/codemod/__init__.py +0 -0
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/codemod/_partials/__init__.py +0 -0
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/codemod/_partials/db_main.py +0 -0
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/codemod/_partials/lvgl_main.py +0 -0
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/codemod/_partials/modules_reader.py +0 -0
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/codemod/add_comment.py +0 -0
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/codemod/add_method.py +0 -0
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/codemod/board.py +0 -0
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/codemod/enrich.py +0 -0
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/codemod/merge_docstub.py +0 -0
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/codemod/modify_list.py +0 -0
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/codemod/utils.py +0 -0
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/commands/__init__.py +0 -0
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/commands/build_cmd.py +0 -0
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/commands/cli.py +0 -0
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/commands/clone_cmd.py +0 -0
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/commands/config_cmd.py +0 -0
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/commands/enrich_folder_cmd.py +0 -0
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/commands/get_core_cmd.py +0 -0
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/commands/get_docstubs_cmd.py +0 -0
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/commands/get_frozen_cmd.py +0 -0
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/commands/get_lobo_cmd.py +0 -0
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/commands/merge_cmd.py +0 -0
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/commands/minify_cmd.py +0 -0
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/commands/publish_cmd.py +0 -0
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/commands/stub_cmd.py +0 -0
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/commands/switch_cmd.py +0 -0
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/commands/upd_fallback_cmd.py +0 -0
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/commands/upd_module_list_cmd.py +0 -0
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/commands/variants_cmd.py +0 -0
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/cst_transformer.py +0 -0
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/data/board_info.csv +0 -0
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/data/board_info.json +0 -0
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/data/micropython_tags.csv +0 -0
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/data/requirements-core-micropython.txt +0 -0
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/data/requirements-core-pycopy.txt +0 -0
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/downloader.py +0 -0
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/freeze/__init__.py +0 -0
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/freeze/common.py +0 -0
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/freeze/freeze_folder.py +0 -0
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/freeze/freeze_manifest_2.py +0 -0
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/freeze/get_frozen.py +0 -0
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/get_cpython.py +0 -0
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/get_lobo.py +0 -0
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/minify.py +0 -0
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/publish/__init__.py +0 -0
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/publish/bump.py +0 -0
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/publish/candidates.py +0 -0
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/publish/database.py +0 -0
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/publish/enums.py +0 -0
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/publish/helpers.py +0 -0
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/publish/missing_class_methods.py +0 -0
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/publish/package.py +0 -0
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/publish/pathnames.py +0 -0
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/publish/publish.py +0 -0
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/publish/pypi.py +0 -0
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/publish/stubpackage.py +0 -0
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/rst/__init__.py +0 -0
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/rst/classsort.py +0 -0
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/rst/lookup.py +0 -0
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/rst/output_dict.py +0 -0
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/rst/reader.py +0 -0
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/rst/report_return.py +0 -0
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/rst/rst_utils.py +0 -0
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/stubber.py +0 -0
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/stubs_from_docs.py +0 -0
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/tools/__init__.py +0 -0
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/tools/manifestfile.py +0 -0
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/tools/readme.md +0 -0
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/update_fallback.py +0 -0
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/update_module_list.py +0 -0
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/utils/__init__.py +0 -0
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/utils/config.py +0 -0
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/utils/makeversionhdr.py +0 -0
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/utils/manifest.py +0 -0
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/utils/post.py +0 -0
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/utils/repos.py +0 -0
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/utils/stubmaker.py +0 -0
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/utils/typed_config_toml.py +0 -0
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/utils/versions.py +0 -0
- {micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/variants.py +0 -0
@@ -8,7 +8,7 @@ repo-path = "./repos"
|
|
8
8
|
|
9
9
|
[tool.poetry]
|
10
10
|
name = "micropython-stubber"
|
11
|
-
version = "1.16.
|
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"
|
@@ -88,7 +88,7 @@ sphinxcontrib-mermaid = ">=0.9.2"
|
|
88
88
|
[tool.poetry.group.dev]
|
89
89
|
optional = true
|
90
90
|
[tool.poetry.group.dev.dependencies]
|
91
|
-
coverage = "
|
91
|
+
coverage = ">=6.4.3,<8.0.0"
|
92
92
|
distro = "^1.8.0"
|
93
93
|
mock = "^4.0.3"
|
94
94
|
pydeps = "^1.10.22"
|
@@ -20,7 +20,7 @@ try:
|
|
20
20
|
except ImportError:
|
21
21
|
from ucollections import OrderedDict # type: ignore
|
22
22
|
|
23
|
-
__version__ = "v1.16.
|
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":
|
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",
|
{micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/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.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.
|
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":
|
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:
|
{micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/board/createstubs_db_min.py
RENAMED
@@ -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.
|
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
|
-
|
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:
|
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
|
200
|
-
if h(
|
201
|
-
|
202
|
-
if g(A,
|
203
|
-
if
|
204
|
-
|
205
|
-
if g(A,
|
206
|
-
A[K]=
|
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(
|
215
|
-
try:
|
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(
|
218
|
-
try:
|
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]==
|
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
|
224
|
-
|
225
|
-
if
|
226
|
-
A[
|
227
|
-
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:
|
Binary file
|
{micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/board/createstubs_lvgl.py
RENAMED
@@ -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.
|
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.
|
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":
|
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:
|
{micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/board/createstubs_lvgl_min.py
RENAMED
@@ -22,10 +22,10 @@ R=len
|
|
22
22
|
Q=KeyError
|
23
23
|
P=IndexError
|
24
24
|
O=dir
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
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
|
41
|
+
except N:pass
|
42
42
|
try:from collections import OrderedDict as b
|
43
|
-
except
|
44
|
-
__version__='v1.
|
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[
|
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:
|
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
|
-
|
101
|
-
try:
|
102
|
-
except
|
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
|
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
|
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
|
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;
|
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:
|
116
|
+
if L:M(L)
|
117
117
|
for(E,J,G,T,f)in S:
|
118
|
-
if E in['classmethod','staticmethod','BaseException',
|
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(
|
122
|
-
if V:U=
|
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=
|
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:
|
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:
|
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
|
-
|
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:
|
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
|
199
|
-
if e(
|
200
|
-
|
201
|
-
if d(A,
|
202
|
-
if
|
203
|
-
|
204
|
-
if d(A,
|
205
|
-
A[J]=
|
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(
|
214
|
-
try:
|
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(
|
217
|
-
try:
|
218
|
-
except(
|
219
|
-
if A[
|
220
|
-
if A[
|
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
|
223
|
-
|
224
|
-
if
|
225
|
-
A[
|
226
|
-
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
|
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
|
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
|
262
|
+
except(h,H):return K
|
260
263
|
def main():
|
261
264
|
D='lvgl'
|
262
265
|
try:import lvgl as A
|
Binary file
|
{micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/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.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.
|
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":
|
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:
|
{micropython_stubber-1.16.1 → micropython_stubber-1.16.2}/src/stubber/board/createstubs_mem_min.py
RENAMED
@@ -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.
|
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
|
-
|
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:
|
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
|
199
|
-
if h(
|
200
|
-
|
201
|
-
if g(A,
|
202
|
-
if
|
203
|
-
|
204
|
-
if g(A,
|
205
|
-
A[J]=
|
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(
|
214
|
-
try:
|
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(
|
217
|
-
try:
|
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]==
|
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
|
223
|
-
|
224
|
-
if
|
225
|
-
A[
|
226
|
-
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:
|
Binary file
|