micropython-stubs icon indicating copy to clipboard operation
micropython-stubs copied to clipboard

Stubs of most MicroPython ports, boards and versions to make writing code that much simpler.

Results 41 micropython-stubs issues
Sort by recently updated
recently updated
newest added

Based on the finding of `io.Stream` class/Protocol defined by Andy ion https://github.com/Josverl/micropython-stubs/issues/781 that I think related to : https://github.com/micropython/micropython/blob/2c80d369988a84d85efe0483f9cf469ff27b70f9/py/stream.h#L69-L92 the naming convention in MicroPython's C source appears to be :...

stdlib
_mpy_shed

```python # Documented , but not detected by createstubs.py print(e.peers_table) # type: ignore # TODO: espnow ESPNow.peers_table - deal with undetectable attributes ```

To replace `@overload` ```py from typing import List, Optional, Tuple, Union, Callable import functools from typing_extensions import reveal_type from typing_extensions import ParamSpec, TypeVar P = ParamSpec("P") R = TypeVar("R") def...

consider to be added to runtime typings.py - [ ] TypeVar - [ ] TypeAlias - [ ] ParamSpec

runtime typing

https://github.com/micropython/micropython/pull/16702

Upstream
WIP

Add new optional parameter https://github.com/micropython/micropython/pull/16506

v1.25.0

Add descriptions as in : https://support.microbit.org/support/solutions/articles/19000126750-python-oserror-codes However, the problem is that the different parts have different error numbers for the same symbol ```py #stm32 ENOBUFS: int = 105 ENODEV: int...

- viper - native - asm_thumb https://realpython.com/primer-on-python-decorators/#fancy-decorators ```py import functools from typing import List, Callable def native2(_func=None, *args, **kwargs): """native emitter that returns a proper type.""" def wrapper_outer(func): @functools.wraps(func) def...

```py from typing_extensions import ParamSpec, TypeVar P = ParamSpec("P") R = TypeVar("R") def viper(_func: Callable[P, R], /) -> Callable[P, R]: """A type-safe decorator to add logging to a function.""" ......

reference

`def asm_pio(_func: Callable[_Param, _Ret], /) -> Callable[_Param, _Ret]:` but also consider that decoraters can also be implemented as a class , and that may be the missing link beween `def...