micropython-stubber 1.25.0rc5__py3-none-any.whl → 1.25.1__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.25.0rc5.dist-info → micropython_stubber-1.25.1.dist-info}/METADATA +2 -3
- {micropython_stubber-1.25.0rc5.dist-info → micropython_stubber-1.25.1.dist-info}/RECORD +20 -20
- {micropython_stubber-1.25.0rc5.dist-info → micropython_stubber-1.25.1.dist-info}/WHEEL +1 -1
- stubber/__init__.py +1 -1
- stubber/board/createstubs.py +1 -1
- stubber/board/createstubs_db.py +2 -2
- stubber/board/createstubs_db_min.py +1 -1
- stubber/board/createstubs_db_mpy.mpy +0 -0
- stubber/board/createstubs_mem.py +2 -2
- stubber/board/createstubs_mem_min.py +1 -1
- stubber/board/createstubs_mem_mpy.mpy +0 -0
- stubber/board/createstubs_min.py +1 -1
- stubber/board/createstubs_mpy.mpy +0 -0
- stubber/commands/cli.py +4 -3
- stubber/commands/get_docstubs_cmd.py +0 -1
- stubber/rst/lookup.py +6 -0
- stubber/rst/reader.py +15 -6
- stubber/stubs_from_docs.py +28 -15
- {micropython_stubber-1.25.0rc5.dist-info → micropython_stubber-1.25.1.dist-info}/LICENSE +0 -0
- {micropython_stubber-1.25.0rc5.dist-info → micropython_stubber-1.25.1.dist-info}/entry_points.txt +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: micropython-stubber
|
3
|
-
Version: 1.25.
|
3
|
+
Version: 1.25.1
|
4
4
|
Summary: Tooling to create and maintain stubs for MicroPython
|
5
5
|
License: MIT
|
6
6
|
Keywords: MicroPython,stubs,vscode,pyright,linting,static type check
|
@@ -25,13 +25,12 @@ Requires-Dist: executing (>=2.0.1,<3.0.0)
|
|
25
25
|
Requires-Dist: importlib-metadata (>=1,<9) ; python_version < "3.8"
|
26
26
|
Requires-Dist: libcst (>=1.1.0,<2.0.0)
|
27
27
|
Requires-Dist: loguru (>=0.6,<0.8)
|
28
|
-
Requires-Dist: mpflash (
|
28
|
+
Requires-Dist: mpflash (==1.25.0.rc3)
|
29
29
|
Requires-Dist: mpremote (>=1.25.0)
|
30
30
|
Requires-Dist: mpy-cross (>=1.25.0.post2,<2.0.0)
|
31
31
|
Requires-Dist: mypy (>=1.10)
|
32
32
|
Requires-Dist: mypy-gitlab-code-quality (>=1.1.0,<2.0.0)
|
33
33
|
Requires-Dist: packaging (>=24.2,<25.0)
|
34
|
-
Requires-Dist: poetry (>=2.0.1,<3.0.0)
|
35
34
|
Requires-Dist: pydeps (==3.0.1)
|
36
35
|
Requires-Dist: pygithub (>=2.1.1,<3.0.0)
|
37
36
|
Requires-Dist: pypi-simple (>=1.0.0,<2.0.0)
|
@@ -1,18 +1,18 @@
|
|
1
|
-
stubber/__init__.py,sha256=
|
1
|
+
stubber/__init__.py,sha256=WLF-UWMZrfYEGB3W8ibf4lGlq0ttLDpiiFVq8cSxvxY,49
|
2
2
|
stubber/board/board_info.csv,sha256=K2VSmfR013fN-oJWkQUmiQ19w09dVwJHDquPy6QmMhY,8627
|
3
3
|
stubber/board/boot.py,sha256=XjWlKErU5nI1HJSugXIP_3hlwgRQboE6sJrpcbSygnk,1120
|
4
|
-
stubber/board/createstubs.py,sha256=
|
5
|
-
stubber/board/createstubs_db.py,sha256=
|
6
|
-
stubber/board/createstubs_db_min.py,sha256=
|
7
|
-
stubber/board/createstubs_db_mpy.mpy,sha256=
|
4
|
+
stubber/board/createstubs.py,sha256=Qw1IY4pYxVDPJbsBXqdLBhMTioF9wFO2BrJENPkRpC8,34715
|
5
|
+
stubber/board/createstubs_db.py,sha256=S89PvG_YDSLAUCm9KELLIMhDOvyo75xGxp2epS7vRbg,31621
|
6
|
+
stubber/board/createstubs_db_min.py,sha256=CSmu7hfR94ehL4hQRNDwSO1WjSVjibKiTclpO2snG1g,12189
|
7
|
+
stubber/board/createstubs_db_mpy.mpy,sha256=sNm2FjoQOxoYqNzfbHYHM7tWd_-KUdRc_yEbPw2GyKY,10148
|
8
8
|
stubber/board/createstubs_lvgl.py,sha256=CTe7eq1ACRK_JJxavaqDD8znn29nSWJiHHTZ_ps6EhM,27217
|
9
9
|
stubber/board/createstubs_lvgl_min.py,sha256=jLkWYmeboI2A8feMC7pT7cYWttLejQTuX7WAEZCylhw,27207
|
10
10
|
stubber/board/createstubs_lvgl_mpy.mpy,sha256=ex-nlq2V5e8anQBJvRWEEc-FzU7nlwg5NSrZ8vOadIA,9267
|
11
|
-
stubber/board/createstubs_mem.py,sha256=
|
12
|
-
stubber/board/createstubs_mem_min.py,sha256=
|
13
|
-
stubber/board/createstubs_mem_mpy.mpy,sha256=
|
14
|
-
stubber/board/createstubs_min.py,sha256=
|
15
|
-
stubber/board/createstubs_mpy.mpy,sha256=
|
11
|
+
stubber/board/createstubs_mem.py,sha256=PFsejWB8MWpwTIAjcZ-swVQqzYJuZMZScUN_I55k_Z4,29939
|
12
|
+
stubber/board/createstubs_mem_min.py,sha256=BSoxt3VRNVYmp6AYlzbq6QAcwC7-H6d-HB6s1tW0wYU,11719
|
13
|
+
stubber/board/createstubs_mem_mpy.mpy,sha256=P7j5AWVSsIjYX--idRInBduHOB_a-vGiquRHBA5KLxI,9735
|
14
|
+
stubber/board/createstubs_min.py,sha256=bJgpv8RQlgqMOLlt5ijoGT0E-zIPbvw_snxymo_QR6o,14463
|
15
|
+
stubber/board/createstubs_mpy.mpy,sha256=6_z65aos0Z-SZkK8P0ByWU9fEC3CkMxChG_xM5cATAg,13071
|
16
16
|
stubber/board/fw_info.py,sha256=6AQbN3jtQgllqWQYl4e-63KeEtV08EXk8_JnM6XBkvo,4554
|
17
17
|
stubber/board/info.py,sha256=b7SOPZHVsVhaayKCwVkFZlYu0BW-UFI7LuG1Eop9480,5629
|
18
18
|
stubber/board/main.py,sha256=f6V3tdt6sPZVLuwemT-NLuK9GySfW2c2J6PJMOOWQQw,413
|
@@ -37,12 +37,12 @@ stubber/codemod/utils.py,sha256=3hk7pwyS4KZxewrWLwbOrdA5ympbum-kfL0ZN-M7rlo,2459
|
|
37
37
|
stubber/codemod/visitors/type_helpers.py,sha256=F7Xc_f7yp5szg18bf90oew2SpfZlDKK8EdZ3CcvuL2g,11027
|
38
38
|
stubber/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
39
39
|
stubber/commands/build_cmd.py,sha256=Zseci4EHxJuiiy7YS-ucmMokDrVLe4j6fPs-PSbwq1k,2813
|
40
|
-
stubber/commands/cli.py,sha256=
|
40
|
+
stubber/commands/cli.py,sha256=Npt72L598JcQlNevymOT7S0huvQbx8_-s8LSUxR3AaU,1574
|
41
41
|
stubber/commands/clone_cmd.py,sha256=WZnQIqsnkdddXz32riLUw9zhNXHAgk_LODnwbtQlpbo,2714
|
42
42
|
stubber/commands/config_cmd.py,sha256=e8heX27MXfazLxMVtgjK4dsLCWhsoCfdeYGVoH3rqtA,1211
|
43
43
|
stubber/commands/enrich_folder_cmd.py,sha256=LDdSAfDlsAQAddYT9Rp3bFiF6maqA457AmMyWNXdXtg,2236
|
44
44
|
stubber/commands/get_core_cmd.py,sha256=PSjBJz4F8FlT3c_4E-XFo6Xw0dRQzQl0TxsxCoLwIPY,2324
|
45
|
-
stubber/commands/get_docstubs_cmd.py,sha256=
|
45
|
+
stubber/commands/get_docstubs_cmd.py,sha256=lZ7oaixp1jx0OYjeIdCW0ov-qBozaXqZ0zbccCly9ww,5165
|
46
46
|
stubber/commands/get_frozen_cmd.py,sha256=gutYwHdz7XO8CLxutEFiQOUGgKInrKViEKvV8I5eVJU,4253
|
47
47
|
stubber/commands/get_mcu_cmd.py,sha256=CTQVIoGqBx6gwUp1aH1gOysVFEZbeqMvpPb2WJA4EVQ,2807
|
48
48
|
stubber/commands/merge_cmd.py,sha256=0tKgvBiYjleXac0z5vDMxzvAgiZQUF0DafPqoIueKS8,1641
|
@@ -81,13 +81,13 @@ stubber/publish/pypi.py,sha256=LdvwLfjkkSFBTI4MHyl7Ko_ZWn1SflWxJ9uo2mtPKtc,1272
|
|
81
81
|
stubber/publish/stubpackage.py,sha256=BOfHqlPNP45cKLI65VANAdO0wO1YN9F1Ks-JbEHUoKQ,47491
|
82
82
|
stubber/rst/__init__.py,sha256=5VcbDCotIICa2xnJDs_gw2sFXpjjGOZZbwCrNKXy1OE,293
|
83
83
|
stubber/rst/classsort.py,sha256=-Uji6LzBbX6voKmiXSuexJXyoQ3fmSDQ7Fuz4j1Kk8E,2655
|
84
|
-
stubber/rst/lookup.py,sha256=
|
84
|
+
stubber/rst/lookup.py,sha256=2s3ZT1pNKddL9cUrIsHzP5yGBi0sIYBikYoMlP9kbKY,26132
|
85
85
|
stubber/rst/output_dict.py,sha256=cpBXRtUD-uh0EgjWIBiRrMLBmIAEXjoJFSOAg-qJQiU,14755
|
86
|
-
stubber/rst/reader.py,sha256=
|
86
|
+
stubber/rst/reader.py,sha256=kCjQpL4QbVyChUQcXO_T1rwaZjE3WUcq9UksQmRq0U8,35408
|
87
87
|
stubber/rst/report_return.py,sha256=p0JfJs_WTWTtRZREcQeqUgDW-_TP2VuuX7k7-c49y5E,3024
|
88
88
|
stubber/rst/rst_utils.py,sha256=-F6J09-WQBzI5419ItzOlm4gUKxF4BMru2OyXx-M6ko,18314
|
89
89
|
stubber/stubber.py,sha256=GxLfHIzDyfFvgiTqMj9DB3tq7I3EnEUNbdoCtYr8gHM,1640
|
90
|
-
stubber/stubs_from_docs.py,sha256=
|
90
|
+
stubber/stubs_from_docs.py,sha256=Z8BFBuUQ1su4MUZTXiHRC4y80c8m9EDHTE7FxD2KUco,3700
|
91
91
|
stubber/tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
92
92
|
stubber/tools/manifestfile.py,sha256=YzPMc7PNciLOBpoc4xgUZ38t88C1C8b4fjG0qfWd6K8,25749
|
93
93
|
stubber/tools/readme.md,sha256=uI0higcFUtjSLKobn7NK2LoqZ0BqcbftXSDgNjbsnzo,284
|
@@ -103,8 +103,8 @@ stubber/utils/repos.py,sha256=kI2VcbKS1sNzFRr8mUDMdKYOYRvxpFIwy7JRyQ5Nxuk,7147
|
|
103
103
|
stubber/utils/stubmaker.py,sha256=gB6n41o13WcShnSzc_lyoTFplotaPSQ3hekoLJvd2BU,5236
|
104
104
|
stubber/utils/typed_config_toml.py,sha256=ZR7eo-whyL4nhFXj6xs7E121sLuE-ivlUDevII4K2xg,2653
|
105
105
|
stubber/variants.py,sha256=NnwUP-aiGUPAn15BeRRFcBWQUOzAFFnN2oL4u9zio-s,3792
|
106
|
-
micropython_stubber-1.25.
|
107
|
-
micropython_stubber-1.25.
|
108
|
-
micropython_stubber-1.25.
|
109
|
-
micropython_stubber-1.25.
|
110
|
-
micropython_stubber-1.25.
|
106
|
+
micropython_stubber-1.25.1.dist-info/entry_points.txt,sha256=JoR8NWh8t6pbDyn0WOMCIfRfDQAOGxqbOgJWuxv3Cxw,116
|
107
|
+
micropython_stubber-1.25.1.dist-info/LICENSE,sha256=Fx9qrL45ayRXgH6QzttboqZEjKXms0w1t_b_nkOqYCU,1572
|
108
|
+
micropython_stubber-1.25.1.dist-info/METADATA,sha256=WedY9LNxDQqQ-bP6Z_MBI3b3i7rzFPkmzjyhuapdgUg,19949
|
109
|
+
micropython_stubber-1.25.1.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
110
|
+
micropython_stubber-1.25.1.dist-info/RECORD,,
|
stubber/__init__.py
CHANGED
stubber/board/createstubs.py
CHANGED
stubber/board/createstubs_db.py
CHANGED
@@ -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.25.1
|
22
22
|
"""
|
23
23
|
|
24
24
|
# Copyright (c) 2019-2024 Jos Verlinde
|
@@ -43,7 +43,7 @@ try:
|
|
43
43
|
except ImportError:
|
44
44
|
from ucollections import OrderedDict # type: ignore
|
45
45
|
|
46
|
-
__version__ = "v1.25.
|
46
|
+
__version__ = "v1.25.1"
|
47
47
|
ENOENT = 2 # on most ports
|
48
48
|
ENOMESSAGE = 44 # on pyscript
|
49
49
|
_MAX_CLASS_LEVEL = 2 # Max class nesting
|
Binary file
|
stubber/board/createstubs_mem.py
CHANGED
@@ -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.25.1
|
13
13
|
"""
|
14
14
|
|
15
15
|
# Copyright (c) 2019-2024 Jos Verlinde
|
@@ -34,7 +34,7 @@ try:
|
|
34
34
|
except ImportError:
|
35
35
|
from ucollections import OrderedDict # type: ignore
|
36
36
|
|
37
|
-
__version__ = "v1.25.
|
37
|
+
__version__ = "v1.25.1"
|
38
38
|
ENOENT = 2 # on most ports
|
39
39
|
ENOMESSAGE = 44 # on pyscript
|
40
40
|
_MAX_CLASS_LEVEL = 2 # Max class nesting
|
Binary file
|
stubber/board/createstubs_min.py
CHANGED
Binary file
|
stubber/commands/cli.py
CHANGED
@@ -4,16 +4,17 @@ command line interface - main group
|
|
4
4
|
|
5
5
|
import sys
|
6
6
|
|
7
|
-
from mpflash.vendor.click_aliases import ClickAliasedGroup
|
8
7
|
import rich_click as click
|
9
|
-
from mpflash.logger import log
|
8
|
+
from mpflash.logger import log
|
9
|
+
from mpflash.logger import set_loglevel as mpf_set_loglevel
|
10
|
+
from mpflash.vendor.click_aliases import ClickAliasedGroup
|
11
|
+
|
10
12
|
from stubber import __version__
|
11
13
|
|
12
14
|
|
13
15
|
@click.group(chain=True, cls=ClickAliasedGroup)
|
14
16
|
@click.version_option(package_name="micropython-stubber", prog_name="micropython-stubber✏️ ")
|
15
17
|
@click.option(
|
16
|
-
"-V",
|
17
18
|
"-V",
|
18
19
|
"--verbose",
|
19
20
|
count=True,
|
stubber/rst/lookup.py
CHANGED
@@ -445,6 +445,12 @@ PARAM_FIXES = [
|
|
445
445
|
"(ip, subnet, gateway, dns):Optional[Any]=None",
|
446
446
|
"configtuple: Optional[Tuple]",
|
447
447
|
),
|
448
|
+
# network.ipconfig
|
449
|
+
Fix(
|
450
|
+
"param=value",
|
451
|
+
"param:Optional[str]=None",
|
452
|
+
name="ipconfig",
|
453
|
+
),
|
448
454
|
# framebuffer
|
449
455
|
# unresolvable parameter defaults # FrameBuffer: def __init__
|
450
456
|
Fix(
|
stubber/rst/reader.py
CHANGED
@@ -69,10 +69,19 @@ from typing import List, Optional, Tuple
|
|
69
69
|
|
70
70
|
from mpflash.logger import log
|
71
71
|
from mpflash.versions import V_PREVIEW
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
72
|
+
|
73
|
+
from stubber.rst import (
|
74
|
+
CHILD_PARENT_CLASS,
|
75
|
+
MODULE_GLUE,
|
76
|
+
PARAM_FIXES,
|
77
|
+
PARAM_RE_FIXES,
|
78
|
+
RST_DOC_FIXES,
|
79
|
+
TYPING_IMPORT,
|
80
|
+
ClassSourceDict,
|
81
|
+
FunctionSourceDict,
|
82
|
+
ModuleSourceDict,
|
83
|
+
return_type_from_context,
|
84
|
+
)
|
76
85
|
from stubber.rst.lookup import Fix
|
77
86
|
from stubber.utils.config import CONFIG
|
78
87
|
|
@@ -496,8 +505,8 @@ class RSTParser(RSTReader):
|
|
496
505
|
self.read_file(file_path)
|
497
506
|
self.parse()
|
498
507
|
# reset this file to done
|
499
|
-
self.rst_text = []
|
500
|
-
self.line_no = 1
|
508
|
+
# self.rst_text = []
|
509
|
+
# self.line_no = 1
|
501
510
|
|
502
511
|
def parse_module(self):
|
503
512
|
"parse a module tag and set the module's docstring"
|
stubber/stubs_from_docs.py
CHANGED
@@ -78,23 +78,11 @@ def get_rst_sources(rst_path: Path, pattern: str) -> List[Path]:
|
|
78
78
|
def make_docstubs(
|
79
79
|
dst_path: Path, v_tag: str, release: str, suffix: str, files: List[Path], clean_rst: bool
|
80
80
|
):
|
81
|
-
"""Create the
|
81
|
+
"""Create docstubs from the list of rst files"""
|
82
82
|
|
83
83
|
for file in files:
|
84
|
-
|
85
|
-
|
86
|
-
reader.source_release = release
|
87
|
-
log.debug(f"Reading: {file}")
|
88
|
-
reader.read_file(file)
|
89
|
-
reader.parse()
|
90
|
-
# Destination = "module.__init__.pyi"
|
91
|
-
if "." in file.stem:
|
92
|
-
target = dst_path / f"{(file.stem).replace('.', '/')}{suffix}"
|
93
|
-
else:
|
94
|
-
target = dst_path / file.stem / f"__init__{suffix}"
|
95
|
-
# fname = (dst_path / file.name).with_suffix(suffix)
|
96
|
-
reader.write_file(target)
|
97
|
-
del reader
|
84
|
+
make_docstub(file, dst_path, v_tag, release, suffix, clean_rst)
|
85
|
+
|
98
86
|
for name in U_MODULES:
|
99
87
|
# create a file "umodule.pyi" for each module
|
100
88
|
# and add a line : from module import *
|
@@ -107,3 +95,28 @@ def make_docstubs(
|
|
107
95
|
f.write("# Allow the use of micro-module notation \n\n")
|
108
96
|
f.write(f"from {name} import * # type: ignore\n")
|
109
97
|
f.flush()
|
98
|
+
|
99
|
+
|
100
|
+
def make_docstub(
|
101
|
+
file: Path,
|
102
|
+
dst_path: Path,
|
103
|
+
v_tag: str,
|
104
|
+
release: str,
|
105
|
+
suffix: str,
|
106
|
+
clean_rst: bool,
|
107
|
+
):
|
108
|
+
"""Create a docstub from a single rst file"""
|
109
|
+
reader = RSTWriter(v_tag)
|
110
|
+
reader.clean_rst = clean_rst
|
111
|
+
reader.source_release = release
|
112
|
+
log.debug(f"Reading: {file}")
|
113
|
+
reader.read_file(file)
|
114
|
+
reader.parse()
|
115
|
+
|
116
|
+
if "." in file.stem:
|
117
|
+
target = dst_path / f"{(file.stem).replace('.', '/')}{suffix}"
|
118
|
+
else:
|
119
|
+
target = dst_path / file.stem / f"__init__{suffix}"
|
120
|
+
|
121
|
+
reader.write_file(target)
|
122
|
+
del reader
|
File without changes
|
{micropython_stubber-1.25.0rc5.dist-info → micropython_stubber-1.25.1.dist-info}/entry_points.txt
RENAMED
File without changes
|