-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Published to PyPi micropython-stm32-pybv11-stubs 1.21.0.post1
Signed-off-by: Jos Verlinde <jos_verlinde@hotmail.com>
- Loading branch information
Showing
325 changed files
with
40,314 additions
and
4 deletions.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
publish/micropython-v1_20_0-stm32-pybv11-stubs/__builtins__.pyi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. | ||
""" | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
MIT License | ||
|
||
Copyright (c) 2022 Jos Verlinde | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# micropython-stm32-pybv11-stubs | ||
|
||
|
||
This is a stub-only package for MicroPython. | ||
It is intended to be installed in a projects virtual environment to allow static type checkers and intellisense features to be used while writing Micropython code. | ||
|
||
The version of this package is alligned the the version of the MicroPython firmware. | ||
- Major, Minor and Patch levels are alligned to the same version as the firmware. | ||
- The post release level is used to publish new releases of the stubs. | ||
|
||
For `Micropython 1.17` the stubs are published as `1.17.post1` ... `1.17.post2` | ||
for `Micropython 1.18` the stubs are published as `1.18.post1` ... `1.18.post2` | ||
|
||
To install the latest stubs: | ||
`pip install -I micropython-<port>-stubs` where port is the port of the MicroPython firmware. | ||
|
||
To install the stubs for an older version, such as MicroPython 1.17: | ||
`pip install micropython-stm32-stubs==1.17.*` which will install the last post release of the stubs for MicroPython 1.17. | ||
|
||
|
||
As the creation of the stubs, and merging of the different types is still going though improvements, the stub packages are marked as Beta. | ||
To upgrade stubs to the latest stubs for a specific version use `pip install micropython-stm32-stubs==1.17.* --upgrade` | ||
|
||
If you have suggestions or find any issues with the stubs, please report them in the [MicroPython-stubs Discussions](https://github.com/Josverl/micropython-stubs/discussions) | ||
|
||
For an overview of Micropython Stubs please see: https://micropython-stubs.readthedocs.io/en/main/ | ||
* List of all stubs : https://micropython-stubs.readthedocs.io/en/main/firmware_grp.html | ||
|
||
Included stubs: | ||
* Merged stubs from `stubs/micropython-v1_21_0-stm32-pybv11-merged` | ||
* Frozen stubs from `stubs/micropython-v1_21_0-frozen/stm32/GENERIC` | ||
* Core stubs from `stubs/micropython-core` | ||
|
||
|
||
origin | Family | Port | Board | Version | ||
-------|--------|------|-------|-------- | ||
Documentation | micropython | - | - | v1.21.0 | ||
Core | micropython | stm32 | - | v1.21.0 |
27 changes: 27 additions & 0 deletions
27
publish/micropython-v1_21_0-stm32-pybv11-stubs/__builtins__.pyi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. | ||
""" | ||
... |
11 changes: 11 additions & 0 deletions
11
publish/micropython-v1_21_0-stm32-pybv11-stubs/_asyncio.pyi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
from _typeshed import Incomplete as Incomplete | ||
|
||
class TaskQueue: | ||
def push(self, *args, **kwargs) -> Incomplete: ... | ||
def peek(self, *args, **kwargs) -> Incomplete: ... | ||
def remove(self, *args, **kwargs) -> Incomplete: ... | ||
def pop(self, *args, **kwargs) -> Incomplete: ... | ||
def __init__(self, *argv, **kwargs) -> None: ... | ||
|
||
class Task: | ||
def __init__(self, *argv, **kwargs) -> None: ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
from _typeshed import Incomplete as Incomplete | ||
|
||
def reset(*args, **kwargs) -> Incomplete: ... | ||
def writebyte(*args, **kwargs) -> Incomplete: ... | ||
def writebit(*args, **kwargs) -> Incomplete: ... | ||
def crc8(*args, **kwargs) -> Incomplete: ... | ||
def readbyte(*args, **kwargs) -> Incomplete: ... | ||
def readbit(*args, **kwargs) -> Incomplete: ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
""" | ||
Efficient arrays of numeric data. | ||
MicroPython module: https://docs.micropython.org/en/v1.21.0/library/array.html | ||
CPython module: :mod:`python:array` https://docs.python.org/3/library/array.html . | ||
Supported format codes: ``b``, ``B``, ``h``, ``H``, ``i``, ``I``, ``l``, | ||
``L``, ``q``, ``Q``, ``f``, ``d`` (the latter 2 depending on the | ||
floating-point support). | ||
""" | ||
from _typeshed import Incomplete, Incomplete as Incomplete | ||
from typing import Any, List, Optional | ||
|
||
class array: | ||
""" | ||
Create array with elements of given type. Initial contents of the | ||
array are given by *iterable*. If it is not provided, an empty | ||
array is created. | ||
""" | ||
|
||
def extend(self, iterable) -> Incomplete: | ||
""" | ||
Append new elements as contained in *iterable* to the end of | ||
array, growing it. | ||
""" | ||
... | ||
def append(self, val) -> Incomplete: | ||
""" | ||
Append new element *val* to the end of array, growing it. | ||
""" | ||
... | ||
def __init__(self, typecode, iterable: Optional[Any] = None) -> None: ... |
7 changes: 7 additions & 0 deletions
7
publish/micropython-v1_21_0-stm32-pybv11-stubs/asyncio/__init__.pyi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
from .core import * | ||
from _typeshed import Incomplete | ||
|
||
__version__: Incomplete | ||
_attrs: Incomplete | ||
|
||
def __getattr__(attr): ... |
52 changes: 52 additions & 0 deletions
52
publish/micropython-v1_21_0-stm32-pybv11-stubs/asyncio/core.pyi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
from .task import Task as Task, TaskQueue as TaskQueue | ||
from _typeshed import Incomplete | ||
|
||
class CancelledError(BaseException): ... | ||
class TimeoutError(Exception): ... | ||
|
||
_exc_context: Incomplete | ||
|
||
class SingletonGenerator: | ||
state: Incomplete | ||
exc: Incomplete | ||
def __init__(self) -> None: ... | ||
def __iter__(self): ... | ||
def __next__(self) -> None: ... | ||
|
||
def sleep_ms(t, sgen=...): ... | ||
def sleep(t): ... | ||
|
||
class IOQueue: | ||
poller: Incomplete | ||
map: Incomplete | ||
def __init__(self) -> None: ... | ||
def _enqueue(self, s, idx) -> None: ... | ||
def _dequeue(self, s) -> None: ... | ||
def queue_read(self, s) -> None: ... | ||
def queue_write(self, s) -> None: ... | ||
def remove(self, task) -> None: ... | ||
def wait_io_event(self, dt) -> None: ... | ||
|
||
def _promote_to_task(aw): ... | ||
def create_task(coro): ... | ||
def run_until_complete(main_task: Incomplete | None = ...): ... | ||
def run(coro): ... | ||
async def _stopper() -> None: ... | ||
|
||
_stop_task: Incomplete | ||
|
||
class Loop: | ||
_exc_handler: Incomplete | ||
def create_task(coro): ... | ||
def run_forever() -> None: ... | ||
def run_until_complete(aw): ... | ||
def stop() -> None: ... | ||
def close() -> None: ... | ||
def set_exception_handler(handler) -> None: ... | ||
def get_exception_handler(): ... | ||
def default_exception_handler(loop, context) -> None: ... | ||
def call_exception_handler(context) -> None: ... | ||
|
||
def get_event_loop(runq_len: int = ..., waitq_len: int = ...): ... | ||
def current_task(): ... | ||
def new_event_loop(): ... |
21 changes: 21 additions & 0 deletions
21
publish/micropython-v1_21_0-stm32-pybv11-stubs/asyncio/event.pyi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import io | ||
from . import core as core | ||
from _typeshed import Incomplete | ||
from collections.abc import Generator | ||
|
||
class Event: | ||
state: bool | ||
waiting: Incomplete | ||
def __init__(self) -> None: ... | ||
def is_set(self): ... | ||
def set(self) -> None: ... | ||
def clear(self) -> None: ... | ||
def wait(self) -> Generator[None, None, Incomplete]: ... | ||
|
||
class ThreadSafeFlag(io.IOBase): | ||
state: int | ||
def __init__(self) -> None: ... | ||
def ioctl(self, req, flags): ... | ||
def set(self) -> None: ... | ||
def clear(self) -> None: ... | ||
async def wait(self) -> Generator[Incomplete, None, None]: ... |
13 changes: 13 additions & 0 deletions
13
publish/micropython-v1_21_0-stm32-pybv11-stubs/asyncio/funcs.pyi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
from . import core as core | ||
from _typeshed import Incomplete | ||
from collections.abc import Generator | ||
|
||
async def _run(waiter, aw) -> None: ... | ||
async def wait_for(aw, timeout, sleep=...): ... | ||
def wait_for_ms(aw, timeout): ... | ||
|
||
class _Remove: | ||
@staticmethod | ||
def remove(t) -> None: ... | ||
|
||
def gather(*aws, return_exceptions: bool = ...) -> Generator[None, None, Incomplete]: ... |
13 changes: 13 additions & 0 deletions
13
publish/micropython-v1_21_0-stm32-pybv11-stubs/asyncio/lock.pyi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
from . import core as core | ||
from _typeshed import Incomplete | ||
from collections.abc import Generator | ||
|
||
class Lock: | ||
state: int | ||
waiting: Incomplete | ||
def __init__(self) -> None: ... | ||
def locked(self): ... | ||
def release(self) -> None: ... | ||
def acquire(self) -> Generator[None, None, Incomplete]: ... | ||
async def __aenter__(self): ... | ||
async def __aexit__(self, exc_type, exc, tb): ... |
36 changes: 36 additions & 0 deletions
36
publish/micropython-v1_21_0-stm32-pybv11-stubs/asyncio/stream.pyi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
from . import core as core | ||
from _typeshed import Incomplete | ||
from collections.abc import Generator | ||
|
||
class Stream: | ||
s: Incomplete | ||
e: Incomplete | ||
out_buf: bytes | ||
def __init__(self, s, e=...) -> None: ... | ||
def get_extra_info(self, v): ... | ||
async def __aenter__(self): ... | ||
async def __aexit__(self, exc_type, exc, tb) -> None: ... | ||
def close(self) -> None: ... | ||
async def wait_closed(self) -> None: ... | ||
def read(self, n: int = ...) -> Generator[Incomplete, None, Incomplete]: ... | ||
def readinto(self, buf) -> Generator[Incomplete, None, Incomplete]: ... | ||
def readexactly(self, n) -> Generator[Incomplete, None, Incomplete]: ... | ||
def readline(self) -> Generator[Incomplete, None, Incomplete]: ... | ||
def write(self, buf) -> None: ... | ||
def drain(self) -> Generator[Incomplete, None, Incomplete]: ... | ||
|
||
StreamReader = Stream | ||
StreamWriter = Stream | ||
|
||
def open_connection(host, port) -> Generator[Incomplete, None, Incomplete]: ... | ||
|
||
class Server: | ||
async def __aenter__(self): ... | ||
async def __aexit__(self, exc_type, exc, tb) -> None: ... | ||
state: bool | ||
def close(self) -> None: ... | ||
async def wait_closed(self) -> None: ... | ||
async def _serve(self, s, cb) -> Generator[Incomplete, None, None]: ... | ||
|
||
async def start_server(cb, host, port, backlog: int = ...): ... | ||
async def stream_awrite(self, buf, off: int = ..., sz: int = ...) -> None: ... |
Oops, something went wrong.