Skip to content

Commit

Permalink
update stubs
Browse files Browse the repository at this point in the history
  • Loading branch information
Josverl committed Jun 25, 2024
1 parent 6d72e23 commit d3b39c8
Show file tree
Hide file tree
Showing 571 changed files with 14,881 additions and 3,926 deletions.
6,112 changes: 4,121 additions & 1,991 deletions all_modules.json

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions publish/micropython-v1_21_0-rp2-rpi_pico-stubs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,11 @@ For an overview of Micropython Stubs please see: https://micropython-stubs.read

Included stubs:
* Merged stubs from `stubs/micropython-v1_21_0-rp2-RPI_PICO-merged`
* Frozen stubs from `stubs/micropython-v1_21_0-frozen/rp2/GENERIC`
* Core stubs from `stubs/micropython-core`


origin | Family | Port | Board | Version
-------|--------|------|-------|--------
Documentation | micropython | - | - | v1.21.0
Core | micropython | rp2 | - | v1.21.0
4 changes: 4 additions & 0 deletions publish/micropython-v1_21_0-rp2-rpi_pico-stubs/_boot.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
from _typeshed import Incomplete

bdev: Incomplete
vfs: Incomplete
10 changes: 3 additions & 7 deletions publish/micropython-v1_21_0-rp2-rpi_pico-stubs/_boot_fat.pyi
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
"""
Module: '_boot_fat' on micropython-v1.21.0-rp2-RPI_PICO
"""

# MCU: {'build': '', 'ver': '1.21.0', 'version': '1.21.0', 'port': 'rp2', 'board': 'RPI_PICO', 'mpy': 'v6.1', 'family': 'micropython', 'cpu': 'RP2040', 'arch': 'armv6m'}
# Stubber: v1.20.0
from __future__ import annotations
from _typeshed import Incomplete

bdev: Incomplete
vfs: Incomplete
294 changes: 4 additions & 290 deletions publish/micropython-v1_21_0-rp2-rpi_pico-stubs/asyncio/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -32,297 +32,11 @@ Example::
Core functions
--------------
---
Module: 'asyncio.__init__' on micropython-v1.21.0-rp2-RPI_PICO
"""

# MCU: {'build': '', 'ver': '1.21.0', 'version': '1.21.0', 'port': 'rp2', 'board': 'RPI_PICO', 'mpy': 'v6.1', 'family': 'micropython', 'cpu': 'RP2040', 'arch': 'armv6m'}
# Stubber: v1.20.0
from __future__ import annotations
from typing import Any, Coroutine, List, Tuple, Generator
from .core import *
from _typeshed import Incomplete

_attrs: dict = {}

def create_task(coro) -> Task:
"""
Create a new task from the given coroutine and schedule it to run.
Returns the corresponding `Task` object.
"""
...

def run_until_complete(*args, **kwargs) -> Incomplete: ...
def wait_for_ms(awaitable, timeout) -> Coroutine[Incomplete, Any, Any]:
"""
Similar to `wait_for` but *timeout* is an integer in milliseconds.
This is a coroutine, and a MicroPython extension.
"""
...

def ticks(*args, **kwargs) -> Incomplete: ...
def run(coro) -> Incomplete:
"""
Create a new task from the given coroutine and run it until it completes.
Returns the value returned by *coro*.
"""
...

def new_event_loop() -> Incomplete:
"""
Reset the event loop and return it.
Note: since MicroPython only has a single event loop this function just
resets the loop's state, it does not create a new one.
"""
...

def current_task() -> Task:
"""
Return the `Task` object associated with the currently running task.
"""
...

def get_event_loop() -> Incomplete:
"""
Return the event loop used to schedule and run tasks. See `Loop`.
"""
...

def ticks_diff(*args, **kwargs) -> Incomplete: ...
def ticks_add(*args, **kwargs) -> Incomplete: ...
def sleep_ms(t) -> Coroutine[Incomplete, Any, Any]:
"""
Sleep for *t* milliseconds.
This is a coroutine, and a MicroPython extension.
"""
...

def sleep(t) -> Coroutine[Incomplete, Any, Any]:
"""
Sleep for *t* seconds (can be a float).
This is a coroutine.
"""
...

wait_for: Generator ## = <generator>
gather: Generator ## = <generator>

class Loop:
"""
This represents the object which schedules and runs tasks. It cannot be
created, use `get_event_loop` instead.
"""

def call_exception_handler(self, context) -> Incomplete:
"""
Call the current exception handler. The argument *context* is passed through and
is a dictionary containing keys: ``'message'``, ``'exception'``, ``'future'``.
"""
...

def run_forever(self) -> Incomplete:
"""
Run the event loop until `stop()` is called.
"""
...

def set_exception_handler(self, handler) -> None:
"""
Set the exception handler to call when a Task raises an exception that is not
caught. The *handler* should accept two arguments: ``(loop, context)``.
"""
...

def get_exception_handler(self) -> None:
"""
Get the current exception handler. Returns the handler, or ``None`` if no
custom handler is set.
"""
...

def default_exception_handler(self, context) -> Incomplete:
"""
The default exception handler that is called.
"""
...

def run_until_complete(self, awaitable) -> Incomplete:
"""
Run the given *awaitable* until it completes. If *awaitable* is not a task
then it will be promoted to one.
"""
...

def close(self) -> None:
"""
Close the event loop.
"""
...

def create_task(self, coro) -> Task:
"""
Create a task from the given *coro* and return the new `Task` object.
"""
...

def stop(self) -> None:
"""
Stop the event loop.
"""
...
_exc_handler: Incomplete ## <class 'NoneType'> = None
def __init__(self, *argv, **kwargs) -> None: ...

class IOQueue:
def _dequeue(self, *args, **kwargs) -> Incomplete: ...
def queue_write(self, *args, **kwargs) -> Incomplete: ...
def queue_read(self, *args, **kwargs) -> Incomplete: ...
def remove(self, *args, **kwargs) -> Incomplete: ...
def _enqueue(self, *args, **kwargs) -> Incomplete: ...
def wait_io_event(self, *args, **kwargs) -> Incomplete: ...
def __init__(self, *argv, **kwargs) -> None: ...

class Lock:
"""
Create a new lock which can be used to coordinate tasks. Locks start in
the unlocked state.
In addition to the methods below, locks can be used in an ``async with`` statement.
"""

def locked(self) -> bool:
"""
Returns ``True`` if the lock is locked, otherwise ``False``.
"""
...

def release(self) -> Incomplete:
"""
Release the lock. If any tasks are waiting on the lock then the next one in the
queue is scheduled to run and the lock remains locked. Otherwise, no tasks are
waiting an the lock becomes unlocked.
"""
...
acquire: Generator ## = <generator>
def __init__(self, *argv, **kwargs) -> None: ...

class CancelledError(Exception): ...

class Task:
"""
This object wraps a coroutine into a running task. Tasks can be waited on
using ``await task``, which will wait for the task to complete and return
the return value of the task.
Tasks should not be created directly, rather use `create_task` to create them.
"""

def __init__(self, *argv, **kwargs) -> None: ...

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: ...

open_connection: Generator ## = <generator>

class ThreadSafeFlag:
"""
Create a new flag which can be used to synchronise a task with code running
outside the asyncio loop, such as other threads, IRQs, or scheduler
callbacks. Flags start in the cleared state. The class does not currently
work under the Unix build of MicroPython.
"""

def set(self) -> None:
"""
Set the flag. If there is a task waiting on the flag, it will be scheduled
to run.
"""
...

def ioctl(self, *args, **kwargs) -> Incomplete: ...
def clear(self) -> None:
"""
Clear the flag. This may be used to ensure that a possibly previously-set
flag is clear before waiting for it.
"""
...
wait: Generator ## = <generator>
def __init__(self, *argv, **kwargs) -> None: ...

class Event:
"""
Create a new event which can be used to synchronise tasks. Events start
in the cleared state.
"""

def set(self) -> None:
"""
Set the event. Any tasks waiting on the event will be scheduled to run.
Note: This must be called from within a task. It is not safe to call this
from an IRQ, scheduler callback, or other thread. See `ThreadSafeFlag`.
"""
...

def is_set(self) -> bool:
"""
Returns ``True`` if the event is set, ``False`` otherwise.
"""
...

def clear(self) -> None:
"""
Clear the event.
"""
...
wait: Generator ## = <generator>
def __init__(self, *argv, **kwargs) -> None: ...

class SingletonGenerator:
def __init__(self, *argv, **kwargs) -> None: ...

start_server: Generator ## = <generator>

class TimeoutError(Exception): ...

class StreamWriter:
def get_extra_info(self, *args, **kwargs) -> Incomplete: ...
def write(self, *args, **kwargs) -> Incomplete: ...
def close(self, *args, **kwargs) -> Incomplete: ...

awrite: Generator ## = <generator>
readexactly: Generator ## = <generator>
awritestr: Generator ## = <generator>
drain: Generator ## = <generator>
readinto: Generator ## = <generator>
read: Generator ## = <generator>
aclose: Generator ## = <generator>
readline: Generator ## = <generator>
wait_closed: Generator ## = <generator>
def __init__(self, *argv, **kwargs) -> None: ...

class StreamReader:
def get_extra_info(self, *args, **kwargs) -> Incomplete: ...
def write(self, *args, **kwargs) -> Incomplete: ...
def close(self, *args, **kwargs) -> Incomplete: ...
__version__: Incomplete
_attrs: Incomplete

awrite: Generator ## = <generator>
readexactly: Generator ## = <generator>
awritestr: Generator ## = <generator>
drain: Generator ## = <generator>
readinto: Generator ## = <generator>
read: Generator ## = <generator>
aclose: Generator ## = <generator>
readline: Generator ## = <generator>
wait_closed: Generator ## = <generator>
def __init__(self, *argv, **kwargs) -> None: ...
def __getattr__(attr): ...
Loading

0 comments on commit d3b39c8

Please sign in to comment.