micropython-stubber 1.23.2__py3-none-any.whl → 1.24.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {micropython_stubber-1.23.2.dist-info → micropython_stubber-1.24.0.dist-info}/METADATA +30 -12
- {micropython_stubber-1.23.2.dist-info → micropython_stubber-1.24.0.dist-info}/RECORD +69 -66
- {micropython_stubber-1.23.2.dist-info → micropython_stubber-1.24.0.dist-info}/WHEEL +1 -1
- mpflash/README.md +2 -2
- mpflash/mpflash/basicgit.py +49 -9
- mpflash/mpflash/common.py +23 -16
- mpflash/mpflash/downloaded.py +10 -2
- mpflash/mpflash/mpboard_id/__init__.py +9 -4
- mpflash/mpflash/mpboard_id/add_boards.py +25 -14
- mpflash/mpflash/mpboard_id/board.py +2 -2
- mpflash/mpflash/mpboard_id/board_id.py +10 -6
- mpflash/mpflash/mpboard_id/board_info.zip +0 -0
- mpflash/mpflash/mpboard_id/store.py +8 -3
- mpflash/mpflash/mpremoteboard/__init__.py +13 -8
- mpflash/mpflash/mpremoteboard/mpy_fw_info.py +27 -16
- mpflash/mpflash/vendor/board_database.py +185 -0
- mpflash/mpflash/vendor/readme.md +10 -1
- mpflash/mpflash/versions.py +28 -40
- mpflash/poetry.lock +1605 -601
- mpflash/pyproject.toml +4 -3
- stubber/__init__.py +1 -1
- stubber/board/createstubs.py +51 -27
- stubber/board/createstubs_db.py +36 -28
- stubber/board/createstubs_db_min.py +171 -165
- stubber/board/createstubs_db_mpy.mpy +0 -0
- stubber/board/createstubs_mem.py +36 -28
- stubber/board/createstubs_mem_min.py +184 -178
- stubber/board/createstubs_mem_mpy.mpy +0 -0
- stubber/board/createstubs_min.py +102 -94
- stubber/board/createstubs_mpy.mpy +0 -0
- stubber/board/modulelist.txt +16 -0
- stubber/codemod/enrich.py +297 -88
- stubber/codemod/merge_docstub.py +250 -65
- stubber/codemod/test_enrich.py +87 -0
- stubber/codemod/visitors/typevars.py +200 -0
- stubber/commands/build_cmd.py +16 -3
- stubber/commands/clone_cmd.py +3 -3
- stubber/commands/config_cmd.py +4 -2
- stubber/commands/enrich_folder_cmd.py +33 -21
- stubber/commands/get_core_cmd.py +1 -2
- stubber/commands/get_docstubs_cmd.py +60 -6
- stubber/commands/get_frozen_cmd.py +15 -12
- stubber/commands/get_mcu_cmd.py +3 -3
- stubber/commands/merge_cmd.py +1 -2
- stubber/commands/publish_cmd.py +19 -4
- stubber/commands/stub_cmd.py +3 -3
- stubber/commands/switch_cmd.py +3 -5
- stubber/commands/variants_cmd.py +3 -3
- stubber/cst_transformer.py +52 -17
- stubber/freeze/common.py +27 -11
- stubber/freeze/freeze_manifest_2.py +8 -1
- stubber/freeze/get_frozen.py +4 -1
- stubber/merge_config.py +111 -0
- stubber/minify.py +1 -2
- stubber/publish/database.py +51 -10
- stubber/publish/merge_docstubs.py +33 -16
- stubber/publish/package.py +32 -18
- stubber/publish/publish.py +8 -8
- stubber/publish/stubpackage.py +110 -47
- stubber/rst/lookup.py +205 -43
- stubber/rst/reader.py +106 -59
- stubber/rst/rst_utils.py +24 -11
- stubber/stubber.py +1 -1
- stubber/stubs_from_docs.py +31 -13
- stubber/update_module_list.py +2 -2
- stubber/utils/config.py +33 -13
- stubber/utils/post.py +9 -6
- stubber/publish/missing_class_methods.py +0 -51
- {micropython_stubber-1.23.2.dist-info → micropython_stubber-1.24.0.dist-info}/LICENSE +0 -0
- {micropython_stubber-1.23.2.dist-info → micropython_stubber-1.24.0.dist-info}/entry_points.txt +0 -0
stubber/board/createstubs_min.py
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
A1='windows'
|
1
2
|
A0='No report file'
|
2
3
|
z='Failed to create the report.'
|
3
4
|
y='{}/{}'
|
@@ -15,26 +16,27 @@ n=KeyError
|
|
15
16
|
m=sorted
|
16
17
|
l=NotImplementedError
|
17
18
|
h='pycom'
|
18
|
-
g='
|
19
|
-
f='
|
20
|
-
e='
|
21
|
-
d='
|
22
|
-
c='
|
23
|
-
b=
|
24
|
-
a=
|
25
|
-
Z=
|
19
|
+
g='unix'
|
20
|
+
f=',\n'
|
21
|
+
e='dict'
|
22
|
+
d='list'
|
23
|
+
c='tuple'
|
24
|
+
b='micropython'
|
25
|
+
a=TypeError
|
26
|
+
Z=repr
|
26
27
|
W='-preview'
|
27
28
|
V=True
|
28
29
|
U='-'
|
29
30
|
T='board'
|
30
31
|
S=len
|
31
32
|
R=open
|
32
|
-
Q=
|
33
|
-
|
33
|
+
Q=print
|
34
|
+
P='family'
|
35
|
+
O=IndexError
|
34
36
|
N=ImportError
|
35
37
|
M=dir
|
36
|
-
|
37
|
-
|
38
|
+
L='port'
|
39
|
+
K='.'
|
38
40
|
I=AttributeError
|
39
41
|
H=False
|
40
42
|
G='/'
|
@@ -50,34 +52,35 @@ try:from machine import reset
|
|
50
52
|
except N:pass
|
51
53
|
try:from collections import OrderedDict as i
|
52
54
|
except N:from ucollections import OrderedDict as i
|
53
|
-
__version__='v1.
|
54
|
-
P=__version__.rsplit(J,1)[0]
|
55
|
-
A1=2
|
55
|
+
__version__='v1.24.0'
|
56
56
|
A2=2
|
57
|
-
|
58
|
-
|
59
|
-
|
57
|
+
A3=2
|
58
|
+
A7=['lib','/lib','/sd/lib','/flash/lib',K]
|
59
|
+
class J:
|
60
|
+
DEBUG=10;INFO=20;WARNING=30;ERROR=40;level=INFO;prnt=Q
|
60
61
|
@staticmethod
|
61
|
-
def getLogger(name):return
|
62
|
+
def getLogger(name):return J()
|
62
63
|
@classmethod
|
63
64
|
def basicConfig(A,level):A.level=level
|
65
|
+
def debug(A,msg):
|
66
|
+
if A.level<=J.DEBUG:A.prnt('DEBUG :',msg)
|
64
67
|
def info(A,msg):
|
65
|
-
if A.level<=
|
68
|
+
if A.level<=J.INFO:A.prnt('INFO :',msg)
|
66
69
|
def warning(A,msg):
|
67
|
-
if A.level<=
|
70
|
+
if A.level<=J.WARNING:A.prnt('WARN :',msg)
|
68
71
|
def error(A,msg):
|
69
|
-
if A.level<=
|
70
|
-
A=
|
71
|
-
|
72
|
+
if A.level<=J.ERROR:A.prnt('ERROR :',msg)
|
73
|
+
A=J.getLogger(p)
|
74
|
+
J.basicConfig(level=J.INFO)
|
72
75
|
class Stubber:
|
73
76
|
def __init__(B,path=D,firmware_id=D):
|
74
77
|
C=firmware_id
|
75
78
|
try:
|
76
79
|
if os.uname().release=='1.13.0'and os.uname().version<'v1.13-103':raise l('MicroPython 1.13.0 cannot be stubbed')
|
77
80
|
except I:pass
|
78
|
-
B.info=_info();A.info('Port: {}'.format(B.info[
|
81
|
+
B.info=_info();A.info('Port: {}'.format(B.info[L]));A.info('Board: {}'.format(B.info[T]));F.collect()
|
79
82
|
if C:B._fwid=C.lower()
|
80
|
-
elif B.info[
|
83
|
+
elif B.info[P]==b:B._fwid='{family}-v{version}-{port}-{board}'.format(**B.info).rstrip(U)
|
81
84
|
else:B._fwid='{family}-v{version}-{port}'.format(**B.info)
|
82
85
|
B._start_free=F.mem_free()
|
83
86
|
if path:
|
@@ -93,15 +96,15 @@ class Stubber:
|
|
93
96
|
if A.startswith('__')and not A in L.modules:continue
|
94
97
|
try:
|
95
98
|
D=getattr(H,A)
|
96
|
-
try:E=
|
97
|
-
except
|
98
|
-
if E in{q,r,s,t,d,e
|
99
|
+
try:E=Z(type(D)).split("'")[1]
|
100
|
+
except O:E=B
|
101
|
+
if E in{q,r,s,t,c,d,e}:G=1
|
99
102
|
elif E in{u,v}:G=2
|
100
103
|
elif E in'class':G=3
|
101
104
|
else:G=4
|
102
|
-
C.append((A,
|
105
|
+
C.append((A,Z(D),Z(type(D)),D,G))
|
103
106
|
except I as J:K.append("Couldn't get attribute '{}' from object '{}', Err: {}".format(A,H,J))
|
104
|
-
except MemoryError as J:
|
107
|
+
except MemoryError as J:Q('MemoryError: {}'.format(J));sleep(1);reset()
|
105
108
|
C=m([A for A in C if not A[0].startswith('__')],key=lambda x:x[4]);F.collect();return C,K
|
106
109
|
def add_modules(A,modules):A.modules=m(set(A.modules)|set(modules))
|
107
110
|
def create_all_stubs(B):
|
@@ -112,60 +115,62 @@ class Stubber:
|
|
112
115
|
B=module_name
|
113
116
|
if B in C.problematic:A.warning('Skip module: {:<25} : Known problematic'.format(B));return H
|
114
117
|
if B in C.excluded:A.warning('Skip module: {:<25} : Excluded'.format(B));return H
|
115
|
-
I='{}/{}.pyi'.format(C.path,B.replace(
|
118
|
+
I='{}/{}.pyi'.format(C.path,B.replace(K,G));F.collect();D=H
|
116
119
|
try:D=C.create_module_stub(B,I)
|
117
120
|
except E:return H
|
118
121
|
F.collect();return D
|
119
|
-
def create_module_stub(
|
122
|
+
def create_module_stub(J,module_name,file_name=D):
|
120
123
|
I=file_name;C=module_name
|
121
|
-
if I is D:L=C.replace(
|
124
|
+
if I is D:L=C.replace(K,'_')+'.pyi';I=J.path+G+L
|
122
125
|
else:L=I.split(G)[-1]
|
123
|
-
if G in C:C=C.replace(G,
|
126
|
+
if G in C:C=C.replace(G,K)
|
124
127
|
M=D
|
125
|
-
try:M=__import__(C,D,D,'*');
|
128
|
+
try:M=__import__(C,D,D,'*');P=F.mem_free();A.info('Stub module: {:<25} to file: {:<70} mem:{:>5}'.format(C,L,P))
|
126
129
|
except N:return H
|
127
130
|
X(I)
|
128
|
-
with R(I,'w')as O:
|
129
|
-
|
131
|
+
with R(I,'w')as O:Q=str(J.info).replace('OrderedDict(',B).replace('})','}');S='"""\nModule: \'{0}\' on {1}\n"""\n# MCU: {2}\n# Stubber: {3}\n'.format(C,J._fwid,Q,__version__);O.write(S);O.write('from __future__ import annotations\nfrom typing import Any, Generator\nfrom _typeshed import Incomplete\n\n');J.write_object_stub(O,M,C,B)
|
132
|
+
J.report_add(C,I)
|
130
133
|
if C not in{'os',w,x,'gc'}:
|
131
134
|
try:del M
|
132
135
|
except(E,n):A.warning('could not del new_module')
|
133
136
|
F.collect();return V
|
134
137
|
def write_object_stub(L,fp,object_expr,obj_name,indent,in_class=0):
|
135
|
-
Z=' at ...>';Y='generator';X='{0}{1}: {3} = {2}\n';W='bound_method';V='Incomplete';O=in_class;N='Exception';M=object_expr;K=' at ';J=fp;
|
138
|
+
Z=' at ...>';Y='generator';X='{0}{1}: {3} = {2}\n';W='bound_method';V='Incomplete';O=in_class;N='Exception';M=object_expr;K=' at ';J=fp;E=indent;F.collect()
|
136
139
|
if M in L.problematic:A.warning('SKIPPING problematic module:{}'.format(M));return
|
137
140
|
a,P=L.get_obj_attributes(M)
|
138
141
|
if P:A.error(P)
|
139
|
-
for(
|
140
|
-
if
|
141
|
-
if
|
142
|
-
if I=="<class 'type'>"and S(
|
143
|
-
Q=B;R=
|
142
|
+
for(C,H,I,b,g)in a:
|
143
|
+
if C in['classmethod','staticmethod','BaseException',N]:continue
|
144
|
+
if C[0].isdigit():A.warning('NameError: invalid name {}'.format(C));continue
|
145
|
+
if I=="<class 'type'>"and S(E)<=A3*4:
|
146
|
+
Q=B;R=C.endswith(N)or C.endswith('Error')or C in['KeyboardInterrupt','StopIteration','SystemExit']
|
144
147
|
if R:Q=N
|
145
|
-
|
146
|
-
if R:
|
147
|
-
J.write(
|
148
|
+
D='\n{}class {}({}):\n'.format(E,C,Q)
|
149
|
+
if R:D+=E+' ...\n';J.write(D);continue
|
150
|
+
J.write(D);L.write_object_stub(J,b,'{0}.{1}'.format(obj_name,C),E+' ',O+1);D=E+' def __init__(self, *argv, **kwargs) -> None:\n';D+=E+' ...\n\n';J.write(D)
|
148
151
|
elif any(A in I for A in[v,u,'closure']):
|
149
152
|
T=V;U=B
|
150
153
|
if O>0:U='self, '
|
151
|
-
if W in I or W in H:
|
152
|
-
else:
|
153
|
-
|
154
|
+
if W in I or W in H:D='{}@classmethod\n'.format(E)+'{}def {}(cls, *args, **kwargs) -> {}:\n'.format(E,C,T)
|
155
|
+
else:D='{}def {}({}*args, **kwargs) -> {}:\n'.format(E,C,U,T)
|
156
|
+
D+=E+' ...\n\n';J.write(D)
|
154
157
|
elif I=="<class 'module'>":0
|
155
158
|
elif I.startswith("<class '"):
|
156
|
-
G=I[8:-2];
|
157
|
-
if G in(s,q,r,t,'bytearray','bytes'):
|
158
|
-
|
159
|
+
G=I[8:-2];D=B
|
160
|
+
if G in(s,q,r,t,'bytearray','bytes'):
|
161
|
+
if C.upper()==C:D='{0}{1}: Final[{3}] = {2}\n'.format(E,C,H,G)
|
162
|
+
else:D=X.format(E,C,H,G)
|
163
|
+
elif G in(e,d,c):f={e:'{}',d:'[]',c:'()'};D=X.format(E,C,f[G],G)
|
159
164
|
elif G in('object','set','frozenset','Pin',Y):
|
160
165
|
if G==Y:G='Generator'
|
161
|
-
|
166
|
+
D='{0}{1}: {2} ## = {4}\n'.format(E,C,G,I,H)
|
162
167
|
else:
|
163
168
|
G=V
|
164
169
|
if K in H:H=H.split(K)[0]+Z
|
165
170
|
if K in H:H=H.split(K)[0]+Z
|
166
|
-
|
167
|
-
J.write(
|
168
|
-
else:J.write("# all other, type = '{0}'\n".format(I));J.write(
|
171
|
+
D='{0}{1}: {2} ## {3} = {4}\n'.format(E,C,G,I,H)
|
172
|
+
J.write(D)
|
173
|
+
else:J.write("# all other, type = '{0}'\n".format(I));J.write(E+C+' # type: Incomplete\n')
|
169
174
|
@property
|
170
175
|
def flat_fwid(self):
|
171
176
|
A=self._fwid;B=' .()/\\:$'
|
@@ -185,13 +190,13 @@ class Stubber:
|
|
185
190
|
def report_start(B,filename='modules.json'):
|
186
191
|
H='firmware';B._json_name=y.format(B.path,filename);B._json_first=V;X(B._json_name);A.info('Report file: {}'.format(B._json_name));F.collect()
|
187
192
|
try:
|
188
|
-
with R(B._json_name,'w')as G:G.write('{');G.write(dumps({H:B.info})[1:-1]);G.write(
|
193
|
+
with R(B._json_name,'w')as G:G.write('{');G.write(dumps({H:B.info})[1:-1]);G.write(f);G.write(dumps({p:{C:__version__},'stubtype':H})[1:-1]);G.write(f);G.write('"modules" :[\n')
|
189
194
|
except E as I:A.error(z);B._json_name=D;raise I
|
190
195
|
def report_add(B,module_name,stub_file):
|
191
196
|
if not B._json_name:raise o(A0)
|
192
197
|
try:
|
193
198
|
with R(B._json_name,'a')as C:
|
194
|
-
if not B._json_first:C.write(
|
199
|
+
if not B._json_first:C.write(f)
|
195
200
|
else:B._json_first=H
|
196
201
|
D='{{"module": "{}", "file": "{}"}}'.format(module_name,stub_file.replace('\\',G));C.write(D)
|
197
202
|
except E:A.error(z)
|
@@ -207,8 +212,8 @@ def X(path):
|
|
207
212
|
C=path[0]if B==0 else path[:B]
|
208
213
|
try:I=os.stat(C)
|
209
214
|
except E as F:
|
210
|
-
if F.args[0]==
|
211
|
-
try:os.mkdir(C)
|
215
|
+
if F.args[0]==A2:
|
216
|
+
try:A.debug('Create folder {}'.format(C));os.mkdir(C)
|
212
217
|
except E as H:A.error('failed to create folder {}'.format(C));raise H
|
213
218
|
D=B+1
|
214
219
|
def Y(s):
|
@@ -219,64 +224,66 @@ def Y(s):
|
|
219
224
|
if not U in s:return B
|
220
225
|
A=s.split(U)[1];return A
|
221
226
|
if not W in s:return B
|
222
|
-
A=s.split(W)[1].split(
|
227
|
+
A=s.split(W)[1].split(K)[1];return A
|
223
228
|
def _info():
|
224
|
-
|
225
|
-
try:
|
226
|
-
except
|
227
|
-
A=i({
|
228
|
-
if A[
|
229
|
-
elif A[
|
230
|
-
elif A[
|
231
|
-
try:A[C]=
|
229
|
+
X='ev3-pybricks';V='pycopy';U='win32';S='arch';R='cpu';Q='ver';F='mpy';E='build'
|
230
|
+
try:J=sys.implementation[0]
|
231
|
+
except a:J=sys.implementation.name
|
232
|
+
A=i({P:J,C:B,E:B,Q:B,L:sys.platform,T:'UNKNOWN',R:B,F:B,S:B})
|
233
|
+
if A[L].startswith('pyb'):A[L]='stm32'
|
234
|
+
elif A[L]==U:A[L]=A1
|
235
|
+
elif A[L]=='linux':A[L]=g
|
236
|
+
try:A[C]=A4(sys.implementation.version)
|
232
237
|
except I:pass
|
233
|
-
try:
|
234
|
-
except(I,
|
235
|
-
A[T]=
|
238
|
+
try:K=sys.implementation._machine if'_machine'in M(sys.implementation)else os.uname().machine;A[T]=K;A[R]=K.split('with')[-1].strip();A[F]=sys.implementation._mpy if'_mpy'in M(sys.implementation)else sys.implementation.mpy if F in M(sys.implementation)else B
|
239
|
+
except(I,O):pass
|
240
|
+
A[T]=A5()
|
236
241
|
try:
|
237
242
|
if'uname'in M(os):
|
238
243
|
A[E]=Y(os.uname()[3])
|
239
244
|
if not A[E]:A[E]=Y(os.uname()[2])
|
240
245
|
elif C in M(sys):A[E]=Y(sys.version)
|
241
|
-
except(I,
|
242
|
-
if A[C]==B and sys.platform not in(
|
243
|
-
try:
|
244
|
-
except(
|
245
|
-
for(
|
246
|
-
try:
|
246
|
+
except(I,O,a):pass
|
247
|
+
if A[C]==B and sys.platform not in(g,U):
|
248
|
+
try:Z=os.uname();A[C]=Z.release
|
249
|
+
except(O,I,a):pass
|
250
|
+
for(c,d,e)in[(V,V,'const'),(h,h,'FAT'),(X,'pybricks.hubs','EV3Brick')]:
|
251
|
+
try:f=__import__(d,D,D,e);A[P]=c;del f;break
|
247
252
|
except(N,n):pass
|
248
|
-
if A[
|
249
|
-
if A[
|
253
|
+
if A[P]==X:A['release']='2.0.0'
|
254
|
+
if A[P]==b:
|
250
255
|
A[C]
|
251
256
|
if A[C]and A[C].endswith('.0')and A[C]>='1.10.0'and A[C]<='1.19.9':A[C]=A[C][:-2]
|
252
257
|
if F in A and A[F]:
|
253
|
-
G=int(A[F])
|
254
|
-
|
258
|
+
G=int(A[F])
|
259
|
+
try:H=[D,'x86','x64','armv6','armv6m','armv7m','armv7em','armv7emsp','armv7emdp','xtensa','xtensawin','rv32imc'][G>>10]
|
260
|
+
except O:H='unknown'
|
261
|
+
if H:A[S]=H
|
255
262
|
A[F]='v{}.{}'.format(G&255,G>>8&3)
|
256
263
|
if A[E]and not A[C].endswith(W):A[C]=A[C]+W
|
257
|
-
A[
|
258
|
-
def
|
259
|
-
A=version;B=
|
264
|
+
A[Q]=f"{A[C]}-{A[E]}"if A[E]else f"{A[C]}";return A
|
265
|
+
def A4(version):
|
266
|
+
A=version;B=K.join([str(A)for A in A[:3]])
|
260
267
|
if S(A)>3 and A[3]:B+=U+A[3]
|
261
268
|
return B
|
262
|
-
def
|
269
|
+
def A5():
|
263
270
|
try:from boardname import BOARDNAME as C;A.info('Found BOARDNAME: {}'.format(C))
|
264
271
|
except N:A.warning('BOARDNAME not found');C=B
|
265
272
|
return C
|
266
273
|
def get_root():
|
267
274
|
try:A=os.getcwd()
|
268
|
-
except(E,I):A=
|
275
|
+
except(E,I):A=K
|
269
276
|
B=A
|
270
|
-
for B in[
|
277
|
+
for B in['/remote','/sd','/flash',G,A,K]:
|
271
278
|
try:C=os.stat(B);break
|
272
279
|
except E:continue
|
273
280
|
return B
|
274
|
-
def
|
281
|
+
def A6(filename):
|
275
282
|
try:
|
276
283
|
if os.stat(filename)[0]>>14:return V
|
277
284
|
return H
|
278
285
|
except E:return H
|
279
|
-
def j():
|
286
|
+
def j():Q("-p, --path path to store the stubs in, defaults to '.'");sys.exit(1)
|
280
287
|
def read_path():
|
281
288
|
path=B
|
282
289
|
if S(sys.argv)==3:
|
@@ -288,9 +295,10 @@ def read_path():
|
|
288
295
|
def k():
|
289
296
|
try:A=bytes('abc',encoding='utf8');B=k.__module__;return H
|
290
297
|
except(l,I):return V
|
291
|
-
def main():stubber=Stubber(path=read_path());stubber.clean();stubber.modules=['WM8960','_OTA','_asyncio','_boot_fat','_coap','_espnow','_flash_control_OTA','_main_pybytes','_mqtt','_mqtt_core','_msg_handl','_onewire','_periodical_pin','_pybytes','_pybytes_ca','_pybytes_config','_pybytes_config_reader','_pybytes_connection','_pybytes_constants','_pybytes_debug','_pybytes_library','_pybytes_machine_learning','_pybytes_main','_pybytes_protocol','_pybytes_pyconfig','_pybytes_pymesh_config','_rp2','_terminal','_thread','_uasyncio','_urequest','adcfft','aioble/__init__','aioble/central','aioble/client','aioble/core','aioble/device','aioble/l2cap','aioble/peripheral','aioble/security','aioble/server','aioespnow','ak8963','apa102','apa106','argparse','array','asyncio/__init__','asyncio/core','asyncio/event','asyncio/funcs','asyncio/lock','asyncio/stream','binascii','bluetooth','breakout_as7262','breakout_bh1745','breakout_bme280','breakout_bme68x','breakout_bmp280','breakout_dotmatrix','breakout_encoder','breakout_icp10125','breakout_ioexpander','breakout_ltr559','breakout_matrix11x7','breakout_mics6814','breakout_msa301','breakout_paa5100','breakout_pmw3901','breakout_potentiometer','breakout_rgbmatrix5x5','breakout_rtc','breakout_scd41','breakout_sgp30','breakout_trackball','breakout_vl53l5cx','btree','cmath','collections','crypto','cryptolib','curl','deflate','dht','display','display_driver_utils','ds18x20','encoder','errno','esp','esp32','espidf','espnow','ffi','flashbdev','framebuf','freesans20','fs_driver','functools','galactic','gc','gfx_pack','gsm','hashlib','heapq','hub75','ili9341','ili9XXX','imagetools','inisetup','interstate75','io','jpegdec','js','jsffi','json','lcd160cr','lodepng',x,'lsm6dsox','lv_colors','lv_utils','lvgl','lwip','machine','math','microWebSocket','microWebSrv','microWebTemplate',
|
298
|
+
def main():stubber=Stubber(path=read_path());stubber.clean();stubber.modules=['WM8960','_OTA','_asyncio','_boot_fat','_coap','_espnow','_flash_control_OTA','_main_pybytes','_mqtt','_mqtt_core','_msg_handl','_onewire','_periodical_pin','_pybytes','_pybytes_ca','_pybytes_config','_pybytes_config_reader','_pybytes_connection','_pybytes_constants','_pybytes_debug','_pybytes_library','_pybytes_machine_learning','_pybytes_main','_pybytes_protocol','_pybytes_pyconfig','_pybytes_pymesh_config','_rp2','_terminal','_thread','_uasyncio','_urequest','adcfft','aioble/__init__','aioble/central','aioble/client','aioble/core','aioble/device','aioble/l2cap','aioble/peripheral','aioble/security','aioble/server','aioespnow','ak8963','apa102','apa106','argparse','array','asyncio/__init__','asyncio/core','asyncio/event','asyncio/funcs','asyncio/lock','asyncio/stream','binascii','bluetooth','breakout_as7262','breakout_bh1745','breakout_bme280','breakout_bme68x','breakout_bmp280','breakout_dotmatrix','breakout_encoder','breakout_icp10125','breakout_ioexpander','breakout_ltr559','breakout_matrix11x7','breakout_mics6814','breakout_msa301','breakout_paa5100','breakout_pmw3901','breakout_potentiometer','breakout_rgbmatrix5x5','breakout_rtc','breakout_scd41','breakout_sgp30','breakout_trackball','breakout_vl53l5cx','btree','builtins','cc3200','cmath','collections','crypto','cryptolib','curl','deflate','dht','display','display_driver_utils','ds18x20','embed','encoder','errno','esp','esp32','esp8266','espidf','espnow','ffi','flashbdev','framebuf','freesans20','fs_driver','functools','galactic','gc','gfx_pack','gsm','hashlib','heapq','hub75','ili9341','ili9XXX','imagetools','inisetup','interstate75','io','jpegdec','js','jsffi','json','lcd160cr','lodepng',x,'lsm6dsox','lv_colors','lv_utils','lvgl','lwip','machine','marshal','math','microWebSocket','microWebSrv','microWebTemplate',b,'mimxrt','mip','mip/__init__','mip/__main__','motor','mpu6500','mpu9250','neopixel','network','nrf','ntptime','onewire','openamp','os','pcf85063a','pic16bit','picoexplorer','picographics','picokeypad','picoscroll','picounicorn','picowireless','pimoroni','pimoroni_bus','pimoroni_i2c','plasma','platform','powerpc','pyb',h,'pye','qemu','qrcode','queue','random','renesas','renesas-ra','requests','requests/__init__','rp2','rtch','samd','select','servo','socket','ssd1306','ssh','ssl','stm','stm32','struct',w,'termios','time','tls','tpcalib','uarray','uasyncio/__init__','uasyncio/core','uasyncio/event','uasyncio/funcs','uasyncio/lock','uasyncio/stream','uasyncio/tasks','ubinascii','ubluetooth','ucollections','ucrypto','ucryptolib','uctypes','uerrno','uftpd','uhashlib','uheapq','uio','ujson','ulab','ulab/approx','ulab/compare','ulab/fft','ulab/filter','ulab/linalg','ulab/numerical','ulab/poly','ulab/user','ulab/vector','umachine','umqtt/__init__','umqtt/robust','umqtt/simple',g,'uos','uplatform','uqueue','urandom','ure','urequests','urllib/urequest','usb/device','usb/device/cdc','usb/device/hid','usb/device/keyboard','usb/device/midi','usb/device/mouse','uselect','usocket','ussl','ustruct','usys','utelnetserver','utime','utimeq','uwebsocket','uzlib',C,'vfs','webassembly','websocket','websocket_helper',A1,'wipy','writer','xpt2046','ymodem','zephyr','zlib'];F.collect();stubber.create_all_stubs()
|
292
299
|
if __name__=='__main__'or k():
|
293
|
-
if not
|
294
|
-
|
300
|
+
if not A6('no_auto_stubber.txt'):
|
301
|
+
Q(f"createstubs.py: {__version__}")
|
302
|
+
try:F.threshold(4096);F.enable()
|
295
303
|
except BaseException:pass
|
296
304
|
main()
|
Binary file
|
stubber/board/modulelist.txt
CHANGED
@@ -77,6 +77,8 @@ breakout_sgp30
|
|
77
77
|
breakout_trackball
|
78
78
|
breakout_vl53l5cx
|
79
79
|
btree
|
80
|
+
builtins
|
81
|
+
cc3200
|
80
82
|
cmath
|
81
83
|
collections
|
82
84
|
crypto
|
@@ -87,10 +89,12 @@ dht
|
|
87
89
|
display
|
88
90
|
display_driver_utils
|
89
91
|
ds18x20
|
92
|
+
embed
|
90
93
|
encoder
|
91
94
|
errno
|
92
95
|
esp
|
93
96
|
esp32
|
97
|
+
esp8266
|
94
98
|
espidf
|
95
99
|
espnow
|
96
100
|
ffi
|
@@ -125,11 +129,13 @@ lv_utils
|
|
125
129
|
lvgl
|
126
130
|
lwip
|
127
131
|
machine
|
132
|
+
marshal
|
128
133
|
math
|
129
134
|
microWebSocket
|
130
135
|
microWebSrv
|
131
136
|
microWebTemplate
|
132
137
|
micropython
|
138
|
+
mimxrt
|
133
139
|
mip
|
134
140
|
mip/__init__
|
135
141
|
mip/__main__
|
@@ -138,11 +144,13 @@ mpu6500
|
|
138
144
|
mpu9250
|
139
145
|
neopixel
|
140
146
|
network
|
147
|
+
nrf
|
141
148
|
ntptime
|
142
149
|
onewire
|
143
150
|
openamp
|
144
151
|
os
|
145
152
|
pcf85063a
|
153
|
+
pic16bit
|
146
154
|
picoexplorer
|
147
155
|
picographics
|
148
156
|
picokeypad
|
@@ -154,12 +162,16 @@ pimoroni_bus
|
|
154
162
|
pimoroni_i2c
|
155
163
|
plasma
|
156
164
|
platform
|
165
|
+
powerpc
|
157
166
|
pyb
|
158
167
|
pycom
|
159
168
|
pye
|
169
|
+
qemu
|
160
170
|
qrcode
|
161
171
|
queue
|
162
172
|
random
|
173
|
+
renesas
|
174
|
+
renesas-ra
|
163
175
|
requests
|
164
176
|
requests/__init__
|
165
177
|
rp2
|
@@ -172,6 +184,7 @@ ssd1306
|
|
172
184
|
ssh
|
173
185
|
ssl
|
174
186
|
stm
|
187
|
+
stm32
|
175
188
|
struct
|
176
189
|
sys
|
177
190
|
termios
|
@@ -212,6 +225,7 @@ umachine
|
|
212
225
|
umqtt/__init__
|
213
226
|
umqtt/robust
|
214
227
|
umqtt/simple
|
228
|
+
unix
|
215
229
|
uos
|
216
230
|
uplatform
|
217
231
|
uqueue
|
@@ -237,8 +251,10 @@ uwebsocket
|
|
237
251
|
uzlib
|
238
252
|
version
|
239
253
|
vfs
|
254
|
+
webassembly
|
240
255
|
websocket
|
241
256
|
websocket_helper
|
257
|
+
windows
|
242
258
|
wipy
|
243
259
|
writer
|
244
260
|
xpt2046
|