Skip to content

Commit 580b42c

Browse files
committed
feat: Add modules to modulelist.txt
1 parent 69fbed6 commit 580b42c

File tree

10 files changed

+47
-26
lines changed

10 files changed

+47
-26
lines changed

data/micropython-lib.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,13 @@
22

33
# MicroPython now supplies SSL/TLS functionality in a new built-in `tls` # module.
44
tls
5+
6+
7+
# usb hid
8+
# https://github.com/micropython/micropython-lib/tree/50ed36fbeb919753bcc26ce13a8cffd7691d06ef/micropython/usb
9+
usb.device
10+
usb.device.hid
11+
usb.device.cdc
12+
usb.device.keyboard
13+
usb.device.midi
14+
usb.device.mouse
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# https://github.com/micropython/micropython/releases/tag/v1.23.0
2+
3+
4+
# all ports
5+
vfs
6+
tls
7+
8+
9+
10+
# stm32
11+
openamp
12+
13+
# webassembly
14+
js
15+
jsffi

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ repo-path = "./repos"
88

99
[tool.poetry]
1010
name = "micropython-stubber"
11-
version = "1.20.2"
11+
version = "1.20.3b1"
1212
description = "Tooling to create and maintain stubs for MicroPython"
1313
authors = ["Jos Verlinde <[email protected]>"]
1414
license = "MIT"

src/stubber/board/createstubs.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -838,6 +838,8 @@ def main():
838838
"interstate75",
839839
"io",
840840
"jpegdec",
841+
"js",
842+
"jsffi",
841843
"json",
842844
"lcd160cr",
843845
"lodepng",
@@ -863,6 +865,7 @@ def main():
863865
"network",
864866
"ntptime",
865867
"onewire",
868+
"openamp",
866869
"os",
867870
"pcf85063a",
868871
"picoexplorer",
@@ -941,6 +944,12 @@ def main():
941944
"ure",
942945
"urequests",
943946
"urllib/urequest",
947+
"usb/device",
948+
"usb/device/cdc",
949+
"usb/device/hid",
950+
"usb/device/keyboard",
951+
"usb/device/midi",
952+
"usb/device/mouse",
944953
"uselect",
945954
"usocket",
946955
"ussl",
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

src/stubber/board/createstubs_min.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ def read_path():
287287
def j():
288288
try:A=bytes('abc',encoding='utf8');B=j.__module__;return H
289289
except(k,I):return U
290-
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','json','lcd160cr','lodepng',w,'lsm6dsox','lv_colors','lv_utils','lvgl','lwip','machine','math','microWebSocket','microWebSrv','microWebTemplate',b,'mip','mip/__init__','mip/__main__','motor','mpu6500','mpu9250','neopixel','network','ntptime','onewire','os','pcf85063a','picoexplorer','picographics','picokeypad','picoscroll','picounicorn','picowireless','pimoroni','pimoroni_bus','pimoroni_i2c','plasma','platform','pyb',g,'pye','qrcode','queue','random','requests','requests/__init__','rp2','rtch','samd','select','servo','socket','ssd1306','ssh','ssl','stm','struct',v,'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','uos','uplatform','uqueue','urandom','ure','urequests','urllib/urequest','uselect','usocket','ussl','ustruct','usys','utelnetserver','utime','utimeq','uwebsocket','uzlib',C,'vfs','websocket','websocket_helper','wipy','writer','xpt2046','ymodem','zephyr','zlib'];F.collect();stubber.create_all_stubs()
290+
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',w,'lsm6dsox','lv_colors','lv_utils','lvgl','lwip','machine','math','microWebSocket','microWebSrv','microWebTemplate',b,'mip','mip/__init__','mip/__main__','motor','mpu6500','mpu9250','neopixel','network','ntptime','onewire','openamp','os','pcf85063a','picoexplorer','picographics','picokeypad','picoscroll','picounicorn','picowireless','pimoroni','pimoroni_bus','pimoroni_i2c','plasma','platform','pyb',g,'pye','qrcode','queue','random','requests','requests/__init__','rp2','rtch','samd','select','servo','socket','ssd1306','ssh','ssl','stm','struct',v,'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','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','websocket','websocket_helper','wipy','writer','xpt2046','ymodem','zephyr','zlib'];F.collect();stubber.create_all_stubs()
291291
if __name__=='__main__'or j():
292292
if not A4('no_auto_stubber.txt'):
293293
try:F.threshold(4*1024);F.enable()
152 Bytes
Binary file not shown.

src/stubber/board/modulelist.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,8 @@ inisetup
113113
interstate75
114114
io
115115
jpegdec
116+
js
117+
jsffi
116118
json
117119
lcd160cr
118120
lodepng
@@ -138,6 +140,7 @@ neopixel
138140
network
139141
ntptime
140142
onewire
143+
openamp
141144
os
142145
pcf85063a
143146
picoexplorer
@@ -216,6 +219,12 @@ urandom
216219
ure
217220
urequests
218221
urllib/urequest
222+
usb/device
223+
usb/device/cdc
224+
usb/device/hid
225+
usb/device/keyboard
226+
usb/device/midi
227+
usb/device/mouse
219228
uselect
220229
usocket
221230
ussl

src/stubber/update_module_list.py

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
- board/createstubs.py
1313
1414
- TODO: remove the frozen modules from this list
15-
- TODO: bump patch number if there are actual changes
16-
1715
"""
1816

1917
from pathlib import Path
@@ -32,7 +30,7 @@ def read_modules(path: Optional[Path] = None) -> Set[str]:
3230
"""
3331
path = Path(path or "./data")
3432
assert path
35-
all_modules = set()
33+
all_modules: Set[str] = set()
3634
for file in path.glob("*.txt"):
3735
log.debug(f"processing: {file.name}")
3836
with file.open("r") as f:
@@ -45,27 +43,7 @@ def read_modules(path: Optional[Path] = None) -> Set[str]:
4543
file_mods = [m for m in file_mods if not m.endswith("_test")]
4644
all_modules = set(all_modules | set(file_mods))
4745
log.trace(">" * 40)
48-
49-
return all_modules
50-
51-
52-
# def wrapped(modules: Union[Set, List]) -> str:
53-
# "wrap code line at spaces"
54-
# long_line = str(modules)
55-
# _wrapped = " self.modules = "
56-
# IDENT = len(_wrapped)
57-
# MAX_WIDTH = 135
58-
59-
# # find seperator
60-
# while len(long_line) > MAX_WIDTH:
61-
# p1 = long_line.find("', ", MAX_WIDTH)
62-
# # drop space
63-
# p1 += 3
64-
# short = long_line[0 : p1 - 1]
65-
# _wrapped += short + "\n" + " " * IDENT
66-
# long_line = long_line[p1 - 1 :]
67-
# _wrapped += long_line
68-
# return _wrapped
46+
return {m.replace(".", "/") for m in all_modules}
6947

7048

7149
def update_module_list():

0 commit comments

Comments
 (0)