Skip to content

Commit

Permalink
Published to PyPi micropython-stm32-pybv11-stubs 1.21.0.post1
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 20, 2023
1 parent 3e8fb33 commit ad65af7
Show file tree
Hide file tree
Showing 325 changed files with 40,314 additions and 4 deletions.
27 changes: 27 additions & 0 deletions publish/micropython-v1_20_0-stm32-pybv11-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-pybv11-stubs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "micropython-stm32-pybv11-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-pybv11-stubs",
"stub_sources": [
[
Expand All @@ -19,6 +19,6 @@
]
],
"description": "MicroPython stubs",
"hash": "25ac5cb5e4ac49a261f318b055d56ee558d9d053",
"stub_hash": "54f27af507742319632841fe043c75a79b692c95"
"hash": "f870940888e664a06e86c8ed649091ad17b4ed57",
"stub_hash": "259ed7e7ea55a2fb3c626c04c222e4739b304091"
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "micropython-stm32-pybv11-stubs"
version = "1.20.0.post3"
version = "1.20.0.post4"
description = "MicroPython stubs"
authors = [
"josverl <josverl@users.noreply.github.com>",
Expand Down Expand Up @@ -32,6 +32,7 @@ classifiers = [
"Topic :: Software Development :: Build Tools",
]
packages = [
{ include = "__builtins__.pyi" },
{ include = "_onewire.pyi" },
{ include = "_thread.pyi" },
{ include = "_uasyncio.pyi" },
Expand Down
22 changes: 22 additions & 0 deletions publish/micropython-v1_21_0-stm32-pybv11-stubs/LICENSE.md
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.

38 changes: 38 additions & 0 deletions publish/micropython-v1_21_0-stm32-pybv11-stubs/README.md
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 publish/micropython-v1_21_0-stm32-pybv11-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.
"""
...
11 changes: 11 additions & 0 deletions publish/micropython-v1_21_0-stm32-pybv11-stubs/_asyncio.pyi
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: ...
8 changes: 8 additions & 0 deletions publish/micropython-v1_21_0-stm32-pybv11-stubs/_onewire.pyi
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: ...
33 changes: 33 additions & 0 deletions publish/micropython-v1_21_0-stm32-pybv11-stubs/array.pyi
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: ...
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 publish/micropython-v1_21_0-stm32-pybv11-stubs/asyncio/core.pyi
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 publish/micropython-v1_21_0-stm32-pybv11-stubs/asyncio/event.pyi
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 publish/micropython-v1_21_0-stm32-pybv11-stubs/asyncio/funcs.pyi
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 publish/micropython-v1_21_0-stm32-pybv11-stubs/asyncio/lock.pyi
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 publish/micropython-v1_21_0-stm32-pybv11-stubs/asyncio/stream.pyi
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: ...
Loading

0 comments on commit ad65af7

Please sign in to comment.