diff --git a/publish/micropython-v1_20_0-stm32-stubs/__builtins__.pyi b/publish/micropython-v1_20_0-stm32-stubs/__builtins__.pyi new file mode 100644 index 000000000..54df69e97 --- /dev/null +++ b/publish/micropython-v1_20_0-stm32-stubs/__builtins__.pyi @@ -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. + """ + ... diff --git a/publish/micropython-v1_20_0-stm32-stubs/package.json b/publish/micropython-v1_20_0-stm32-stubs/package.json index a55b72095..f73872a16 100644 --- a/publish/micropython-v1_20_0-stm32-stubs/package.json +++ b/publish/micropython-v1_20_0-stm32-stubs/package.json @@ -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": [ [ @@ -19,6 +19,6 @@ ] ], "description": "MicroPython stubs", - "hash": "c767ba8ab2c83bed2dad67eb68bc1e07b1c88e8c", - "stub_hash": "54f27af507742319632841fe043c75a79b692c95" + "hash": "f6bdcf9d770dc7c9994ddde5574de0b2e99faafc", + "stub_hash": "e2305d5ca15313f26fd39209bebfc3675217d437" } \ No newline at end of file diff --git a/publish/micropython-v1_20_0-stm32-stubs/pyproject.toml b/publish/micropython-v1_20_0-stm32-stubs/pyproject.toml index cd0462735..6a5ccb421 100644 --- a/publish/micropython-v1_20_0-stm32-stubs/pyproject.toml +++ b/publish/micropython-v1_20_0-stm32-stubs/pyproject.toml @@ -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"