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/rst/lookup.py
CHANGED
@@ -12,17 +12,20 @@ __all__ = [
|
|
12
12
|
"NONE_VERBS",
|
13
13
|
"CHILD_PARENT_CLASS",
|
14
14
|
"PARAM_FIXES",
|
15
|
+
"PARAM_RE_FIXES",
|
15
16
|
"MODULE_GLUE",
|
16
17
|
"RST_DOC_FIXES",
|
17
18
|
"DOCSTUB_SKIP",
|
18
19
|
"U_MODULES",
|
19
20
|
]
|
20
21
|
|
21
|
-
# all possible Types needed for the stubs -
|
22
|
+
# all possible Types needed for the stubs - excess types should be removed later , and otherwise won't do much harm
|
22
23
|
TYPING_IMPORT: List[str] = [
|
23
24
|
"from __future__ import annotations",
|
24
|
-
"from typing import IO, Any, Callable, Coroutine, Dict, Generator, Iterator, List, NoReturn, Optional, Tuple, Union, NamedTuple, TypeVar",
|
25
25
|
"from _typeshed import Incomplete",
|
26
|
+
"from typing import IO, Any, Callable, Coroutine, Dict, Generator, Iterator, List, NoReturn, Optional, Tuple, Union, NamedTuple",
|
27
|
+
"from typing_extensions import TypeVar, TypeAlias, Awaitable",
|
28
|
+
# "# TYPING_IMPORT",
|
26
29
|
]
|
27
30
|
|
28
31
|
|
@@ -51,9 +54,11 @@ class Fix:
|
|
51
54
|
|
52
55
|
U_MODULES = [
|
53
56
|
"array",
|
57
|
+
"asyncio",
|
54
58
|
"binascii",
|
55
59
|
"io",
|
56
60
|
"json",
|
61
|
+
"machine",
|
57
62
|
"os",
|
58
63
|
"select",
|
59
64
|
"ssl",
|
@@ -73,8 +78,6 @@ but can also be imported with a `u` prefix
|
|
73
78
|
# also applies correction for some classes are documented as functions
|
74
79
|
|
75
80
|
RST_DOC_FIXES: List[Tuple[str, str]] = [
|
76
|
-
# remove rst highlights from docstrings
|
77
|
-
(":class: attention\n", ""),
|
78
81
|
# ------------------------------------------------------------------------------------------------
|
79
82
|
# re.rst - function and class with the same name
|
80
83
|
# done: issue https://github.com/micropython/micropython/issues/8273
|
@@ -121,14 +124,14 @@ LOOKUP_LIST = {
|
|
121
124
|
"builtins.from_bytes": ("int", 0.95),
|
122
125
|
"builtins.to_bytes": ("bytes", 0.95),
|
123
126
|
"bytearray_at": ("bytearray", 0.95),
|
124
|
-
"collections.namedtuple": ("
|
127
|
+
"collections.namedtuple": ("type[Tuple[Any, ...]]", 0.95),
|
125
128
|
"gc.collect": ("None", 0.95),
|
126
129
|
"machine.deepsleep": ("NoReturn", 0.95),
|
127
130
|
"machine.reset_cause": ("int", 0.95),
|
128
131
|
"machine.reset": ("NoReturn", 0.95), # never returns
|
129
132
|
"machine.Signal.value": ("int", 0.95),
|
130
133
|
"machine.soft_reset": ("NoReturn", 0.95), # never returns
|
131
|
-
"machine.UART.irq": ("
|
134
|
+
"machine.UART.irq": ("_IRQ", 0.95), # no IRQ type defined
|
132
135
|
"machine.UART.write": ("Union[int,None]", 0.95),
|
133
136
|
"machine.UART.readinto": ("Union[int,None]", 0.95),
|
134
137
|
"machine.UART.readline": ("Union[str,None]", 0.95),
|
@@ -142,19 +145,20 @@ LOOKUP_LIST = {
|
|
142
145
|
"pyb.hard_reset": ("NoReturn", 0.95), # never returns
|
143
146
|
"pyb.I2C.recv": ("bytes", 0.95), # complex in docstring
|
144
147
|
"pyb.SPI.recv": ("bytes", 0.95), # complex in docstring
|
145
|
-
"pyb.hid_keyboard": ("
|
146
|
-
"pyb.hid_mouse": ("
|
147
|
-
"
|
148
|
+
"pyb.hid_keyboard": ("HID_Tuple", 0.95), # ?
|
149
|
+
"pyb.hid_mouse": ("HID_Tuple", 0.95), # plain wrong
|
150
|
+
"bluetooth.BLE.irq": ("_IRQ", 0.95),
|
151
|
+
"ubluetooth.BLE.irq": ("_IRQ", 0.95),
|
148
152
|
"uctypes.bytearray_at": ("bytearray", 0.95),
|
149
153
|
"uctypes.bytes_at": ("bytes", 0.95),
|
150
154
|
"uio.open": ("IO", 0.95), # Open a file.
|
151
155
|
"uos.listdir": ("List[Incomplete]", 0.95),
|
152
156
|
"os.uname": ("uname_result", 0.95),
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
157
|
+
# undocumented CPython class ssl.SSLSocket
|
158
|
+
# TODO: include ssl.SSLSocket from stdlib / mpy_typeshed, currently Incomplete
|
159
|
+
"ssl.wrap_socket": ("SSLSocket", 0.95),
|
160
|
+
"ussl.wrap_socket": ("SSLSocket", 0.95),
|
161
|
+
#
|
158
162
|
"usys.exit": ("NoReturn", 0.95), # never returns
|
159
163
|
"utime.sleep_ms": (
|
160
164
|
"Coroutine[None, None, None]", # Micropython V1.15+ ?
|
@@ -173,6 +177,31 @@ LOOKUP_LIST = {
|
|
173
177
|
"_onewire.crc8": ("int", 0.95),
|
174
178
|
# espnow
|
175
179
|
"espnow.ESPNow.recv": ("Union[List, Tuple[None,None]]", 0.95), # list / ? tuple of bytestrings
|
180
|
+
# esp32
|
181
|
+
"esp32.Partition.readblocks": ("None", 0.95),
|
182
|
+
"esp32.Partition.writeblocks": ("None", 0.95),
|
183
|
+
"_rp2.bootsel_button": ("int", 0.95),
|
184
|
+
"_rp2.DMA.active": ("bool", 0.95),
|
185
|
+
"_rp2.DMA.pack_ctrl": ("int", 0.95),
|
186
|
+
"_rp2.DMA.unpack_ctrl": ("dict", 0.95),
|
187
|
+
"_rp2.DMA.close": ("None", 0.95),
|
188
|
+
"_rp2.DMA.config": ("None", 0.95),
|
189
|
+
"_rp2.DMA.irq": ("_IRQ", 0.95),
|
190
|
+
"_rp2.PIO.state_machine": ("StateMachine", 0.95),
|
191
|
+
"_rp2.PIO.irq": ("_IRQ", 0.95),
|
192
|
+
"_rp2.PIO.remove_program": ("None", 0.95),
|
193
|
+
"_rp2.PIO.add_program": ("None", 0.95),
|
194
|
+
"rp2.bootsel_button": ("int", 0.95),
|
195
|
+
"rp2.DMA.active": ("bool", 0.95),
|
196
|
+
"rp2.DMA.pack_ctrl": ("int", 0.95),
|
197
|
+
"rp2.DMA.unpack_ctrl": ("dict", 0.95),
|
198
|
+
"rp2.DMA.close": ("None", 0.95),
|
199
|
+
"rp2.DMA.config": ("None", 0.95),
|
200
|
+
"rp2.DMA.irq": ("_IRQ", 0.95),
|
201
|
+
"rp2.PIO.state_machine": ("StateMachine", 0.95),
|
202
|
+
"rp2.PIO.irq": ("_IRQ", 0.95),
|
203
|
+
"rp2.PIO.remove_program": ("None", 0.95),
|
204
|
+
"rp2.PIO.add_program": ("None", 0.95),
|
176
205
|
}
|
177
206
|
|
178
207
|
|
@@ -229,35 +258,152 @@ NONE_VERBS = [
|
|
229
258
|
# - to allow one module te refer to another,
|
230
259
|
# - to import other supporting modules
|
231
260
|
# - to add missing abstract classes
|
261
|
+
# - to add TypeAliases and TypeVars
|
262
|
+
|
263
|
+
# avoid defining AnyReadableBuf and AnyWritableBuf in m modules
|
264
|
+
ANY_BUF = ["from _mpy_shed import AnyReadableBuf, AnyWritableBuf"]
|
232
265
|
|
233
266
|
MODULE_GLUE = {
|
234
|
-
"
|
235
|
-
"
|
267
|
+
"array": ['_T = TypeVar("_T", int, float, str)'],
|
268
|
+
"asyncio": ANY_BUF,
|
269
|
+
"bluetooth": ANY_BUF
|
270
|
+
+ [
|
271
|
+
"from _mpy_shed import _IRQ",
|
272
|
+
],
|
236
273
|
"collections": [
|
237
274
|
"from queue import Queue",
|
238
|
-
"from
|
239
|
-
|
240
|
-
|
241
|
-
# "from stdlib.os import uname_result", # uname returns uname_result
|
242
|
-
"from stdlib.os import * # type: ignore", # integrate STDLIB
|
275
|
+
# "from _mpy_shed.collections import namedtuple as stdlib_namedtuple # type: ignore",
|
276
|
+
'_KT = TypeVar("_KT")',
|
277
|
+
'_VT = TypeVar("_VT")',
|
243
278
|
],
|
244
|
-
"
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
"
|
249
|
-
|
250
|
-
|
279
|
+
"cmath": [
|
280
|
+
"from typing_extensions import TypeAlias",
|
281
|
+
# "_C: TypeAlias = SupportsFloat | SupportsComplex | SupportsIndex | complex",
|
282
|
+
],
|
283
|
+
"cryptolib": ANY_BUF,
|
284
|
+
"esp": ANY_BUF,
|
285
|
+
"espnow": [
|
286
|
+
"from _espnow import ESPNowBase # type: ignore",
|
287
|
+
], # ESPNowBase is an undocumented base class
|
288
|
+
"framebuf": ANY_BUF,
|
289
|
+
"hashlib": ANY_BUF
|
290
|
+
+ [
|
291
|
+
"from _mpy_shed import _Hash",
|
292
|
+
],
|
293
|
+
"heapq": [
|
294
|
+
'_T = TypeVar("_T")',
|
295
|
+
],
|
296
|
+
"io": ANY_BUF
|
297
|
+
+ [
|
298
|
+
"from _mpy_shed import IOBase_mp",
|
299
|
+
],
|
300
|
+
"lcd160cr": ANY_BUF + ["from pyb import SPI"], # uses SPI
|
251
301
|
# "machine": ["from network import AbstractNIC"], # NIC is an abstract class, although not defined or used as such
|
252
|
-
"
|
302
|
+
"machine.ADC": [
|
303
|
+
"from .Pin import Pin",
|
304
|
+
"ATTN_0DB:int = ...",
|
305
|
+
],
|
306
|
+
"machine.I2C": ANY_BUF + ["from .Pin import Pin"], # uses Pin
|
307
|
+
"machine.I2S": ANY_BUF + ["from .Pin import Pin"],
|
308
|
+
"machine.PWM": ANY_BUF + ["from .Pin import Pin"],
|
309
|
+
"machine.RTC": [
|
310
|
+
"from machine import IDLE",
|
311
|
+
],
|
312
|
+
"machine.SD": ["from .Pin import Pin"], # uses Pin
|
313
|
+
"machine.SDCard": ["from .Pin import Pin"], # uses Pin
|
314
|
+
"machine.Signal": ["from .Pin import Pin"], # uses Pin
|
315
|
+
"machine.SPI": ANY_BUF + ["from .Pin import Pin"], # uses Pin
|
316
|
+
"machine.UART": ANY_BUF
|
317
|
+
+ [
|
318
|
+
"from machine import IDLE",
|
319
|
+
"from .Pin import Pin",
|
320
|
+
"from _mpy_shed import _IRQ",
|
321
|
+
], # uses Pin
|
322
|
+
"micropython": [
|
323
|
+
"from typing import Tuple, Final",
|
324
|
+
"from typing_extensions import TypeVar",
|
325
|
+
'_T = TypeVar("_T")',
|
326
|
+
'_F = TypeVar("_F", bound=Callable[..., Any])',
|
327
|
+
'Const_T = TypeVar("Const_T", int, float, str, bytes, Tuple) # constant',
|
328
|
+
],
|
329
|
+
"network": ["from typing import Protocol"], # for AbstractNIC
|
330
|
+
"neopixel": [
|
331
|
+
"from _mpy_shed import _NeoPixelBase",
|
332
|
+
], # for AbstractNIC
|
333
|
+
"os": [
|
334
|
+
"from _mpy_shed import uname_result",
|
335
|
+
],
|
336
|
+
"pyb": ANY_BUF
|
337
|
+
+ [
|
338
|
+
"from .UART import UART",
|
339
|
+
"from _mpy_shed import _OldAbstractBlockDev, _OldAbstractReadOnlyBlockDev, HID_Tuple",
|
340
|
+
],
|
341
|
+
"pyb.ADC": ANY_BUF + ["from .Pin import Pin", "from .Timer import Timer"],
|
342
|
+
"pyb.CAN": ANY_BUF,
|
343
|
+
"pyb.DAC": ANY_BUF
|
344
|
+
+ [
|
345
|
+
"from .Pin import Pin",
|
346
|
+
"from .Timer import Timer",
|
347
|
+
],
|
348
|
+
"pyb.ExtInt": ["from .Pin import Pin"],
|
349
|
+
"pyb.I2C": ANY_BUF,
|
350
|
+
"pyb.SPI": ANY_BUF,
|
351
|
+
"pyb.UART": ANY_BUF,
|
352
|
+
"pyb.USB_HID": ANY_BUF,
|
353
|
+
"pyb.USB_VCP": ANY_BUF,
|
354
|
+
"pyb.Switch": ["from .Pin import Pin"], # uses Pin
|
355
|
+
"pyb.Timer": [
|
356
|
+
"from abc import ABC, abstractmethod",
|
357
|
+
"from .Pin import Pin",
|
358
|
+
], # uses Pin
|
359
|
+
"_rp2.DMA": ["from _mpy_shed import _IRQ"],
|
360
|
+
"_rp2.PIO": ["from _mpy_shed import _IRQ"],
|
361
|
+
"rp2.PIO": ["from _mpy_shed import _IRQ"],
|
362
|
+
"rp2.DMA": ["from _mpy_shed import _IRQ"],
|
363
|
+
"socket": [
|
364
|
+
"from typing_extensions import TypeAlias",
|
365
|
+
"from _mpy_shed import AnyReadableBuf, AnyWritableBuf",
|
366
|
+
],
|
367
|
+
"ssl": [
|
368
|
+
"from typing_extensions import TypeAlias",
|
369
|
+
"from _mpy_shed import StrOrBytesPath",
|
370
|
+
"SSLSocket : TypeAlias = Incomplete",
|
371
|
+
],
|
372
|
+
"struct": ANY_BUF,
|
373
|
+
"time": [
|
374
|
+
"from typing_extensions import TypeAlias, TypeVar",
|
375
|
+
"_TicksMs: TypeAlias = int",
|
376
|
+
"_TicksUs: TypeAlias = int",
|
377
|
+
"_TicksCPU: TypeAlias = int",
|
378
|
+
'_Ticks = TypeVar("_Ticks", _TicksMs, _TicksUs, _TicksCPU, int)',
|
379
|
+
],
|
380
|
+
"uctypes": ANY_BUF
|
381
|
+
+ [
|
382
|
+
# "from typing_extensions import TypeAlias",
|
383
|
+
# "_ScalarProperty: TypeAlias = int",
|
384
|
+
# "_RecursiveProperty: TypeAlias = tuple[int, _property]",
|
385
|
+
# "_ArrayProperty: TypeAlias = tuple[int, int]",
|
386
|
+
# "_ArrayOfAggregateProperty: TypeAlias = tuple[int, int, _property]",
|
387
|
+
# "_PointerToAPrimitiveProperty: TypeAlias = tuple[int, int]",
|
388
|
+
# "_PointerToAaAggregateProperty: TypeAlias = tuple[int, _property]",
|
389
|
+
# "_BitfieldProperty: TypeAlias = int",
|
390
|
+
# "_property: TypeAlias = _ScalarProperty | _RecursiveProperty | _ArrayProperty | _ArrayOfAggregateProperty | _PointerToAPrimitiveProperty | _PointerToAaAggregateProperty | _BitfieldProperty",
|
391
|
+
# "_descriptor: TypeAlias = tuple[str, _property]",
|
392
|
+
],
|
253
393
|
}
|
254
394
|
|
255
395
|
|
256
396
|
PARAM_FIXES = [
|
257
397
|
Fix("\\*", "*"), # change weirdly written wildcards \* --> *
|
258
398
|
Fix(r"\**", "*"), # change weirdly written wildcards \* --> *
|
259
|
-
Fix(r"/*", "*"), # change weirdly written wildcards
|
260
|
-
Fix(r"
|
399
|
+
Fix(r"/*", "*"), # change weirdly written wildcards /* --> *
|
400
|
+
Fix(r"**", "*"), # change weirdly written wildcards ** --> *
|
401
|
+
# do not remove / , this indicates positional only notation before the ,/
|
402
|
+
# RE to insert missing , before /
|
403
|
+
Fix(from_=r"(\w+.*?[^,])\s*/", to=r"\1 ,/", is_re=True),
|
404
|
+
Fix(", ,/", ", /"), # remove double commas ( cause by the above fix) its a kludge
|
405
|
+
# Fix("]=None /)", "]=None, /)")
|
406
|
+
# ref: https://regex101.com/r/crVQfA/1
|
261
407
|
Fix("'param'", "param"), # loose notation in documentation
|
262
408
|
# illegal keywords
|
263
409
|
Fix(
|
@@ -278,7 +424,7 @@ PARAM_FIXES = [
|
|
278
424
|
# pyb.hid((buttons, x, y, z))
|
279
425
|
Fix(
|
280
426
|
"(buttons, x, y, z)",
|
281
|
-
"
|
427
|
+
"hid_tuple:HID_Tuple",
|
282
428
|
),
|
283
429
|
# esp v1.15.2 .. function:: getaddrinfo((hostname, port, lambda))
|
284
430
|
Fix(
|
@@ -340,10 +486,10 @@ PARAM_FIXES = [
|
|
340
486
|
"pins:Optional[Tuple]",
|
341
487
|
), #
|
342
488
|
## rp2.PIO.irq
|
343
|
-
Fix(
|
344
|
-
|
345
|
-
|
346
|
-
),
|
489
|
+
# Fix( No longer needed with py 3.10 notation
|
490
|
+
# "trigger=IRQ_SM0|IRQ_SM1|IRQ_SM2|IRQ_SM3",
|
491
|
+
# "trigger=IRQ_SM0",
|
492
|
+
# ),
|
347
493
|
# SPI.INIT - to fix error: Non-default argument follows default argument
|
348
494
|
# ✅ fixed in doc v1.18+
|
349
495
|
Fix(
|
@@ -484,25 +630,37 @@ PARAM_FIXES = [
|
|
484
630
|
),
|
485
631
|
]
|
486
632
|
|
633
|
+
# and some param fixes that require a regex
|
634
|
+
PARAM_RE_FIXES = [
|
635
|
+
Fix(
|
636
|
+
r"\[angle, time=0\]", "[angle], time=0", is_re=True
|
637
|
+
), # fix: method:: Servo.angle([angle, time=0])
|
638
|
+
Fix(
|
639
|
+
r"\[speed, time=0\]", "[speed], time=0", is_re=True
|
640
|
+
), # fix: .. method:: Servo.speed([speed, time=0])
|
641
|
+
Fix(
|
642
|
+
r"\[service_id, key=None, \*, \.\.\.\]", "[service_id], [key], *, ...", is_re=True
|
643
|
+
), # fix: network - AbstractNIC.connect
|
644
|
+
]
|
487
645
|
# List of classes and their parent classes that should be added to the class definition
|
488
646
|
CHILD_PARENT_CLASS = {
|
489
647
|
# machine
|
490
|
-
# SoftSPI is defined before SPI, so baseclass is not yet available - but in a .pyi that is OK
|
491
648
|
"SoftSPI": "SPI",
|
492
649
|
"SoftI2C": "I2C",
|
493
650
|
"Switch": "Pin",
|
494
651
|
"Signal": "Pin",
|
495
652
|
# uio # unclear regarding deprecation in python 3.12
|
496
|
-
# "IOBase": "IO", #
|
653
|
+
# "IOBase": "IO", # DOC_ME not in documentation
|
497
654
|
"TextIOWrapper": "IO", # "TextIOBase, TextIO", # based on Stdlib
|
498
655
|
"FileIO": "IO", # "RawIOBase, BinaryIO", # based on Stdlib
|
499
656
|
"StringIO": "IO", # "BufferedIOBase, BinaryIO", # based on Stdlib
|
657
|
+
"IOBase": "IOBase_mp", # "BufferedIOBase, BinaryIO", # based on Stdlib
|
500
658
|
"BytesIO": "IO", # "BufferedIOBase, BinaryIO", # based on Stdlib
|
501
|
-
"BufferedWriter": "
|
659
|
+
"BufferedWriter": "IOBase_mp", # DOC_ME: not in documentation # "BufferedWriter": "BufferedIOBase", # based on Stdlib
|
502
660
|
# uzlib
|
503
661
|
# "DecompIO": "IO", # https://docs.python.org/3/library/typing.html#other-concrete-types
|
504
662
|
# -------------------------------------------------------------------------------------
|
505
|
-
# network - AbstractNIC is
|
663
|
+
# network - AbstractNIC is defined in docstub network.pyi , but not actually used
|
506
664
|
# "WLAN": "AbstractNIC",
|
507
665
|
# "WLANWiPy": "AbstractNIC",
|
508
666
|
# "CC3K": "AbstractNIC",
|
@@ -517,17 +675,21 @@ CHILD_PARENT_CLASS = {
|
|
517
675
|
"namedtuple": "tuple",
|
518
676
|
"deque": "stdlib_deque",
|
519
677
|
# ESPNow
|
520
|
-
"ESPNow": "ESPNowBase,Iterator", # causes issue with mypy
|
678
|
+
"ESPNow": "ESPNowBase, Iterator", # causes issue with mypy
|
521
679
|
"AIOESPNow": "ESPNow",
|
522
680
|
# array
|
523
681
|
"array": "List",
|
682
|
+
# network
|
683
|
+
"AbstractNIC": "Protocol",
|
684
|
+
# neopixel
|
685
|
+
"NeoPixel": "_NeoPixelBase",
|
524
686
|
}
|
525
687
|
|
526
688
|
|
527
689
|
# TODO : implement the execution of this list during merge
|
528
|
-
# - this is a list of functions, classes methods and
|
690
|
+
# - this is a list of functions, classes methods and constants that are not detected at runtime, but are available and documented
|
529
691
|
# the standard merge only adds documentation to detected functions.
|
530
|
-
|
692
|
+
FORCE_NON_DETECTED = [
|
531
693
|
("btree", "Btree", ["esp32", "esp8266"]), # Is not detected runtime
|
532
694
|
("espnow", "ESPNow.peers_table", ["esp32"]), # Is not detected runtime
|
533
695
|
]
|