You've already forked uiflow-micropython
mirror of
https://github.com/m5stack/uiflow-micropython.git
synced 2026-05-20 10:39:27 -07:00
e14a2a0b3e
Signed-off-by: tinyu.zhao@gmail.com <tinyu.zhao@gmail.com>
18 lines
487 B
Python
18 lines
487 B
Python
# SPDX-FileCopyrightText: 2024 M5Stack Technology CO LTD
|
|
#
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
from pathlib import Path
|
|
import sys, shutil, subprocess
|
|
|
|
r = Path(sys.argv[1]) if len(sys.argv) > 1 else Path(__file__).resolve().parent.parent
|
|
s = r / "stubs"
|
|
l = r / "m5stack/libs"
|
|
|
|
if s.exists():
|
|
shutil.rmtree(s)
|
|
s.mkdir()
|
|
|
|
for p in sorted(l.iterdir()):
|
|
if p.is_dir() and not p.name.startswith("__"):
|
|
subprocess.run(["pyright", "--createstub", f"m5stack.libs.{p.name}"], cwd=r) |