Skip to content

Commit

Permalink
fix missing packages in stm32 pyproject.toml
Browse files Browse the repository at this point in the history
Signed-off-by: Jos Verlinde <jos_verlinde@hotmail.com>
  • Loading branch information
Josverl committed Oct 15, 2023
1 parent 656e797 commit 9e78b51
Show file tree
Hide file tree
Showing 3 changed files with 93 additions and 4 deletions.
27 changes: 27 additions & 0 deletions publish/micropython-v1_20_0-stm32-stubs/__builtins__.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# allows for type checking of additional builtins by pyright

from typing import Tuple, TypeVar

Const_T = TypeVar("Const_T", int, float, str, bytes, Tuple) # constant

def const(expr: Const_T) -> Const_T:
"""
Used to declare that the expression is a constant so that the compiler can
optimise it. The use of this function should be as follows::
from micropython import const
CONST_X = const(123)
CONST_Y = const(2 * CONST_X + 1)
Constants declared this way are still accessible as global variables from
outside the module they are declared in. On the other hand, if a constant
begins with an underscore then it is hidden, it is not available as a global
variable, and does not take up any memory during execution.
This `const` function is recognised directly by the MicroPython parser and is
provided as part of the :mod:`micropython` module mainly so that scripts can be
written which run under both CPython and MicroPython, by following the above
pattern.
"""
...
6 changes: 3 additions & 3 deletions publish/micropython-v1_20_0-stm32-stubs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "micropython-stm32-stubs",
"mpy_version": "1.20.0",
"publish": true,
"pkg_version": "1.20.0.post3",
"pkg_version": "1.20.0.post4",
"path": "micropython-v1_20_0-stm32-stubs",
"stub_sources": [
[
Expand All @@ -19,6 +19,6 @@
]
],
"description": "MicroPython stubs",
"hash": "c767ba8ab2c83bed2dad67eb68bc1e07b1c88e8c",
"stub_hash": "54f27af507742319632841fe043c75a79b692c95"
"hash": "f6bdcf9d770dc7c9994ddde5574de0b2e99faafc",
"stub_hash": "e2305d5ca15313f26fd39209bebfc3675217d437"
}
64 changes: 63 additions & 1 deletion publish/micropython-v1_20_0-stm32-stubs/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,69 @@ classifiers = [
"Topic :: Text Editors :: Integrated Development Environments (IDE)",
"Topic :: Software Development :: Build Tools",
]
packages = []
packages = [
{ include = "__builtins__.pyi" },
{ include = "_onewire.pyi" },
{ include = "_thread.pyi" },
{ include = "_uasyncio.pyi" },
{ include = "array.pyi" },
{ include = "binascii.pyi" },
{ include = "cmath.pyi" },
{ include = "collections.pyi" },
{ include = "dht.pyi" },
{ include = "errno.pyi" },
{ include = "framebuf.pyi" },
{ include = "gc.pyi" },
{ include = "hashlib.pyi" },
{ include = "heapq.pyi" },
{ include = "io.pyi" },
{ include = "json.pyi" },
{ include = "lcd160cr.pyi" },
{ include = "machine.pyi" },
{ include = "math.pyi" },
{ include = "micropython.pyi" },
{ include = "network.pyi" },
{ include = "onewire.pyi" },
{ include = "os.pyi" },
{ include = "platform.pyi" },
{ include = "pyb.pyi" },
{ include = "random.pyi" },
{ include = "select.pyi" },
{ include = "socket.pyi" },
{ include = "stm.pyi" },
{ include = "struct.pyi" },
{ include = "sys.pyi" },
{ include = "time.pyi" },
{ include = "uarray.pyi" },
{ include = "uasyncio/__init__.pyi" },
{ include = "uasyncio/core.pyi" },
{ include = "uasyncio/event.pyi" },
{ include = "uasyncio/funcs.pyi" },
{ include = "uasyncio/lock.pyi" },
{ include = "uasyncio/stream.pyi" },
{ include = "uasyncio/task.pyi" },
{ include = "ubinascii.pyi" },
{ include = "ucollections.pyi" },
{ include = "uctypes.pyi" },
{ include = "uerrno.pyi" },
{ include = "uhashlib.pyi" },
{ include = "uheapq.pyi" },
{ include = "uio.pyi" },
{ include = "ujson.pyi" },
{ include = "umachine.pyi" },
{ include = "uos.pyi" },
{ include = "uplatform.pyi" },
{ include = "urandom.pyi" },
{ include = "ure.pyi" },
{ include = "uselect.pyi" },
{ include = "usocket.pyi" },
{ include = "ustruct.pyi" },
{ include = "usys.pyi" },
{ include = "utime.pyi" },
{ include = "utimeq.pyi" },
{ include = "uzlib.pyi" },
{ include = "zlib.pyi" },
]

[tool.poetry.dependencies]
python = "^3.8"
Expand Down

0 comments on commit 9e78b51

Please sign in to comment.