micropython-stubber
micropython-stubber copied to clipboard
docstub for stm module - add MemoryObject class
there are a few pyright errors in the stm docstub errors on getitem setitem not defined
# Read/write 8 bits of memory.
mem8: Any = ...
# Read/write 16 bits of memory.
mem16: Any = ...
# Read/write 32 bits of memory.
mem32: int = 1
Describe the solution you'd like
class __MemoryObject():
"""
A memory object. This is a wrapper around a memory region. It can be used
to access the memory region as if it were an array of bytes.
These memory objects can be used in combination with the peripheral register
constants to read and write registers of the MCU hardware peripherals, as well
as all other areas of address space.
"""
...
def __getitem__(self, key: int) -> Any:
...
def __setitem__(self, key: int, value: Any) -> None:
...
A clear and concise description of what you want to happen.
Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.
Additional context Add any other context or screenshots about the feature request here.