Skip to content

Commit dfe18d8

Browse files
committed
Build v1.22.0 distribution packages
Signed-off-by: Jos Verlinde <[email protected]>
1 parent 08492a6 commit dfe18d8

File tree

798 files changed

+90046
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

798 files changed

+90046
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
MIT License
2+
3+
Copyright (c) 2022 Jos Verlinde
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.
22+
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# micropython-esp32-esp32_generic-stubs
2+
3+
4+
This is a stub-only package for MicroPython.
5+
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.
6+
7+
The version of this package is alligned the the version of the MicroPython firmware.
8+
- Major, Minor and Patch levels are alligned to the same version as the firmware.
9+
- The post release level is used to publish new releases of the stubs.
10+
11+
For `Micropython 1.17` the stubs are published as `1.17.post1` ... `1.17.post2`
12+
for `Micropython 1.18` the stubs are published as `1.18.post1` ... `1.18.post2`
13+
14+
To install the latest stubs:
15+
`pip install -I micropython-<port>-stubs` where port is the port of the MicroPython firmware.
16+
17+
To install the stubs for an older version, such as MicroPython 1.17:
18+
`pip install micropython-stm32-stubs==1.17.*` which will install the last post release of the stubs for MicroPython 1.17.
19+
20+
21+
As the creation of the stubs, and merging of the different types is still going though improvements, the stub packages are marked as Beta.
22+
To upgrade stubs to the latest stubs for a specific version use `pip install micropython-stm32-stubs==1.17.* --upgrade`
23+
24+
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)
25+
26+
For an overview of Micropython Stubs please see: https://micropython-stubs.readthedocs.io/en/main/
27+
* List of all stubs : https://micropython-stubs.readthedocs.io/en/main/firmware_grp.html
28+
29+
Included stubs:
30+
* Merged stubs from `stubs/micropython-v1_22_0-esp32-ESP32_GENERIC-merged`
31+
* Core stubs from `stubs/micropython-core`
32+
33+
34+
origin | Family | Port | Board | Version
35+
-------|--------|------|-------|--------
36+
Documentation | micropython | - | - | v1.22.0
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
"""Allows for type checking of Micropython specific builtins by pyright and pylance.
2+
"""
3+
4+
from typing import Tuple, TypeVar
5+
6+
Const_T = TypeVar("Const_T", int, float, str, bytes, Tuple) # constant
7+
8+
def const(expr: Const_T) -> Const_T:
9+
"""
10+
Used to declare that the expression is a constant so that the compiler can
11+
optimise it. The use of this function should be as follows::
12+
13+
from micropython import const
14+
15+
CONST_X = const(123)
16+
CONST_Y = const(2 * CONST_X + 1)
17+
18+
Constants declared this way are still accessible as global variables from
19+
outside the module they are declared in. On the other hand, if a constant
20+
begins with an underscore then it is hidden, it is not available as a global
21+
variable, and does not take up any memory during execution.
22+
23+
This `const` function is recognised directly by the MicroPython parser and is
24+
provided as part of the :mod:`micropython` module mainly so that scripts can be
25+
written which run under both CPython and MicroPython, by following the above
26+
pattern.
27+
"""
28+
...
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
"""
2+
Asynchronous I/O scheduler for writing concurrent code.
3+
4+
MicroPython module: https://docs.micropython.org/en/v1.22.0/library/asyncio.html
5+
6+
CPython module:
7+
`asyncio `<https://docs.python.org/3.8/library/asyncio.html>
8+
9+
Example::
10+
11+
import asyncio
12+
13+
async def blink(led, period_ms):
14+
while True:
15+
led.on()
16+
await asyncio.sleep_ms(5)
17+
led.off()
18+
await asyncio.sleep_ms(period_ms)
19+
20+
async def main(led1, led2):
21+
asyncio.create_task(blink(led1, 700))
22+
asyncio.create_task(blink(led2, 400))
23+
await asyncio.sleep_ms(10_000)
24+
25+
# Running on a pyboard
26+
from pyb import LED
27+
asyncio.run(main(LED(1), LED(2)))
28+
29+
# Running on a generic board
30+
from machine import Pin
31+
asyncio.run(main(Pin(1), Pin(2)))
32+
33+
Core functions
34+
--------------
35+
"""
36+
from _typeshed import Incomplete, Incomplete as Incomplete
37+
from typing import Any, Coroutine, List, Tuple
38+
39+
class TaskQueue:
40+
def push(self, *args, **kwargs) -> Incomplete: ...
41+
def peek(self, *args, **kwargs) -> Incomplete: ...
42+
def remove(self, *args, **kwargs) -> Incomplete: ...
43+
def pop(self, *args, **kwargs) -> Incomplete: ...
44+
def __init__(self, *argv, **kwargs) -> None: ...
45+
46+
class Task:
47+
"""
48+
This object wraps a coroutine into a running task. Tasks can be waited on
49+
using ``await task``, which will wait for the task to complete and return
50+
the return value of the task.
51+
52+
Tasks should not be created directly, rather use `create_task` to create them.
53+
"""
54+
55+
def __init__(self, *argv, **kwargs) -> None: ...
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
"""
2+
ESP-NOW :doc:`asyncio` support.
3+
4+
MicroPython module: https://docs.micropython.org/en/v1.22.0/library/aioespnow.html
5+
"""
6+
from _typeshed import Incomplete, Incomplete as Incomplete
7+
from typing import Any, Dict, Iterator, List, Optional, Tuple, Union
8+
9+
MAX_DATA_LEN: int
10+
MAX_TOTAL_PEER_NUM: int
11+
MAX_ENCRYPT_PEER_NUM: int
12+
ADDR_LEN: int
13+
KEY_LEN: int
14+
15+
class ESPNowBase:
16+
def irq(self, *args, **kwargs) -> Incomplete: ...
17+
def mod_peer(self, *args, **kwargs) -> Incomplete: ...
18+
def get_peers(self, *args, **kwargs) -> Incomplete: ...
19+
def stats(self, *args, **kwargs) -> Incomplete: ...
20+
def set_pmk(self, *args, **kwargs) -> Incomplete: ...
21+
def peer_count(self, *args, **kwargs) -> Incomplete: ...
22+
def recvinto(self, *args, **kwargs) -> Incomplete: ...
23+
def send(self, *args, **kwargs) -> Incomplete: ...
24+
def active(self, *args, **kwargs) -> Incomplete: ...
25+
def any(self, *args, **kwargs) -> Incomplete: ...
26+
def get_peer(self, *args, **kwargs) -> Incomplete: ...
27+
def del_peer(self, *args, **kwargs) -> Incomplete: ...
28+
def add_peer(self, *args, **kwargs) -> Incomplete: ...
29+
def config(self, *args, **kwargs) -> Incomplete: ...
30+
def __init__(self, *argv, **kwargs) -> None: ...
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
from _typeshed import Incomplete as Incomplete
2+
3+
def reset(*args, **kwargs) -> Incomplete: ...
4+
def writebyte(*args, **kwargs) -> Incomplete: ...
5+
def writebit(*args, **kwargs) -> Incomplete: ...
6+
def crc8(*args, **kwargs) -> Incomplete: ...
7+
def readbyte(*args, **kwargs) -> Incomplete: ...
8+
def readbit(*args, **kwargs) -> Incomplete: ...
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
"""
2+
Multithreading support.
3+
4+
MicroPython module: https://docs.micropython.org/en/v1.22.0/library/_thread.html
5+
6+
CPython module: :mod:`python:_thread` https://docs.python.org/3/library/_thread.html .
7+
8+
This module implements multithreading support.
9+
10+
This module is highly experimental and its API is not yet fully settled
11+
and not yet described in this documentation.
12+
"""
13+
from _typeshed import Incomplete, Incomplete as Incomplete
14+
15+
def get_ident(*args, **kwargs) -> Incomplete: ...
16+
def start_new_thread(*args, **kwargs) -> Incomplete: ...
17+
def stack_size(*args, **kwargs) -> Incomplete: ...
18+
def exit(*args, **kwargs) -> Incomplete: ...
19+
def allocate_lock(*args, **kwargs) -> Incomplete: ...
20+
21+
class LockType:
22+
def locked(self, *args, **kwargs) -> Incomplete: ...
23+
def release(self, *args, **kwargs) -> Incomplete: ...
24+
def acquire(self, *args, **kwargs) -> Incomplete: ...
25+
def __init__(self, *argv, **kwargs) -> None: ...
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
from _typeshed import Incomplete as Incomplete
2+
3+
class AIOESPNow:
4+
def peer_count(self, *args, **kwargs) -> Incomplete: ...
5+
def recv(self, *args, **kwargs) -> Incomplete: ...
6+
def mod_peer(self, *args, **kwargs) -> Incomplete: ...
7+
def get_peers(self, *args, **kwargs) -> Incomplete: ...
8+
def stats(self, *args, **kwargs) -> Incomplete: ...
9+
def recvinto(self, *args, **kwargs) -> Incomplete: ...
10+
def set_pmk(self, *args, **kwargs) -> Incomplete: ...
11+
def irecv(self, *args, **kwargs) -> Incomplete: ...
12+
def get_peer(self, *args, **kwargs) -> Incomplete: ...
13+
def active(self, *args, **kwargs) -> Incomplete: ...
14+
def send(self, *args, **kwargs) -> Incomplete: ...
15+
def any(self, *args, **kwargs) -> Incomplete: ...
16+
def del_peer(self, *args, **kwargs) -> Incomplete: ...
17+
def add_peer(self, *args, **kwargs) -> Incomplete: ...
18+
def config(self, *args, **kwargs) -> Incomplete: ...
19+
def irq(self, *args, **kwargs) -> Incomplete: ...
20+
asend: Incomplete
21+
arecv: Incomplete
22+
airecv: Incomplete
23+
def __init__(self, *argv, **kwargs) -> None: ...
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
from _typeshed import Incomplete as Incomplete
2+
3+
class NeoPixel:
4+
ORDER: tuple
5+
def write(self, *args, **kwargs) -> Incomplete: ...
6+
def fill(self, *args, **kwargs) -> Incomplete: ...
7+
def __init__(self, *argv, **kwargs) -> None: ...
8+
9+
class APA106:
10+
ORDER: tuple
11+
def write(self, *args, **kwargs) -> Incomplete: ...
12+
def fill(self, *args, **kwargs) -> Incomplete: ...
13+
def __init__(self, *argv, **kwargs) -> None: ...
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
"""
2+
Efficient arrays of numeric data.
3+
4+
MicroPython module: https://docs.micropython.org/en/v1.22.0/library/array.html
5+
6+
CPython module: :mod:`python:array` https://docs.python.org/3/library/array.html .
7+
8+
Supported format codes: ``b``, ``B``, ``h``, ``H``, ``i``, ``I``, ``l``,
9+
``L``, ``q``, ``Q``, ``f``, ``d`` (the latter 2 depending on the
10+
floating-point support).
11+
"""
12+
from _typeshed import Incomplete, Incomplete as Incomplete
13+
from typing import Any, List, Optional
14+
15+
class array(List):
16+
"""
17+
Create array with elements of given type. Initial contents of the
18+
array are given by *iterable*. If it is not provided, an empty
19+
array is created.
20+
"""
21+
22+
def extend(self, iterable) -> Incomplete:
23+
"""
24+
Append new elements as contained in *iterable* to the end of
25+
array, growing it.
26+
"""
27+
...
28+
def append(self, val) -> Incomplete:
29+
"""
30+
Append new element *val* to the end of array, growing it.
31+
"""
32+
...
33+
def __init__(self, *argv, **kwargs) -> None: ...

0 commit comments

Comments
 (0)