diff --git a/src/micropython/main/typeshed.es-es.json b/src/micropython/main/typeshed.es-es.json index 57f39323e..4b683fbaa 100644 --- a/src/micropython/main/typeshed.es-es.json +++ b/src/micropython/main/typeshed.es-es.json @@ -35,7 +35,6 @@ "/typeshed/stdlib/usys.pyi": "from sys import *\n", "/typeshed/stdlib/utime.pyi": "from time import *\n", "/typeshed/stdlib/_typeshed/__init__.pyi": "# Utility types for typeshed\n#\n# See the README.md file in this directory for more information.\n\nimport array\nimport sys\nfrom os import PathLike\nfrom typing import AbstractSet, Any, Container, Iterable, Protocol, Tuple, TypeVar, Union\nfrom typing_extensions import Literal, final\n\n_KT = TypeVar(\"_KT\")\n_KT_co = TypeVar(\"_KT_co\", covariant=True)\n_KT_contra = TypeVar(\"_KT_contra\", contravariant=True)\n_VT = TypeVar(\"_VT\")\n_VT_co = TypeVar(\"_VT_co\", covariant=True)\n_T = TypeVar(\"_T\")\n_T_co = TypeVar(\"_T_co\", covariant=True)\n_T_contra = TypeVar(\"_T_contra\", contravariant=True)\n\n# Use for \"self\" annotations:\n# def __enter__(self: Self) -> Self: ...\nSelf = TypeVar(\"Self\") # noqa Y001\n\n# stable\nclass IdentityFunction(Protocol):\n def __call__(self, __x: _T) -> _T: ...\n\nclass SupportsLessThan(Protocol):\n def __lt__(self, __other: Any) -> bool: ...\n\nSupportsLessThanT = TypeVar(\"SupportsLessThanT\", bound=SupportsLessThan) # noqa: Y001\n\nclass SupportsDivMod(Protocol[_T_contra, _T_co]):\n def __divmod__(self, __other: _T_contra) -> _T_co: ...\n\nclass SupportsRDivMod(Protocol[_T_contra, _T_co]):\n def __rdivmod__(self, __other: _T_contra) -> _T_co: ...\n\nclass SupportsLenAndGetItem(Protocol[_T_co]):\n def __len__(self) -> int: ...\n def __getitem__(self, __k: int) -> _T_co: ...\n\n# Mapping-like protocols\n\n# stable\nclass SupportsItems(Protocol[_KT_co, _VT_co]):\n def items(self) -> AbstractSet[Tuple[_KT_co, _VT_co]]: ...\n\n# stable\nclass SupportsKeysAndGetItem(Protocol[_KT, _VT_co]):\n def keys(self) -> Iterable[_KT]: ...\n def __getitem__(self, __k: _KT) -> _VT_co: ...\n\n# stable\nclass SupportsGetItem(Container[_KT_contra], Protocol[_KT_contra, _VT_co]):\n def __getitem__(self, __k: _KT_contra) -> _VT_co: ...\n\n# stable\nclass SupportsItemAccess(SupportsGetItem[_KT_contra, _VT], Protocol[_KT_contra, _VT]):\n def __setitem__(self, __k: _KT_contra, __v: _VT) -> None: ...\n def __delitem__(self, __v: _KT_contra) -> None: ...\n\n# These aliases are simple strings in Python 2.\nStrPath = Union[str, PathLike[str]] # stable\nBytesPath = Union[bytes, PathLike[bytes]] # stable\nStrOrBytesPath = Union[str, bytes, PathLike[str], PathLike[bytes]] # stable\n\nOpenTextModeUpdating = Literal[\n \"r+\",\n \"+r\",\n \"rt+\",\n \"r+t\",\n \"+rt\",\n \"tr+\",\n \"t+r\",\n \"+tr\",\n \"w+\",\n \"+w\",\n \"wt+\",\n \"w+t\",\n \"+wt\",\n \"tw+\",\n \"t+w\",\n \"+tw\",\n \"a+\",\n \"+a\",\n \"at+\",\n \"a+t\",\n \"+at\",\n \"ta+\",\n \"t+a\",\n \"+ta\",\n \"x+\",\n \"+x\",\n \"xt+\",\n \"x+t\",\n \"+xt\",\n \"tx+\",\n \"t+x\",\n \"+tx\",\n]\nOpenTextModeWriting = Literal[\"w\", \"wt\", \"tw\", \"a\", \"at\", \"ta\", \"x\", \"xt\", \"tx\"]\nOpenTextModeReading = Literal[\"r\", \"rt\", \"tr\", \"U\", \"rU\", \"Ur\", \"rtU\", \"rUt\", \"Urt\", \"trU\", \"tUr\", \"Utr\"]\nOpenTextMode = Union[OpenTextModeUpdating, OpenTextModeWriting, OpenTextModeReading]\nOpenBinaryModeUpdating = Literal[\n \"rb+\",\n \"r+b\",\n \"+rb\",\n \"br+\",\n \"b+r\",\n \"+br\",\n \"wb+\",\n \"w+b\",\n \"+wb\",\n \"bw+\",\n \"b+w\",\n \"+bw\",\n \"ab+\",\n \"a+b\",\n \"+ab\",\n \"ba+\",\n \"b+a\",\n \"+ba\",\n \"xb+\",\n \"x+b\",\n \"+xb\",\n \"bx+\",\n \"b+x\",\n \"+bx\",\n]\nOpenBinaryModeWriting = Literal[\"wb\", \"bw\", \"ab\", \"ba\", \"xb\", \"bx\"]\nOpenBinaryModeReading = Literal[\"rb\", \"br\", \"rbU\", \"rUb\", \"Urb\", \"brU\", \"bUr\", \"Ubr\"]\nOpenBinaryMode = Union[OpenBinaryModeUpdating, OpenBinaryModeReading, OpenBinaryModeWriting]\n\n# stable\nclass HasFileno(Protocol):\n def fileno(self) -> int: ...\n\nFileDescriptor = int # stable\nFileDescriptorLike = Union[int, HasFileno] # stable\n\n# stable\nclass SupportsRead(Protocol[_T_co]):\n def read(self, __length: int = ...) -> _T_co: ...\n\n# stable\nclass SupportsReadline(Protocol[_T_co]):\n def readline(self, __length: int = ...) -> _T_co: ...\n\n# stable\nclass SupportsNoArgReadline(Protocol[_T_co]):\n def readline(self) -> _T_co: ...\n\n# stable\nclass SupportsWrite(Protocol[_T_contra]):\n def write(self, __s: _T_contra) -> Any: ...\n\nReadableBuffer = Union[bytes, bytearray, memoryview, array.array[Any]] # stable\nWriteableBuffer = Union[bytearray, memoryview, array.array[Any]] # stable\n\n# stable\nif sys.version_info >= (3, 10):\n from types import NoneType as NoneType\nelse:\n # Used by type checkers for checks involving None (does not exist at runtime)\n @final\n class NoneType:\n def __bool__(self) -> Literal[False]: ...\n", - "/typeshed/stdlib/collections/__init__.pyi": "import sys\nfrom typing import (\n Any,\n Dict,\n Generic,\n ItemsView,\n Iterable,\n Iterator,\n KeysView,\n Optional,\n Reversible,\n Tuple,\n Type,\n TypeVar,\n Union,\n ValuesView,\n)\n\n_S = TypeVar(\"_S\")\n_T = TypeVar(\"_T\")\n_KT = TypeVar(\"_KT\")\n_VT = TypeVar(\"_VT\")\n\nif sys.version_info >= (3, 7):\n def namedtuple(\n typename: str,\n field_names: Union[str, Iterable[str]],\n *,\n rename: bool = ...,\n module: Optional[str] = ...,\n defaults: Optional[Iterable[Any]] = ...,\n ) -> Type[Tuple[Any, ...]]: ...\n\nelse:\n def namedtuple(\n typename: str,\n field_names: Union[str, Iterable[str]],\n *,\n verbose: bool = ...,\n rename: bool = ...,\n module: Optional[str] = ...,\n ) -> Type[Tuple[Any, ...]]: ...\n\nclass _OrderedDictKeysView(KeysView[_KT], Reversible[_KT]):\n def __reversed__(self) -> Iterator[_KT]: ...\n\nclass _OrderedDictItemsView(ItemsView[_KT, _VT], Reversible[Tuple[_KT, _VT]]):\n def __reversed__(self) -> Iterator[Tuple[_KT, _VT]]: ...\n\nclass _OrderedDictValuesView(ValuesView[_VT], Reversible[_VT]):\n def __reversed__(self) -> Iterator[_VT]: ...\n\nclass OrderedDict(Dict[_KT, _VT], Reversible[_KT], Generic[_KT, _VT]):\n def popitem(self, last: bool = ...) -> Tuple[_KT, _VT]: ...\n def move_to_end(self, key: _KT, last: bool = ...) -> None: ...\n def copy(self: _S) -> _S: ...\n def __reversed__(self) -> Iterator[_KT]: ...\n def keys(self) -> _OrderedDictKeysView[_KT]: ...\n def items(self) -> _OrderedDictItemsView[_KT, _VT]: ...\n def values(self) -> _OrderedDictValuesView[_VT]: ...\n", "/typeshed/stdlib/microbit/__init__.pyi": "\"\"\"Pines, im\u00e1genes, sonidos, temperatura y volumen.\"\"\"\nfrom typing import Any, Callable, List, Optional, Tuple, Union, overload\nfrom _typeshed import ReadableBuffer\nfrom . import accelerometer as accelerometer\nfrom . import audio as audio\nfrom . import compass as compass\nfrom . import display as display\nfrom . import i2c as i2c\nfrom . import microphone as microphone\nfrom . import speaker as speaker\nfrom . import spi as spi\nfrom . import uart as uart\n\ndef run_every(callback: Optional[Callable[[], None]]=None, days: int=0, h: int=0, min: int=0, s: int=0, ms: int=0) -> Callable[[Callable[[], None]], Callable[[], None]]:\n \"\"\"Schedule to run a function at the interval specified by the time arguments **V2 only**. (ejecutar cada)\n\nExample: ``run_every(my_logging, min=5)``\n\n``run_every`` can be used in two ways:\n\nAs a Decorator - placed on top of the function to schedule. For example::\n\n @run_every(h=1, min=20, s=30, ms=50)\n def my_function():\n # Do something here\n\nAs a Function - passing the callback as a positional argument. For example::\n\n def my_function():\n # Do something here\n run_every(my_function, s=30)\n\nEach argument corresponds to a different time unit and they are additive.\nSo ``run_every(min=1, s=30)`` schedules the callback every minute and a half.\n\nWhen an exception is thrown inside the callback function it deschedules the\nfunction. To avoid this you can catch exceptions with ``try/except``.\n\n:param callback: Function to call at the provided interval. Omit when using as a decorator.\n:param days: (d\u00edas) Sets the day mark for the scheduling.\n:param h: Sets the hour mark for the scheduling.\n:param min: Sets the minute mark for the scheduling.\n:param s: Sets the second mark for the scheduling.\n:param ms: Sets the millisecond mark for the scheduling.\"\"\"\n\ndef panic(n: int) -> None:\n \"\"\"Entra en modo p\u00e1nico (p\u00e1nico)\n\nExample: ``panic(127)``\n\n:param n: Un entero arbitrario <= 255 para indicar un estado.\n\nRequires restart.\"\"\"\n\ndef reset() -> None:\n \"\"\"Reiniciar la placa. (restablecer)\"\"\"\n\n@overload\ndef scale(value: float, from_: Tuple[float, float], to: Tuple[int, int]) -> int:\n \"\"\"Converts a value from a range to an integer range.\n\nExample: ``volume = scale(accelerometer.get_x(), from_=(-2000, 2000), to=(0, 255))``\n\nFor example, to convert an accelerometer X value to a speaker volume.\n\nIf one of the numbers in the ``to`` parameter is a floating point\n(i.e a decimal number like ``10.0``), this function will return a\nfloating point number.\n\n temp_fahrenheit = scale(30, from_=(0.0, 100.0), to=(32.0, 212.0))\n\n:param value: (valor) A number to convert.\n:param from_: A tuple to define the range to convert from.\n:param to: A tuple to define the range to convert to.\n:return: The ``value`` converted to the ``to`` range.\"\"\"\n\n@overload\ndef scale(value: float, from_: Tuple[float, float], to: Tuple[float, float]) -> float:\n \"\"\"Converts a value from a range to a floating point range.\n\nExample: ``temp_fahrenheit = scale(30, from_=(0.0, 100.0), to=(32.0, 212.0))``\n\nFor example, to convert temperature from a Celsius scale to Fahrenheit.\n\nIf one of the numbers in the ``to`` parameter is a floating point\n(i.e a decimal number like ``10.0``), this function will return a\nfloating point number.\nIf they are both integers (i.e ``10``), it will return an integer::\n\n returns_int = scale(accelerometer.get_x(), from_=(-2000, 2000), to=(0, 255))\n\n:param value: (valor) A number to convert.\n:param from_: A tuple to define the range to convert from.\n:param to: A tuple to define the range to convert to.\n:return: The ``value`` converted to the ``to`` range.\"\"\"\n\ndef sleep(n: float) -> None:\n \"\"\"Espera ``n`` milisegundos. (dormir)\n\nExample: ``sleep(1000)``\n\n:param n: El n\u00famero de milisegundos a esperar\n\nOne second is 1000 milliseconds, so::\n\n microbit.sleep(1000)\n\nwill pause the execution for one second.\"\"\"\n\ndef running_time() -> int:\n \"\"\"Obtiene el tiempo de funcionamiento de la placa. (tiempo de ejecuci\u00f3n)\n\n:return: The number of milliseconds since the board was switched on or restarted.\"\"\"\n\ndef temperature() -> int:\n \"\"\"Obtiene la temperatura del micro:bit en grados Celcius. (temperatura)\"\"\"\n\ndef set_volume(v: int) -> None:\n \"\"\"Establece el volumen. (configurar volumen)\n\nExample: ``set_volume(127)``\n\n:param v: un valor entre 0 (bajo) y 255 (alto).\n\nOut of range values will be clamped to 0 or 255.\n\n**V2** only.\"\"\"\n ...\n\nclass Button:\n \"\"\"La clase para los botones ``button_a`` y ``button_b``. (bot\u00f3n)\"\"\"\n\n def is_pressed(self) -> bool:\n \"\"\"Comprueba si el bot\u00f3n est\u00e1 pulsado. (est\u00e1 pulsado)\n\n:return: ``True`` if the specified button ``button`` is pressed, and ``False`` otherwise.\"\"\"\n ...\n\n def was_pressed(self) -> bool:\n \"\"\"Comprueba si el bot\u00f3n ha sido pulsado desde que se inci\u00f3 el dispositivo o desde la \u00faltima vez que se llam\u00f3 a este m\u00e9todo. (ha sido pulsado)\n\nCalling this method will clear the press state so\nthat the button must be pressed again before this method will return\n``True`` again.\n\n:return: ``True`` if the specified button ``button`` was pressed, and ``False`` otherwise\"\"\"\n ...\n\n def get_presses(self) -> int:\n \"\"\"Obtiene el total de pulsaciones sucesivas de un bot\u00f3n y restablece este total\na cero. (total de pulsaciones)\n\n:return: The number of presses since the device started or the last time this method was called\"\"\"\n ...\nbutton_a: Button\n\"\"\"Objeto ``Button`` para el bot\u00f3n izquierdo. (bot\u00f3n a)\"\"\"\nbutton_b: Button\n\"\"\"Objeto ``Button`` para el bot\u00f3n derecho. (bot\u00f3n b)\"\"\"\n\nclass MicroBitDigitalPin:\n \"\"\"Un pin digital. (pin digital microbit)\n\nSome pins support analog and touch features using the ``MicroBitAnalogDigitalPin`` and ``MicroBitTouchPin`` subclasses.\"\"\"\n NO_PULL: int\n PULL_UP: int\n PULL_DOWN: int\n\n def read_digital(self) -> int:\n \"\"\"Obtiene el valor digital del pin. (lectura digital)\n\nExample: ``value = pin0.read_digital()``\n\n:return: 1 if the pin is high, and 0 if it's low.\"\"\"\n ...\n\n def write_digital(self, value: int) -> None:\n \"\"\"Establece el valor digital del pin. (escritura digital)\n\nExample: ``pin0.write_digital(1)``\n\n:param value: (valor) 1 para establecer valor alto en el pin o 0 para valor bajo\"\"\"\n ...\n\n def set_pull(self, value: int) -> None:\n \"\"\"Configura el estado \"pull\" con uno de los tres valores posibles: ``PULL_UP``, ``PULL_DOWN`` o ``NO_PULL``. (configurar pull)\n\nExample: ``pin0.set_pull(pin0.PULL_UP)``\n\n:param value: (valor) El estado \"pull\" del pin correspondiente, p. ej., ``pin0.PULL_UP``.\"\"\"\n ...\n\n def get_pull(self) -> int:\n \"\"\"Obtiene el estado \"pull\" de un pin. (obtener pull)\n\nExample: ``pin0.get_pull()``\n\n:return: ``NO_PULL``, ``PULL_DOWN``, or ``PULL_UP``\n\nThese are set using the ``set_pull()`` method or automatically configured\nwhen a pin mode requires it.\"\"\"\n ...\n\n def get_mode(self) -> str:\n \"\"\"Devuelve el modo del pin. (obtener modo)\n\nExample: ``pin0.get_mode()``\n\nWhen a pin is used for a specific function, like\nwriting a digital value, or reading an analog value, the pin mode\nchanges.\n\n:return: ``\"unused\"``, ``\"analog\"``, ``\"read_digital\"``, ``\"write_digital\"``, ``\"display\"``, ``\"button\"``, ``\"music\"``, ``\"audio\"``, ``\"touch\"``, ``\"i2c\"``, or ``\"spi\"``\"\"\"\n ...\n\n def write_analog(self, value: int) -> None:\n \"\"\"Env\u00eda una se\u00f1al PWM al pin, con el ciclo de trabajo proporcional a ``value``. (escritura anal\u00f3gica)\n\nExample: ``pin0.write_analog(254)``\n\n:param value: (valor) Un n\u00famero entero o de coma flotante entre 0 (ciclo de trabajo de 0 %) y 1023 (100 %).\"\"\"\n\n def set_analog_period(self, period: int) -> None:\n \"\"\"Establece el per\u00edodo de la se\u00f1al PWM enviada a ``period`` milisegundos. (configurar periodo anal\u00f3gico)\n\nExample: ``pin0.set_analog_period(10)``\n\n:param period: (per\u00edodo) El per\u00edodo en milisegundos con un valor m\u00ednimo v\u00e1lido de 1 ms.\"\"\"\n\n def set_analog_period_microseconds(self, period: int) -> None:\n \"\"\"Establece el per\u00edodo de la se\u00f1al PWM enviada a ``period`` microsegundos. (configurar periodo anal\u00f3gico en microsegundos)\n\nExample: ``pin0.set_analog_period_microseconds(512)``\n\n:param period: (per\u00edodo) El per\u00edodo en microsegundos con un valor m\u00ednimo v\u00e1lido de 256 \u03bcs.\"\"\"\n\nclass MicroBitAnalogDigitalPin(MicroBitDigitalPin):\n \"\"\"Un pin con caracter\u00edsticas anal\u00f3gicas y digitales. (pin digital y anal\u00f3gico microbit)\"\"\"\n\n def read_analog(self) -> int:\n \"\"\"Lee el voltaje aplicado al pin. (lectura anal\u00f3gica)\n\nExample: ``pin0.read_analog()``\n\n:return: An integer between 0 (meaning 0V) and 1023 (meaning 3.3V).\"\"\"\n\nclass MicroBitTouchPin(MicroBitAnalogDigitalPin):\n \"\"\"Un pin con caracter\u00edsticas anal\u00f3gicas, digitales y t\u00e1ctiles. (pin t\u00e1ctil microbit)\"\"\"\n CAPACITIVE: int\n RESISTIVE: int\n\n def is_touched(self) -> bool:\n \"\"\"Comprueba si se est\u00e1 tocando el pin. (est\u00e1 tocado)\n\nExample: ``pin0.is_touched()``\n\nThe default touch mode for the pins on the edge connector is ``resistive``.\nThe default for the logo pin **V2** is ``capacitive``.\n\n**Resistive touch**\nThis test is done by measuring how much resistance there is between the\npin and ground. A low resistance gives a reading of ``True``. To get\na reliable reading using a finger you may need to touch the ground pin\nwith another part of your body, for example your other hand.\n\n**Capacitive touch**\nThis test is done by interacting with the electric field of a capacitor\nusing a finger as a conductor. `Capacitive touch\n`_\ndoes not require you to make a ground connection as part of a circuit.\n\n:return: ``True`` if the pin is being touched with a finger, otherwise return ``False``.\"\"\"\n ...\n\n def set_touch_mode(self, value: int) -> None:\n \"\"\"Establece el modo t\u00e1ctil del pin. (configurar modo t\u00e1ctil)\n\nExample: ``pin0.set_touch_mode(pin0.CAPACITIVE)``\n\nThe default touch mode for the pins on the edge connector is\n``resistive``. The default for the logo pin **V2** is ``capacitive``.\n\n:param value: (valor) ``CAPACITIVE`` o ``RESISTIVE`` del pin correspondiente.\"\"\"\n ...\npin0: MicroBitTouchPin\n\"\"\"Pin con funciones digitales, anal\u00f3gicas y t\u00e1ctiles.\"\"\"\npin1: MicroBitTouchPin\n\"\"\"Pin con funciones digitales, anal\u00f3gicas y t\u00e1ctiles.\"\"\"\npin2: MicroBitTouchPin\n\"\"\"Pin con funciones digitales, anal\u00f3gicas y t\u00e1ctiles.\"\"\"\npin3: MicroBitAnalogDigitalPin\n\"\"\"Pin con funciones digitales y anal\u00f3gicas.\"\"\"\npin4: MicroBitAnalogDigitalPin\n\"\"\"Pin con funciones digitales y anal\u00f3gicas.\"\"\"\npin5: MicroBitDigitalPin\n\"\"\"Pin con funciones digitales.\"\"\"\npin6: MicroBitDigitalPin\n\"\"\"Pin con funciones digitales.\"\"\"\npin7: MicroBitDigitalPin\n\"\"\"Pin con funciones digitales.\"\"\"\npin8: MicroBitDigitalPin\n\"\"\"Pin con funciones digitales.\"\"\"\npin9: MicroBitDigitalPin\n\"\"\"Pin con funciones digitales.\"\"\"\npin10: MicroBitAnalogDigitalPin\n\"\"\"Pin con funciones digitales y anal\u00f3gicas.\"\"\"\npin11: MicroBitDigitalPin\n\"\"\"Pin con funciones digitales.\"\"\"\npin12: MicroBitDigitalPin\n\"\"\"Pin con funciones digitales.\"\"\"\npin13: MicroBitDigitalPin\n\"\"\"Pin con funciones digitales.\"\"\"\npin14: MicroBitDigitalPin\n\"\"\"Pin con funciones digitales.\"\"\"\npin15: MicroBitDigitalPin\n\"\"\"Pin con funciones digitales.\"\"\"\npin16: MicroBitDigitalPin\n\"\"\"Pin con funciones digitales.\"\"\"\npin19: MicroBitDigitalPin\n\"\"\"Pin con funciones digitales.\"\"\"\npin20: MicroBitDigitalPin\n\"\"\"Pin con funciones digitales.\"\"\"\npin_logo: MicroBitTouchPin\n\"\"\"Un pin t\u00e1ctil sensible en la parte frontal del micro:bit que por defecto est\u00e1 configurado en modo t\u00e1ctil capacitivo. (pin de logo)\"\"\"\npin_speaker: MicroBitAnalogDigitalPin\n\"\"\"Un pin para dirigirse al altavoz micro:bit. (pin de altavoz)\n\nThis API is intended only for use in Pulse-Width Modulation pin operations e.g. pin_speaker.write_analog(128).\n\"\"\"\n\nclass Image:\n \"\"\"Una imagen que se mostrar\u00e1 en la pantalla LED del micro:bit. (imagen)\n\nGiven an image object it's possible to display it via the ``display`` API::\n\n display.show(Image.HAPPY)\"\"\"\n HEART: Image\n \"\"\"Imagen de un coraz\u00f3n. (coraz\u00f3n)\"\"\"\n HEART_SMALL: Image\n \"\"\"Imagen de un coraz\u00f3n peque\u00f1o. (coraz\u00f3n peque\u00f1o)\"\"\"\n HAPPY: Image\n \"\"\"Imagen de una cara feliz. (feliz)\"\"\"\n SMILE: Image\n \"\"\"Imagen de una cara sonriente. (sonrisa)\"\"\"\n SAD: Image\n \"\"\"Imagen de una cara triste. (triste)\"\"\"\n CONFUSED: Image\n \"\"\"Imagen de una cara confundida. (confundida)\"\"\"\n ANGRY: Image\n \"\"\"Imagen de una cara enfadada. (enfadada)\"\"\"\n ASLEEP: Image\n \"\"\"Imagen de una cara durmiendo. (dormida)\"\"\"\n SURPRISED: Image\n \"\"\"Imagen de una cara sorprendida. (sorprendida)\"\"\"\n SILLY: Image\n \"\"\"Imagen de una cara tonta. (tonta)\"\"\"\n FABULOUS: Image\n \"\"\"Imagen de una cara con gafas de sol. (fabulosa)\"\"\"\n MEH: Image\n \"\"\"Imagen de una cara indiferente. (indiferente)\"\"\"\n YES: Image\n \"\"\"Imagen de verificaci\u00f3n. (s\u00ed)\"\"\"\n NO: Image\n \"\"\"Imagen de cruz.\"\"\"\n CLOCK12: Image\n \"\"\"Imagen de una l\u00ednea apuntando a las 12:00. (reloj12)\"\"\"\n CLOCK11: Image\n \"\"\"Imagen de una l\u00ednea apuntando a las 11:00. (reloj11)\"\"\"\n CLOCK10: Image\n \"\"\"Imagen de una l\u00ednea apuntando a las 10:00. (reloj10)\"\"\"\n CLOCK9: Image\n \"\"\"Imagen de una l\u00ednea apuntando a las 9:00. (reloj9)\"\"\"\n CLOCK8: Image\n \"\"\"Imagen de una l\u00ednea apuntando a las 8:00. (reloj8)\"\"\"\n CLOCK7: Image\n \"\"\"Imagen de una l\u00ednea apuntando a las 7:00. (reloj7)\"\"\"\n CLOCK6: Image\n \"\"\"Imagen de una l\u00ednea apuntando a las 6:00. (reloj6)\"\"\"\n CLOCK5: Image\n \"\"\"Imagen de una l\u00ednea apuntando a las 5:00. (reloj5)\"\"\"\n CLOCK4: Image\n \"\"\"Imagen de una l\u00ednea apuntando a las 4:00. (reloj4)\"\"\"\n CLOCK3: Image\n \"\"\"Imagen de una l\u00ednea apuntando a las 3:00. (reloj3)\"\"\"\n CLOCK2: Image\n \"\"\"Imagen de una l\u00ednea apuntando a las 2:00. (reloj2)\"\"\"\n CLOCK1: Image\n \"\"\"Imagen de una l\u00ednea apuntando a la 1:00. (reloj1)\"\"\"\n ARROW_N: Image\n \"\"\"Imagen de una flecha apuntando hacia el norte. (flecha n)\"\"\"\n ARROW_NE: Image\n \"\"\"Imagen de una flecha apuntando hacia el nordeste. (flecha ne)\"\"\"\n ARROW_E: Image\n \"\"\"Imagen de una flecha apuntando hacia el este. (flecha e)\"\"\"\n ARROW_SE: Image\n \"\"\"Imagen de una flecha apuntando hacia el sudeste. (flecha se)\"\"\"\n ARROW_S: Image\n \"\"\"Imagen de una flecha apuntando hacia el sur. (flecha s)\"\"\"\n ARROW_SW: Image\n \"\"\"Imagen de una flecha apuntando hacia el sudoeste. (flecha so)\"\"\"\n ARROW_W: Image\n \"\"\"Imagen de una flecha apuntando hacia el oeste. (flecha o)\"\"\"\n ARROW_NW: Image\n \"\"\"Imagen de una flecha apuntando hacia el noroeste. (flecha no)\"\"\"\n TRIANGLE: Image\n \"\"\"Imagen de un tri\u00e1ngulo apuntando hacia arriba. (tri\u00e1ngulo)\"\"\"\n TRIANGLE_LEFT: Image\n \"\"\"Imagen de un tri\u00e1ngulo en la esquina izquierda. (tri\u00e1ngulo izquierda)\"\"\"\n CHESSBOARD: Image\n \"\"\"LED iluminados de forma alterna seg\u00fan un patr\u00f3n de tablero de ajedrez. (tablero de ajedrez)\"\"\"\n DIAMOND: Image\n \"\"\"Imagen de un diamante. (diamante)\"\"\"\n DIAMOND_SMALL: Image\n \"\"\"Imagen de un diamante peque\u00f1o. (diamante peque\u00f1o)\"\"\"\n SQUARE: Image\n \"\"\"Imagen de un cuadrado. (cuadrado)\"\"\"\n SQUARE_SMALL: Image\n \"\"\"Imagen de un cuadrado peque\u00f1o. (cuadrado peque\u00f1o)\"\"\"\n RABBIT: Image\n \"\"\"Imagen de un conejo. (conejo)\"\"\"\n COW: Image\n \"\"\"Imagen de una vaca. (vaca)\"\"\"\n MUSIC_CROTCHET: Image\n \"\"\"Imagen de una nota negra. (negra musical)\"\"\"\n MUSIC_QUAVER: Image\n \"\"\"Imagen de una nota corchea. (corchea musical)\"\"\"\n MUSIC_QUAVERS: Image\n \"\"\"Imagen de un par de notas corcheas. (corcheas musicales)\"\"\"\n PITCHFORK: Image\n \"\"\"Imagen de una horca. (horca)\"\"\"\n XMAS: Image\n \"\"\"Imagen de un \u00e1rbol de Navidad. (navidad)\"\"\"\n PACMAN: Image\n \"\"\"Imagen del personaje de videojuegos Pac-Man.\"\"\"\n TARGET: Image\n \"\"\"Imagen de un objetivo. (diana)\"\"\"\n TSHIRT: Image\n \"\"\"Imagen de una camiseta. (camiseta)\"\"\"\n ROLLERSKATE: Image\n \"\"\"Imagen de un pat\u00edn. (pat\u00edn)\"\"\"\n DUCK: Image\n \"\"\"Imagen de un pato. (pato)\"\"\"\n HOUSE: Image\n \"\"\"Imagen de una casa. (casa)\"\"\"\n TORTOISE: Image\n \"\"\"Imagen de una tortuga. (tortuga)\"\"\"\n BUTTERFLY: Image\n \"\"\"Imagen de una mariposa. (mariposa)\"\"\"\n STICKFIGURE: Image\n \"\"\"Imagen de un monigote. (monigote)\"\"\"\n GHOST: Image\n \"\"\"Imagen de un fantasma. (fantasma)\"\"\"\n SWORD: Image\n \"\"\"Imagen de una espada. (espada)\"\"\"\n GIRAFFE: Image\n \"\"\"Imagen de una jirafa. (girafa)\"\"\"\n SKULL: Image\n \"\"\"Imagen de una calavera. (calavera)\"\"\"\n UMBRELLA: Image\n \"\"\"Imagen de un paraguas. (paraguas)\"\"\"\n SNAKE: Image\n \"\"\"Imagen de una serpiente. (serpiente)\"\"\"\n SCISSORS: Image\n \"\"\"Scissors image.\"\"\"\n ALL_CLOCKS: List[Image]\n \"\"\"Una lista que contiene todas las im\u00e1genes CLOCK_ en secuencia. (todos los relojes)\"\"\"\n ALL_ARROWS: List[Image]\n \"\"\"Una lista que contiene todas las im\u00e1genes ARROW_ en secuencia. (todas las flechas)\"\"\"\n\n @overload\n def __init__(self, string: str) -> None:\n \"\"\"Crea una imagen a partir de una cadena que describe los LED que est\u00e1n encendidos.\n\n``string`` has to consist of digits 0-9 arranged into lines,\ndescribing the image, for example::\n\n image = Image(\"90009:\"\n \"09090:\"\n \"00900:\"\n \"09090:\"\n \"90009\")\n\nwill create a 5\u00d75 image of an X. The end of a line is indicated by a\ncolon. It's also possible to use newlines (\\\\n) insead of the colons.\n\n:param string: (cadena) La cadena que describe la imagen.\"\"\"\n ...\n\n @overload\n def __init__(self, width: int=5, height: int=5, buffer: ReadableBuffer=None) -> None:\n \"\"\"Crea una imagen vac\u00eda con ``width`` columnas y ``height`` filas.\n\n:param width: (ancho) Ancho opcional de la imagen\n:param height: (altura) Altura opcional de la imagen\n:param buffer: (b\u00fafer) Matriz opcional de bytes de ``width`` \u00d7 ``height`` enteros en el rango 0 - 9 para inicializar la imagen\n\nExamples::\n\n Image(2, 2, b'\\x08\\x08\\x08\\x08')\n Image(2, 2, bytearray([9,9,9,9]))\n\nThese create 2 x 2 pixel images at full brightness.\"\"\"\n ...\n\n def width(self) -> int:\n \"\"\"Obtiene el n\u00famero de columnas. (ancho)\n\n:return: The number of columns in the image\"\"\"\n ...\n\n def height(self) -> int:\n \"\"\"Obtiene el n\u00famero de filas. (altura)\n\n:return: The number of rows in the image\"\"\"\n ...\n\n def set_pixel(self, x: int, y: int, value: int) -> None:\n \"\"\"Establece el brillo de un p\u00edxel. (configurar p\u00edxel)\n\nExample: ``my_image.set_pixel(0, 0, 9)``\n\n:param x: El n\u00famero de columna\n:param y: El n\u00famero de fila\n:param value: (valor) El brillo expresado como un entero entre 0 (oscuro) y 9 (brillante)\n\nThis method will raise an exception when called on any of the built-in\nread-only images, like ``Image.HEART``.\"\"\"\n ...\n\n def get_pixel(self, x: int, y: int) -> int:\n \"\"\"Obtiene el brillo de un p\u00edxel. (obtener p\u00edxel)\n\nExample: ``my_image.get_pixel(0, 0)``\n\n:param x: El n\u00famero de columna\n:param y: El n\u00famero de fila\n:return: The brightness as an integer between 0 and 9.\"\"\"\n ...\n\n def shift_left(self, n: int) -> Image:\n \"\"\"Crea una nueva imagen desplazando la imagen hacia la izquierda. (desplazamiento a la izquierda)\n\nExample: ``Image.HEART_SMALL.shift_left(1)``\n\n:param n: El n\u00famero de columnas a desplazar\n:return: The shifted image\"\"\"\n ...\n\n def shift_right(self, n: int) -> Image:\n \"\"\"Crea una nueva imagen desplazando la imagen hacia la derecha. (desplazamiento a la derecha)\n\nExample: ``Image.HEART_SMALL.shift_right(1)``\n\n:param n: El n\u00famero de columnas a desplazar\n:return: The shifted image\"\"\"\n ...\n\n def shift_up(self, n: int) -> Image:\n \"\"\"Crea una nueva imagen desplazando la imagen hacia arriba. (desplazamiento hacia arriba)\n\nExample: ``Image.HEART_SMALL.shift_up(1)``\n\n:param n: El n\u00famero de filas a desplazar\n:return: The shifted image\"\"\"\n ...\n\n def shift_down(self, n: int) -> Image:\n \"\"\"Crea una nueva imagen desplazando la imagen hacia abajo. (desplazamiento hacia abajo)\n\nExample: ``Image.HEART_SMALL.shift_down(1)``\n\n:param n: El n\u00famero de filas a desplazar\n:return: The shifted image\"\"\"\n ...\n\n def crop(self, x: int, y: int, w: int, h: int) -> Image:\n \"\"\"Crear una nueva imagen recortando la imagen. (recortar)\n\nExample: ``Image.HEART.crop(1, 1, 3, 3)``\n\n:param x: La columna de desplazamiento del recorte\n:param y: La fila de desplazamiento del recorte\n:param w: (a) El ancho del recorte\n:param h: La altura del recorte\n:return: The new image\"\"\"\n ...\n\n def copy(self) -> Image:\n \"\"\"Crea una copia exacta de la imagen. (copiar)\n\nExample: ``Image.HEART.copy()``\n\n:return: The new image\"\"\"\n ...\n\n def invert(self) -> Image:\n \"\"\"Crea una nueva imagen invirtiendo el brillo de los p\u00edxeles de la\nimagen de origen. (invertir)\n\nExample: ``Image.SMALL_HEART.invert()``\n\n:return: The new image.\"\"\"\n ...\n\n def fill(self, value: int) -> None:\n \"\"\"Establece el brillo de todos los p\u00edxeles de la imagen. (llenar)\n\nExample: ``my_image.fill(5)``\n\n:param value: (valor) El nuevo brillo expresado como un n\u00famero entre 0 (oscuro) y 9 (brillante).\n\nThis method will raise an exception when called on any of the built-in\nread-only images, like ``Image.HEART``.\"\"\"\n ...\n\n def blit(self, src: Image, x: int, y: int, w: int, h: int, xdest: int=0, ydest: int=0) -> None:\n \"\"\"Copia un \u00e1rea de otra imagen en esta imagen.\n\nExample: ``my_image.blit(Image.HEART, 1, 1, 3, 3, 1, 1)``\n\n:param src: (org) La imagen de origen\n:param x: El desplazamiento de columna inicial en la imagen de origen\n:param y: El desplazamiento de fila inicial en la imagen de origen\n:param w: (a) El n\u00famero de columnas a copiar\n:param h: El n\u00famero de filas a copiar\n:param xdest: El desplazamiento de columna a modificar en esta imagen\n:param ydest: El desplazamiento de fila a modificar en esta imagen\n\nPixels outside the source image are treated as having a brightness of 0.\n\n``shift_left()``, ``shift_right()``, ``shift_up()``, ``shift_down()``\nand ``crop()`` can are all implemented by using ``blit()``.\n\nFor example, img.crop(x, y, w, h) can be implemented as::\n\n def crop(self, x, y, w, h):\n res = Image(w, h)\n res.blit(self, x, y, w, h)\n return res\"\"\"\n ...\n\n def __repr__(self) -> str:\n \"\"\"Obtiene una representaci\u00f3n en cadena compacta de la imagen.\"\"\"\n ...\n\n def __str__(self) -> str:\n \"\"\"Obtiene una representaci\u00f3n en cadena legible de la imagen. (cad)\"\"\"\n ...\n\n def __add__(self, other: Image) -> Image:\n \"\"\"Crea una nueva imagen sumando los valores de brillo de las dos im\u00e1genes\npara cada p\u00edxel. (a\u00f1adir)\n\nExample: ``Image.HEART + Image.HAPPY``\n\n:param other: (otro) La imagen a a\u00f1adir.\"\"\"\n ...\n\n def __sub__(self, other: Image) -> Image:\n \"\"\"Crea una nueva imagen restando los valores de brillo de la otra imagen a los de esta imagen. (rest)\n\nExample: ``Image.HEART - Image.HEART_SMALL``\n\n:param other: (otro) La imagen a restar.\"\"\"\n ...\n\n def __mul__(self, n: float) -> Image:\n \"\"\"Crea una nueva imagen multiplicando el brillo de cada p\u00edxel por ``n``.\n\nExample: ``Image.HEART * 0.5``\n\n:param n: El valor por el que multiplicar.\"\"\"\n ...\n\n def __truediv__(self, n: float) -> Image:\n \"\"\"Crea una nueva imagen dividiendo el brillo de cada p\u00edxel entre ``n``.\n\nExample: ``Image.HEART / 2``\n\n:param n: El valor entre el que dividir.\"\"\"\n ...\n\nclass SoundEvent:\n LOUD: SoundEvent\n \"\"\"Representa la transici\u00f3n de eventos de sonido, desde ``quiet`` a ``loud``, como aplaudir o gritar. (alto)\"\"\"\n QUIET: SoundEvent\n \"\"\"Representa la transici\u00f3n de eventos de sonido, desde ``loud`` hasta ``quiet``, como hablar o una m\u00fasica de fondo. (silencioso)\"\"\"\n\nclass Sound:\n \"\"\"Los sonidos predefinidos pueden llamarse usando ``audio.play(Sound.NAME)``. (sonido)\"\"\"\n GIGGLE: Sound\n \"\"\"Sonido de risita. (risita)\"\"\"\n HAPPY: Sound\n \"\"\"Sonido alegre. (feliz)\"\"\"\n HELLO: Sound\n \"\"\"Sonido de saludo. (hola)\"\"\"\n MYSTERIOUS: Sound\n \"\"\"Sonido misterioso. (misterioso)\"\"\"\n SAD: Sound\n \"\"\"Sonido triste. (triste)\"\"\"\n SLIDE: Sound\n \"\"\"Sonido deslizante. (deslizante)\"\"\"\n SOARING: Sound\n \"\"\"Sonido creciente. (creciente)\"\"\"\n SPRING: Sound\n \"\"\"Sonido de muelle. (muelle)\"\"\"\n TWINKLE: Sound\n \"\"\"Sonido parpadeante. (parpadeante)\"\"\"\n YAWN: Sound\n \"\"\"Sonido de bostezo. (bostezo)\"\"\"", "/typeshed/stdlib/microbit/accelerometer.pyi": "\"\"\"Mide la aceleraci\u00f3n del micro:bit y reconoce gestos. (aceler\u00f3metro)\"\"\"\nfrom typing import Tuple\n\ndef get_x() -> int:\n \"\"\"Obtiene la medici\u00f3n de la aceleraci\u00f3n en el eje ``x`` en mili-g. (obtener x)\n\nExample: ``accelerometer.get_x()``\n\n:return: A positive or negative integer depending on direction in the range +/- 2000mg.\"\"\"\n ...\n\ndef get_y() -> int:\n \"\"\"Obtiene la medici\u00f3n de la aceleraci\u00f3n en el eje ``y`` en mili-g. (obtener y)\n\nExample: ``accelerometer.get_y()``\n\n:return: A positive or negative integer depending on direction in the range +/- 2000mg.\"\"\"\n ...\n\ndef get_z() -> int:\n \"\"\"Obtiene la medici\u00f3n de la aceleraci\u00f3n en el eje ``z`` en mili-g. (obtener z)\n\nExample: ``accelerometer.get_z()``\n\n:return: A positive or negative integer depending on direction in the range +/- 2000mg.\"\"\"\n ...\n\ndef get_values() -> Tuple[int, int, int]:\n \"\"\"Obtiene las mediciones de las aceleraciones en todos los ejes como una tupla. (obtener valores)\n\nExample: ``x, y, z = accelerometer.get_values()``\n\n:return: a three-element tuple of integers ordered as X, Y, Z, each value a positive or negative integer depending on direction in the range +/- 2000mg\"\"\"\n ...\n\ndef get_strength() -> int:\n \"\"\"Get the acceleration measurement of all axes combined, as a positive integer. This is the Pythagorean sum of the X, Y and Z axes.\n\nExample: ``accelerometer.get_strength()``\n\n:return: The combined acceleration strength of all the axes, in milli-g.\"\"\"\n ...\n\ndef current_gesture() -> str:\n \"\"\"Obtiene el nombre del gesto actual. (gesto actual)\n\nExample: ``accelerometer.current_gesture()``\n\nMicroPython understands the following gesture names: ``\"up\"``, ``\"down\"``,\n``\"left\"``, ``\"right\"``, ``\"face up\"``, ``\"face down\"``, ``\"freefall\"``,\n``\"3g\"``, ``\"6g\"``, ``\"8g\"``, ``\"shake\"``. Gestures are always\nrepresented as strings.\n\n:return: The current gesture\"\"\"\n ...\n\ndef is_gesture(name: str) -> bool:\n \"\"\"Comprueba si el gesto est\u00e1 actualmente activo. (gesto activo)\n\nExample: ``accelerometer.is_gesture('shake')``\n\nMicroPython understands the following gesture names: ``\"up\"``, ``\"down\"``,\n``\"left\"``, ``\"right\"``, ``\"face up\"``, ``\"face down\"``, ``\"freefall\"``,\n``\"3g\"``, ``\"6g\"``, ``\"8g\"``, ``\"shake\"``. Gestures are always\nrepresented as strings.\n\n:param name: (nombre) El nombre del gesto.\n:return: ``True`` if the gesture is active, ``False`` otherwise.\"\"\"\n ...\n\ndef was_gesture(name: str) -> bool:\n \"\"\"Comprueba si el gesto estuvo activo desde la \u00faltima llamada. (gesto anterior)\n\nExample: ``accelerometer.was_gesture('shake')``\n\nMicroPython understands the following gesture names: ``\"up\"``, ``\"down\"``,\n``\"left\"``, ``\"right\"``, ``\"face up\"``, ``\"face down\"``, ``\"freefall\"``,\n``\"3g\"``, ``\"6g\"``, ``\"8g\"``, ``\"shake\"``. Gestures are always\nrepresented as strings.\n\n:param name: (nombre) El nombre del gesto.\n:return: ``True`` if the gesture was active since the last call, ``False`` otherwise.\"\"\"\n\ndef get_gestures() -> Tuple[str, ...]:\n \"\"\"Devuelve una tupla con el historial de gestos. (obtener gestos)\n\nExample: ``accelerometer.get_gestures()``\n\nClears the gesture history before returning.\n\nGestures are not updated in the background so there needs to be constant\ncalls to some accelerometer method to do the gesture detection. Usually\ngestures can be detected using a loop with a small :func:`microbit.sleep` delay.\n\n:return: The history as a tuple, most recent last.\"\"\"\n ...\n\ndef set_range(value: int) -> None:\n \"\"\"Set the accelerometer sensitivity range, in g (standard gravity), to the closest values supported by the hardware, so it rounds to either ``2``, ``4``, or ``8`` g.\n\nExample: ``accelerometer.set_range(8)``\n\n:param value: (valor) New range for the accelerometer, an integer in ``g``.\"\"\"", "/typeshed/stdlib/microbit/audio.pyi": "\"\"\"Reproducir sonidos usando el micro:bit (importar ``audio`` para compatibilidad con V1).\"\"\"\nfrom ..microbit import MicroBitDigitalPin, Sound, pin0\nfrom typing import ClassVar, Iterable, Union\n\ndef play(source: Union[Iterable[AudioFrame], Sound, SoundEffect], wait: bool=True, pin: MicroBitDigitalPin=pin0, return_pin: Union[MicroBitDigitalPin, None]=None) -> None:\n \"\"\"Play a built-in sound, sound effect or custom audio frames. (reproducir)\n\nExample: ``audio.play(Sound.GIGGLE)``\n\n:param source: (origen) A built-in ``Sound`` such as ``Sound.GIGGLE``, a ``SoundEffect`` or sample data as an iterable of ``AudioFrame`` objects.\n:param wait: (esperar) Si ``wait`` es ``True`` (verdadero), la funci\u00f3n se bloquear\u00e1 hasta que el sonido finalice.\n:param pin: Se puede usar un argumento opcional para especificar el pin de salida, reemplazando el valor predeterminado de ``pin0``. Si no queremos que se reproduzca ning\u00fan sonido, podemos usar ``pin=None``.\n:param return_pin: (devolver pin) Especifica un pin de conector de borde diferencial para conectarse a un altavoz externo en lugar de tierra. Esto se ignora para la revisi\u00f3n **V2**.\"\"\"\n\ndef is_playing() -> bool:\n \"\"\"Comprueba si se est\u00e1 reproduciendo un sonido. (reproduciendo)\n\nExample: ``audio.is_playing()``\n\n:return: ``True`` if audio is playing, otherwise ``False``.\"\"\"\n ...\n\ndef stop() -> None:\n \"\"\"Detiene la reproducci\u00f3n de audio. (detener)\n\nExample: ``audio.stop()``\"\"\"\n ...\n\nclass SoundEffect:\n \"\"\"A sound effect, composed by a set of parameters configured via the constructor or attributes.\"\"\"\n WAVEFORM_SINE: ClassVar[int]\n \"\"\"Sine wave option used for the ``waveform`` parameter.\"\"\"\n WAVEFORM_SAWTOOTH: ClassVar[int]\n \"\"\"Sawtooth wave option used for the ``waveform`` parameter.\"\"\"\n WAVEFORM_TRIANGLE: ClassVar[int]\n \"\"\"Triangle wave option used for the ``waveform`` parameter.\"\"\"\n WAVEFORM_SQUARE: ClassVar[int]\n \"\"\"Square wave option used for the ``waveform`` parameter.\"\"\"\n WAVEFORM_NOISE: ClassVar[int]\n \"\"\"Noise option used for the ``waveform`` parameter.\"\"\"\n SHAPE_LINEAR: ClassVar[int]\n \"\"\"Linear interpolation option used for the ``shape`` parameter.\"\"\"\n SHAPE_CURVE: ClassVar[int]\n \"\"\"Curve interpolation option used for the ``shape`` parameter.\"\"\"\n SHAPE_LOG: ClassVar[int]\n \"\"\"Logarithmic interpolation option used for the ``shape`` parameter.\"\"\"\n FX_NONE: ClassVar[int]\n \"\"\"No effect option used for the ``fx`` parameter.\"\"\"\n FX_TREMOLO: ClassVar[int]\n \"\"\"Tremelo effect option used for the ``fx`` parameter.\"\"\"\n FX_VIBRATO: ClassVar[int]\n \"\"\"Vibrato effect option used for the ``fx`` parameter.\"\"\"\n FX_WARBLE: ClassVar[int]\n \"\"\"Warble effect option used for the ``fx`` parameter.\"\"\"\n freq_start: int\n \"\"\"Start frequency in Hertz (Hz), a number between ``0`` and ``9999``\"\"\"\n freq_end: int\n \"\"\"End frequency in Hertz (Hz), a number between ``0`` and ``9999``\"\"\"\n duration: int\n \"\"\"Duration of the sound in milliseconds, a number between ``0`` and ``9999`` (duraci\u00f3n)\"\"\"\n vol_start: int\n \"\"\"Start volume value, a number between ``0`` and ``255``\"\"\"\n vol_end: int\n \"\"\"End volume value, a number between ``0`` and ``255``\"\"\"\n waveform: int\n \"\"\"Type of waveform shape, one of these values: ``WAVEFORM_SINE``, ``WAVEFORM_SAWTOOTH``, ``WAVEFORM_TRIANGLE``, ``WAVEFORM_SQUARE``, ``WAVEFORM_NOISE`` (randomly generated noise)\"\"\"\n fx: int\n \"\"\"Effect to add on the sound, one of the following values: ``FX_TREMOLO``, ``FX_VIBRATO``, ``FX_WARBLE``, or ``FX_NONE``\"\"\"\n shape: int\n \"\"\"The type of the interpolation curve between the start and end frequencies, different wave shapes have different rates of change in frequency. One of the following values: ``SHAPE_LINEAR``, ``SHAPE_CURVE``, ``SHAPE_LOG``\"\"\"\n\n def __init__(self, freq_start: int=500, freq_end: int=2500, duration: int=500, vol_start: int=255, vol_end: int=0, waveform: int=WAVEFORM_SQUARE, fx: int=FX_NONE, shape: int=SHAPE_LOG):\n \"\"\"Create a new sound effect.\n\nExample: ``my_effect = SoundEffect(duration=1000)``\n\nAll the parameters are optional, with default values as shown above, and\nthey can all be modified via attributes of the same name. For example, we\ncan first create an effect ``my_effect = SoundEffect(duration=1000)``,\nand then change its attributes ``my_effect.duration = 500``.\n\n:param freq_start: Start frequency in Hertz (Hz), a number between ``0`` and ``9999``.\n:param freq_end: End frequency in Hertz (Hz), a number between ``0`` and ``9999``.\n:param duration: (duraci\u00f3n) Duration of the sound in milliseconds, a number between ``0`` and ``9999``.\n:param vol_start: Start volume value, a number between ``0`` and ``255``.\n:param vol_end: End volume value, a number between ``0`` and ``255``.\n:param waveform: Type of waveform shape, one of these values: ``WAVEFORM_SINE``, ``WAVEFORM_SAWTOOTH``, ``WAVEFORM_TRIANGLE``, ``WAVEFORM_SQUARE``, ``WAVEFORM_NOISE`` (randomly generated noise).\n:param fx: Effect to add on the sound, one of the following values: ``FX_TREMOLO``, ``FX_VIBRATO``, ``FX_WARBLE``, or ``FX_NONE``.\n:param shape: The type of the interpolation curve between the start and end frequencies, different wave shapes have different rates of change in frequency. One of the following values: ``SHAPE_LINEAR``, ``SHAPE_CURVE``, ``SHAPE_LOG``.\"\"\"\n\n def copy(self) -> SoundEffect:\n \"\"\"Create a copy of this ``SoundEffect``. (copiar)\n\nExample: ``sound_2 = sound_1.copy()``\n\n:return: A copy of the SoundEffect.\"\"\"\n\nclass AudioFrame:\n \"\"\"Un objeto ``AudioFrame`` es una lista de 32 muestras, cada una de las cuales es un byte\nsin signo (n\u00famero entero entre 0 y 255).\n\nIt takes just over 4 ms to play a single frame.\n\nExample::\n\n frame = AudioFrame()\n for i in range(len(frame)):\n frame[i] = 252 - i * 8\"\"\"\n\n def copyfrom(self, other: AudioFrame) -> None:\n \"\"\"Overwrite the data in this ``AudioFrame`` with the data from another ``AudioFrame`` instance.\n\nExample: ``my_frame.copyfrom(source_frame)``\n\n:param other: (otro) ``AudioFrame`` instance from which to copy the data.\"\"\"\n\n def __len__(self) -> int:\n ...\n\n def __setitem__(self, key: int, value: int) -> None:\n ...\n\n def __getitem__(self, key: int) -> int:\n ...", @@ -46,6 +45,7 @@ "/typeshed/stdlib/microbit/speaker.pyi": "\"\"\"Controlar el altavoz integrado (solo V2). (altavoz)\"\"\"\n\ndef off() -> None:\n \"\"\"Apaga el altavoz. (apagado)\n\nExample: ``speaker.off()``\n\nThis does not disable sound output to an edge connector pin.\"\"\"\n ...\n\ndef on() -> None:\n \"\"\"Enciende el altavoz. (encendido)\n\nExample: ``speaker.on()``\"\"\"\n ...", "/typeshed/stdlib/microbit/spi.pyi": "\"\"\"Comunicarse con dispositivos que usan el bus de interfaz de perif\u00e9ricos serie (SPI, por sus siglas en ingl\u00e9s).\"\"\"\nfrom _typeshed import ReadableBuffer, WriteableBuffer\nfrom ..microbit import pin13, pin14, pin15, MicroBitDigitalPin\n\ndef init(baudrate: int=1000000, bits: int=8, mode: int=0, sclk: MicroBitDigitalPin=pin13, mosi: MicroBitDigitalPin=pin15, miso: MicroBitDigitalPin=pin14) -> None:\n \"\"\"Inicializa la comunicaci\u00f3n SPI.\n\nExample: ``spi.init()``\n\nFor correct communication, the parameters have to be the same on both communicating devices.\n\n:param baudrate: (tasa de baudios) La velocidad de comunicaci\u00f3n.\n:param bits: El ancho en bits de cada transferencia. Actualmente solo se admite ``bits=8}, pero esto puede cambiar en el futuro.\n:param mode: (modo) Determina la combinaci\u00f3n de fase y polaridad del reloj - `ver tabla en l\u00ednea `_.\n:param sclk: pin SCLK (por defecto, 13)\n:param mosi: pin MOSI (por defecto, 15)\n:param miso: pin MISO (por defecto, 14)\"\"\"\n ...\n\ndef read(nbytes: int) -> bytes:\n \"\"\"Lee bytes. (leer)\n\nExample: ``spi.read(64)``\n\n:param nbytes: N\u00famero m\u00e1ximo de bytes a leer.\n:return: The bytes read.\"\"\"\n ...\n\ndef write(buffer: ReadableBuffer) -> None:\n \"\"\"Escribe bytes en el bus. (escribir)\n\nExample: ``spi.write(bytes([1, 2, 3]))``\n\n:param buffer: (b\u00fafer) Un b\u00fafer del que leer datos.\"\"\"\n ...\n\ndef write_readinto(out: WriteableBuffer, in_: ReadableBuffer) -> None:\n \"\"\"Escribe el b\u00fafer ``out`` en el bus y lee cualquier respuesta en el b\u00fafer ``in_``. (escritura leeren)\n\nExample: ``spi.write_readinto(out_buffer, in_buffer)``\n\nThe length of the buffers should be the same. The buffers can be the same object.\n\n:param out: (a) El b\u00fafer en el que escribe una respuesta.\n:param in_: (de) El b\u00fafer del que leer datos.\"\"\"\n ...", "/typeshed/stdlib/microbit/uart.pyi": "\"\"\"Comunicarse con un dispositivo usando una interfaz serie.\"\"\"\nfrom _typeshed import WriteableBuffer\nfrom ..microbit import MicroBitDigitalPin\nfrom typing import Optional, Union\nODD: int\n\"\"\"Paridad impar (impar)\"\"\"\nEVEN: int\n\"\"\"Paridad par (par)\"\"\"\n\ndef init(baudrate: int=9600, bits: int=8, parity: Optional[int]=None, stop: int=1, tx: Optional[MicroBitDigitalPin]=None, rx: Optional[MicroBitDigitalPin]=None) -> None:\n \"\"\"Inicializa la comunicaci\u00f3n serie.\n\nExample: ``uart.init(115200, tx=pin0, rx=pin1)``\n\n:param baudrate: (tasa de baudios) La velocidad de comunicaci\u00f3n.\n:param bits: El tama\u00f1o de bytes transmitidos; micro:bit solo admite 8.\n:param parity: (paridad) C\u00f3mo se comprueba la paridad: ``None``, ``uart.ODD`` o ``uart.EVEN``.\n:param stop: (detener) El n\u00famero de bits de parada; tiene que ser 1 para el micro:bit.\n:param tx: Pin transmisor.\n:param rx: Pin receptor.\n\nInitializing the UART on external pins will cause the Python console on\nUSB to become unaccessible, as it uses the same hardware. To bring the\nconsole back you must reinitialize the UART without passing anything for\n``tx`` or ``rx`` (or passing ``None`` to these arguments). This means\nthat calling ``uart.init(115200)`` is enough to restore the Python console.\n\nFor more details see `the online documentation `_.\"\"\"\n ...\n\ndef any() -> bool:\n \"\"\"Comprueba si hay alg\u00fan dato esperando. (alg\u00fan)\n\nExample: ``uart.any()``\n\n:return: ``True`` if any data is waiting, else ``False``.\"\"\"\n ...\n\ndef read(nbytes: Optional[int]=None) -> Optional[bytes]:\n \"\"\"Lee bytes. (leer)\n\nExample: ``uart.read()``\n\n:param nbytes: Si se especifica ``nbytes``, lee como m\u00e1ximo ese n\u00famero de bytes; si no, lee tantos bytes como sea posible\n:return: A bytes object or ``None`` on timeout\"\"\"\n ...\n\ndef readinto(buf: WriteableBuffer, nbytes: Optional[int]=None) -> Optional[int]:\n \"\"\"Lee bytes en el ``buf``. (leeren)\n\nExample: ``uart.readinto(input_buffer)``\n\n:param buf: (b\u00faf) El b\u00fafer en el que escribir.\n:param nbytes: Si se especifica ``nbytes``, lee como m\u00e1ximo ese n\u00famero de bytes; si no, lee ``len(buf)`` bytes.\n:return: number of bytes read and stored into ``buf`` or ``None`` on timeout.\"\"\"\n ...\n\ndef readline() -> Optional[bytes]:\n \"\"\"Lee una l\u00ednea, terminando en un car\u00e1cter de nueva l\u00ednea. (leerl\u00ednea)\n\nExample: ``uart.readline()``\n\n:return: The line read or ``None`` on timeout. The newline character is included in the returned bytes.\"\"\"\n ...\n\ndef write(buf: Union[bytes, str]) -> Optional[int]:\n \"\"\"Escribe un b\u00fafer en el bus. (escribir)\n\nExample: ``uart.write('hello world')``\n\n:param buf: (b\u00faf) Un objeto de bytes o una cadena.\n:return: The number of bytes written, or ``None`` on timeout.\n\nExamples::\n\n uart.write('hello world')\n uart.write(b'hello world')\n uart.write(bytes([1, 2, 3]))\"\"\"\n ...", + "/typeshed/stdlib/collections/__init__.pyi": "import sys\nfrom typing import (\n Any,\n Dict,\n Generic,\n ItemsView,\n Iterable,\n Iterator,\n KeysView,\n Optional,\n Reversible,\n Tuple,\n Type,\n TypeVar,\n Union,\n ValuesView,\n)\n\n_S = TypeVar(\"_S\")\n_T = TypeVar(\"_T\")\n_KT = TypeVar(\"_KT\")\n_VT = TypeVar(\"_VT\")\n\nif sys.version_info >= (3, 7):\n def namedtuple(\n typename: str,\n field_names: Union[str, Iterable[str]],\n *,\n rename: bool = ...,\n module: Optional[str] = ...,\n defaults: Optional[Iterable[Any]] = ...,\n ) -> Type[Tuple[Any, ...]]: ...\n\nelse:\n def namedtuple(\n typename: str,\n field_names: Union[str, Iterable[str]],\n *,\n verbose: bool = ...,\n rename: bool = ...,\n module: Optional[str] = ...,\n ) -> Type[Tuple[Any, ...]]: ...\n\nclass _OrderedDictKeysView(KeysView[_KT], Reversible[_KT]):\n def __reversed__(self) -> Iterator[_KT]: ...\n\nclass _OrderedDictItemsView(ItemsView[_KT, _VT], Reversible[Tuple[_KT, _VT]]):\n def __reversed__(self) -> Iterator[Tuple[_KT, _VT]]: ...\n\nclass _OrderedDictValuesView(ValuesView[_VT], Reversible[_VT]):\n def __reversed__(self) -> Iterator[_VT]: ...\n\nclass OrderedDict(Dict[_KT, _VT], Reversible[_KT], Generic[_KT, _VT]):\n def popitem(self, last: bool = ...) -> Tuple[_KT, _VT]: ...\n def move_to_end(self, key: _KT, last: bool = ...) -> None: ...\n def copy(self: _S) -> _S: ...\n def __reversed__(self) -> Iterator[_KT]: ...\n def keys(self) -> _OrderedDictKeysView[_KT]: ...\n def items(self) -> _OrderedDictItemsView[_KT, _VT]: ...\n def values(self) -> _OrderedDictValuesView[_VT]: ...\n", "/src/pyrightconfig.json": "{ \n \"pythonVersion\": \"3.6\",\n \"pythonPlatform\": \"Linux\",\n \"typeCheckingMode\": \"basic\",\n \"typeshedPath\": \"/typeshed/\",\n \"reportMissingModuleSource\": false,\n \"reportWildcardImportFromLibrary\": false,\n \"verboseOutput\": true\n }\n" } } \ No newline at end of file diff --git a/src/micropython/main/typeshed.fr.json b/src/micropython/main/typeshed.fr.json index d7865f3c8..0f2a0032a 100644 --- a/src/micropython/main/typeshed.fr.json +++ b/src/micropython/main/typeshed.fr.json @@ -8,7 +8,7 @@ "/typeshed/stdlib/builtins.pyi": "import sys\nimport types\nfrom _typeshed import (\n OpenBinaryMode,\n OpenTextMode,\n ReadableBuffer,\n Self,\n StrOrBytesPath,\n SupportsDivMod,\n SupportsKeysAndGetItem,\n SupportsLenAndGetItem,\n SupportsLessThan,\n SupportsLessThanT,\n SupportsRDivMod,\n SupportsWrite,\n)\nfrom types import CodeType, TracebackType\nfrom typing import (\n IO,\n AbstractSet,\n Any,\n AsyncIterable,\n AsyncIterator,\n BinaryIO,\n ByteString,\n Callable,\n FrozenSet,\n Generic,\n ItemsView,\n Iterable,\n Iterator,\n KeysView,\n Mapping,\n MutableMapping,\n MutableSequence,\n MutableSet,\n NoReturn,\n Protocol,\n Reversible,\n Sequence,\n Set,\n Sized,\n SupportsAbs,\n SupportsBytes,\n SupportsComplex,\n SupportsFloat,\n SupportsInt,\n SupportsRound,\n TextIO,\n Tuple,\n Type,\n TypeVar,\n Union,\n ValuesView,\n overload,\n)\nfrom typing_extensions import Literal, SupportsIndex, final\n\nif sys.version_info >= (3, 9):\n from types import GenericAlias\n\nclass _SupportsTrunc(Protocol):\n def __trunc__(self) -> int: ...\n\n_T = TypeVar(\"_T\")\n_T_co = TypeVar(\"_T_co\", covariant=True)\n_T_contra = TypeVar(\"_T_contra\", contravariant=True)\n_KT = TypeVar(\"_KT\")\n_VT = TypeVar(\"_VT\")\n_S = TypeVar(\"_S\")\n_T1 = TypeVar(\"_T1\")\n_T2 = TypeVar(\"_T2\")\n_T3 = TypeVar(\"_T3\")\n_T4 = TypeVar(\"_T4\")\n_T5 = TypeVar(\"_T5\")\n_TT = TypeVar(\"_TT\", bound=\"type\")\n_TBE = TypeVar(\"_TBE\", bound=\"BaseException\")\n\nclass object:\n __doc__: str | None\n __dict__: dict[str, Any]\n __slots__: str | Iterable[str]\n __module__: str\n __annotations__: dict[str, Any]\n @property\n def __class__(self: _T) -> Type[_T]: ...\n # Ignore errors about type mismatch between property getter and setter\n @__class__.setter\n def __class__(self, __type: Type[object]) -> None: ... # type: ignore # noqa: F811\n def __init__(self) -> None: ...\n def __new__(cls: Type[_T]) -> _T: ...\n def __setattr__(self, name: str, value: Any) -> None: ...\n def __eq__(self, o: object) -> bool: ...\n def __ne__(self, o: object) -> bool: ...\n def __str__(self) -> str: ...\n def __repr__(self) -> str: ...\n def __hash__(self) -> int: ...\n def __format__(self, format_spec: str) -> str: ...\n def __getattribute__(self, name: str) -> Any: ...\n def __delattr__(self, name: str) -> None: ...\n def __sizeof__(self) -> int: ...\n def __reduce__(self) -> str | Tuple[Any, ...]: ...\n if sys.version_info >= (3, 8):\n def __reduce_ex__(self, protocol: SupportsIndex) -> str | Tuple[Any, ...]: ...\n else:\n def __reduce_ex__(self, protocol: int) -> str | Tuple[Any, ...]: ...\n def __dir__(self) -> Iterable[str]: ...\n def __init_subclass__(cls) -> None: ...\n\nclass staticmethod(object): # Special, only valid as a decorator.\n __func__: Callable[..., Any]\n __isabstractmethod__: bool\n def __init__(self, f: Callable[..., Any]) -> None: ...\n def __new__(cls: Type[_T], *args: Any, **kwargs: Any) -> _T: ...\n def __get__(self, obj: _T, type: Type[_T] | None = ...) -> Callable[..., Any]: ...\n\nclass classmethod(object): # Special, only valid as a decorator.\n __func__: Callable[..., Any]\n __isabstractmethod__: bool\n def __init__(self, f: Callable[..., Any]) -> None: ...\n def __new__(cls: Type[_T], *args: Any, **kwargs: Any) -> _T: ...\n def __get__(self, obj: _T, type: Type[_T] | None = ...) -> Callable[..., Any]: ...\n\nclass type(object):\n __base__: type\n __bases__: Tuple[type, ...]\n __basicsize__: int\n __dict__: dict[str, Any]\n __dictoffset__: int\n __flags__: int\n __itemsize__: int\n __module__: str\n __name__: str\n __qualname__: str\n __text_signature__: str | None\n __weakrefoffset__: int\n @overload\n def __init__(self, o: object) -> None: ...\n @overload\n def __init__(\n self, name: str, bases: Tuple[type, ...], dict: dict[str, Any], **kwds: Any\n ) -> None: ...\n @overload\n def __new__(cls, o: object) -> type: ...\n @overload\n def __new__(\n cls: Type[_TT],\n name: str,\n bases: Tuple[type, ...],\n namespace: dict[str, Any],\n **kwds: Any,\n ) -> _TT: ...\n def __call__(self, *args: Any, **kwds: Any) -> Any: ...\n def __subclasses__(self: _TT) -> list[_TT]: ...\n def __instancecheck__(self, instance: Any) -> bool: ...\n def __subclasscheck__(self, subclass: type) -> bool: ...\n @classmethod\n def __prepare__(\n metacls, __name: str, __bases: Tuple[type, ...], **kwds: Any\n ) -> Mapping[str, Any]: ...\n if sys.version_info >= (3, 10):\n def __or__(self, t: Any) -> types.UnionType: ...\n def __ror__(self, t: Any) -> types.UnionType: ...\n\nclass super(object):\n @overload\n def __init__(self, t: Any, obj: Any) -> None: ...\n @overload\n def __init__(self, t: Any) -> None: ...\n @overload\n def __init__(self) -> None: ...\n\nclass int:\n @overload\n def __new__(\n cls: Type[_T],\n x: str | bytes | SupportsInt | SupportsIndex | _SupportsTrunc = ...,\n ) -> _T: ...\n @overload\n def __new__(\n cls: Type[_T], x: str | bytes | bytearray, base: SupportsIndex\n ) -> _T: ...\n def to_bytes(\n self,\n length: SupportsIndex,\n byteorder: Literal[\"little\", \"big\"],\n *,\n signed: bool = ...,\n ) -> bytes: ...\n @classmethod\n def from_bytes(\n cls,\n bytes: Iterable[SupportsIndex] | SupportsBytes,\n byteorder: Literal[\"little\", \"big\"],\n *,\n signed: bool = ...,\n ) -> int: ... # TODO buffer object argument\n def __add__(self, x: int) -> int: ...\n def __sub__(self, x: int) -> int: ...\n def __mul__(self, x: int) -> int: ...\n def __floordiv__(self, x: int) -> int: ...\n def __truediv__(self, x: int) -> float: ...\n def __mod__(self, x: int) -> int: ...\n def __divmod__(self, x: int) -> Tuple[int, int]: ...\n def __radd__(self, x: int) -> int: ...\n def __rsub__(self, x: int) -> int: ...\n def __rmul__(self, x: int) -> int: ...\n def __rfloordiv__(self, x: int) -> int: ...\n def __rtruediv__(self, x: int) -> float: ...\n def __rmod__(self, x: int) -> int: ...\n def __rdivmod__(self, x: int) -> Tuple[int, int]: ...\n @overload\n def __pow__(self, __x: Literal[2], __modulo: int | None = ...) -> int: ...\n @overload\n def __pow__(\n self, __x: int, __modulo: int | None = ...\n ) -> Any: ... # Return type can be int or float, depending on x.\n def __rpow__(self, x: int, mod: int | None = ...) -> Any: ...\n def __and__(self, n: int) -> int: ...\n def __or__(self, n: int) -> int: ...\n def __xor__(self, n: int) -> int: ...\n def __lshift__(self, n: int) -> int: ...\n def __rshift__(self, n: int) -> int: ...\n def __rand__(self, n: int) -> int: ...\n def __ror__(self, n: int) -> int: ...\n def __rxor__(self, n: int) -> int: ...\n def __rlshift__(self, n: int) -> int: ...\n def __rrshift__(self, n: int) -> int: ...\n def __neg__(self) -> int: ...\n def __pos__(self) -> int: ...\n def __invert__(self) -> int: ...\n def __trunc__(self) -> int: ...\n def __ceil__(self) -> int: ...\n def __floor__(self) -> int: ...\n def __round__(self, ndigits: SupportsIndex = ...) -> int: ...\n def __getnewargs__(self) -> Tuple[int]: ...\n def __eq__(self, x: object) -> bool: ...\n def __ne__(self, x: object) -> bool: ...\n def __lt__(self, x: int) -> bool: ...\n def __le__(self, x: int) -> bool: ...\n def __gt__(self, x: int) -> bool: ...\n def __ge__(self, x: int) -> bool: ...\n def __str__(self) -> str: ...\n def __float__(self) -> float: ...\n def __int__(self) -> int: ...\n def __abs__(self) -> int: ...\n def __hash__(self) -> int: ...\n def __bool__(self) -> bool: ...\n def __index__(self) -> int: ...\n\nclass float:\n def __new__(\n cls: Type[_T], x: SupportsFloat | SupportsIndex | str | bytes | bytearray = ...\n ) -> _T: ...\n def __add__(self, x: float) -> float: ...\n def __sub__(self, x: float) -> float: ...\n def __mul__(self, x: float) -> float: ...\n def __floordiv__(self, x: float) -> float: ...\n def __truediv__(self, x: float) -> float: ...\n def __mod__(self, x: float) -> float: ...\n def __divmod__(self, x: float) -> Tuple[float, float]: ...\n def __pow__(\n self, x: float, mod: None = ...\n ) -> float: ... # In Python 3, returns complex if self is negative and x is not whole\n def __radd__(self, x: float) -> float: ...\n def __rsub__(self, x: float) -> float: ...\n def __rmul__(self, x: float) -> float: ...\n def __rfloordiv__(self, x: float) -> float: ...\n def __rtruediv__(self, x: float) -> float: ...\n def __rmod__(self, x: float) -> float: ...\n def __rdivmod__(self, x: float) -> Tuple[float, float]: ...\n def __rpow__(self, x: float, mod: None = ...) -> float: ...\n def __getnewargs__(self) -> Tuple[float]: ...\n def __trunc__(self) -> int: ...\n if sys.version_info >= (3, 9):\n def __ceil__(self) -> int: ...\n def __floor__(self) -> int: ...\n @overload\n def __round__(self, ndigits: None = ...) -> int: ...\n @overload\n def __round__(self, ndigits: SupportsIndex) -> float: ...\n def __eq__(self, x: object) -> bool: ...\n def __ne__(self, x: object) -> bool: ...\n def __lt__(self, x: float) -> bool: ...\n def __le__(self, x: float) -> bool: ...\n def __gt__(self, x: float) -> bool: ...\n def __ge__(self, x: float) -> bool: ...\n def __neg__(self) -> float: ...\n def __pos__(self) -> float: ...\n def __str__(self) -> str: ...\n def __int__(self) -> int: ...\n def __float__(self) -> float: ...\n def __abs__(self) -> float: ...\n def __hash__(self) -> int: ...\n def __bool__(self) -> bool: ...\n\nclass complex:\n @overload\n def __new__(cls: Type[_T], real: float = ..., imag: float = ...) -> _T: ...\n @overload\n def __new__(\n cls: Type[_T], real: str | SupportsComplex | SupportsIndex | complex\n ) -> _T: ...\n @property\n def real(self) -> float: ...\n @property\n def imag(self) -> float: ...\n def __add__(self, x: complex) -> complex: ...\n def __sub__(self, x: complex) -> complex: ...\n def __mul__(self, x: complex) -> complex: ...\n def __pow__(self, x: complex, mod: None = ...) -> complex: ...\n def __truediv__(self, x: complex) -> complex: ...\n def __radd__(self, x: complex) -> complex: ...\n def __rsub__(self, x: complex) -> complex: ...\n def __rmul__(self, x: complex) -> complex: ...\n def __rpow__(self, x: complex, mod: None = ...) -> complex: ...\n def __rtruediv__(self, x: complex) -> complex: ...\n def __eq__(self, x: object) -> bool: ...\n def __ne__(self, x: object) -> bool: ...\n def __neg__(self) -> complex: ...\n def __pos__(self) -> complex: ...\n def __str__(self) -> str: ...\n def __abs__(self) -> float: ...\n def __hash__(self) -> int: ...\n def __bool__(self) -> bool: ...\n\nclass str(Sequence[str]):\n @overload\n def __new__(cls: Type[_T], o: object = ...) -> _T: ...\n @overload\n def __new__(\n cls: Type[_T], o: bytes, encoding: str = ..., errors: str = ...\n ) -> _T: ...\n def count(\n self,\n x: str,\n __start: SupportsIndex | None = ...,\n __end: SupportsIndex | None = ...,\n ) -> int: ...\n def encode(self, encoding: str = ..., errors: str = ...) -> bytes: ...\n def endswith(\n self,\n __suffix: str | Tuple[str, ...],\n __start: SupportsIndex | None = ...,\n __end: SupportsIndex | None = ...,\n ) -> bool: ...\n def find(\n self,\n __sub: str,\n __start: SupportsIndex | None = ...,\n __end: SupportsIndex | None = ...,\n ) -> int: ...\n def format(self, *args: object, **kwargs: object) -> str: ...\n def index(\n self,\n __sub: str,\n __start: SupportsIndex | None = ...,\n __end: SupportsIndex | None = ...,\n ) -> int: ...\n def isalpha(self) -> bool: ...\n def isdigit(self) -> bool: ...\n def islower(self) -> bool: ...\n def isspace(self) -> bool: ...\n def isupper(self) -> bool: ...\n def join(self, __iterable: Iterable[str]) -> str: ...\n def lower(self) -> str: ...\n def lstrip(self, __chars: str | None = ...) -> str: ...\n def replace(self, __old: str, __new: str, __count: SupportsIndex = ...) -> str: ...\n def rfind(\n self,\n __sub: str,\n __start: SupportsIndex | None = ...,\n __end: SupportsIndex | None = ...,\n ) -> int: ...\n def rindex(\n self,\n __sub: str,\n __start: SupportsIndex | None = ...,\n __end: SupportsIndex | None = ...,\n ) -> int: ...\n def rsplit(\n self, sep: str | None = ..., maxsplit: SupportsIndex = ...\n ) -> list[str]: ...\n def rstrip(self, __chars: str | None = ...) -> str: ...\n def split(\n self, sep: str | None = ..., maxsplit: SupportsIndex = ...\n ) -> list[str]: ...\n def startswith(\n self,\n __prefix: str | Tuple[str, ...],\n __start: SupportsIndex | None = ...,\n __end: SupportsIndex | None = ...,\n ) -> bool: ...\n def strip(self, __chars: str | None = ...) -> str: ...\n def upper(self) -> str: ...\n def __add__(self, s: str) -> str: ...\n # Incompatible with Sequence.__contains__\n def __contains__(self, o: str) -> bool: ... # type: ignore\n def __eq__(self, x: object) -> bool: ...\n def __ge__(self, x: str) -> bool: ...\n def __getitem__(self, i: int | slice) -> str: ...\n def __gt__(self, x: str) -> bool: ...\n def __hash__(self) -> int: ...\n def __iter__(self) -> Iterator[str]: ...\n def __le__(self, x: str) -> bool: ...\n def __len__(self) -> int: ...\n def __lt__(self, x: str) -> bool: ...\n def __mod__(self, x: Any) -> str: ...\n def __mul__(self, n: SupportsIndex) -> str: ...\n def __ne__(self, x: object) -> bool: ...\n def __repr__(self) -> str: ...\n def __rmul__(self, n: SupportsIndex) -> str: ...\n def __str__(self) -> str: ...\n def __getnewargs__(self) -> Tuple[str]: ...\n\nclass bytes(ByteString):\n @overload\n def __new__(cls: Type[_T], ints: Iterable[SupportsIndex]) -> _T: ...\n @overload\n def __new__(cls: Type[_T], string: str, encoding: str, errors: str = ...) -> _T: ...\n @overload\n def __new__(cls: Type[_T], length: SupportsIndex) -> _T: ...\n @overload\n def __new__(cls: Type[_T]) -> _T: ...\n @overload\n def __new__(cls: Type[_T], o: SupportsBytes) -> _T: ...\n def count(\n self,\n __sub: bytes | SupportsIndex,\n __start: SupportsIndex | None = ...,\n __end: SupportsIndex | None = ...,\n ) -> int: ...\n def decode(self, encoding: str = ..., errors: str = ...) -> str: ...\n def endswith(\n self,\n __suffix: bytes | Tuple[bytes, ...],\n __start: SupportsIndex | None = ...,\n __end: SupportsIndex | None = ...,\n ) -> bool: ...\n def find(\n self,\n __sub: bytes | SupportsIndex,\n __start: SupportsIndex | None = ...,\n __end: SupportsIndex | None = ...,\n ) -> int: ...\n def index(\n self,\n __sub: bytes | SupportsIndex,\n __start: SupportsIndex | None = ...,\n __end: SupportsIndex | None = ...,\n ) -> int: ...\n def isalpha(self) -> bool: ...\n def isdigit(self) -> bool: ...\n def islower(self) -> bool: ...\n def isspace(self) -> bool: ...\n def isupper(self) -> bool: ...\n def join(self, __iterable_of_bytes: Iterable[ByteString | memoryview]) -> bytes: ...\n def lower(self) -> bytes: ...\n def lstrip(self, __bytes: bytes | None = ...) -> bytes: ...\n def replace(\n self, __old: bytes, __new: bytes, __count: SupportsIndex = ...\n ) -> bytes: ...\n def rfind(\n self,\n __sub: bytes | SupportsIndex,\n __start: SupportsIndex | None = ...,\n __end: SupportsIndex | None = ...,\n ) -> int: ...\n def rindex(\n self,\n __sub: bytes | SupportsIndex,\n __start: SupportsIndex | None = ...,\n __end: SupportsIndex | None = ...,\n ) -> int: ...\n def rsplit(\n self, sep: bytes | None = ..., maxsplit: SupportsIndex = ...\n ) -> list[bytes]: ...\n def rstrip(self, __bytes: bytes | None = ...) -> bytes: ...\n def split(\n self, sep: bytes | None = ..., maxsplit: SupportsIndex = ...\n ) -> list[bytes]: ...\n def startswith(\n self,\n __prefix: bytes | Tuple[bytes, ...],\n __start: SupportsIndex | None = ...,\n __end: SupportsIndex | None = ...,\n ) -> bool: ...\n def strip(self, __bytes: bytes | None = ...) -> bytes: ...\n def upper(self) -> bytes: ...\n def __len__(self) -> int: ...\n def __iter__(self) -> Iterator[int]: ...\n def __str__(self) -> str: ...\n def __repr__(self) -> str: ...\n def __hash__(self) -> int: ...\n @overload\n def __getitem__(self, i: SupportsIndex) -> int: ...\n @overload\n def __getitem__(self, s: slice) -> bytes: ...\n def __add__(self, s: bytes) -> bytes: ...\n def __mul__(self, n: SupportsIndex) -> bytes: ...\n def __rmul__(self, n: SupportsIndex) -> bytes: ...\n def __mod__(self, value: Any) -> bytes: ...\n # Incompatible with Sequence.__contains__\n def __contains__(self, o: SupportsIndex | bytes) -> bool: ... # type: ignore\n def __eq__(self, x: object) -> bool: ...\n def __ne__(self, x: object) -> bool: ...\n def __lt__(self, x: bytes) -> bool: ...\n def __le__(self, x: bytes) -> bool: ...\n def __gt__(self, x: bytes) -> bool: ...\n def __ge__(self, x: bytes) -> bool: ...\n def __getnewargs__(self) -> Tuple[bytes]: ...\n\nclass bytearray:\n @overload\n def __init__(self) -> None: ...\n @overload\n def __init__(self, ints: Iterable[SupportsIndex]) -> None: ...\n @overload\n def __init__(self, string: str, encoding: str, errors: str = ...) -> None: ...\n @overload\n def __init__(self, length: SupportsIndex) -> None: ...\n def append(self, __item: SupportsIndex) -> None: ...\n def decode(self, encoding: str = ..., errors: str = ...) -> str: ...\n def extend(self, __iterable_of_ints: Iterable[SupportsIndex]) -> None: ...\n def __len__(self) -> int: ...\n def __iter__(self) -> Iterator[int]: ...\n def __str__(self) -> str: ...\n def __repr__(self) -> str: ...\n __hash__: None # type: ignore\n @overload\n def __getitem__(self, i: SupportsIndex) -> int: ...\n @overload\n def __getitem__(self, s: slice) -> bytearray: ...\n @overload\n def __setitem__(self, i: SupportsIndex, x: SupportsIndex) -> None: ...\n @overload\n def __setitem__(self, s: slice, x: Iterable[SupportsIndex] | bytes) -> None: ...\n def __delitem__(self, i: SupportsIndex | slice) -> None: ...\n def __add__(self, s: bytes) -> bytearray: ...\n def __iadd__(self, s: Iterable[int]) -> bytearray: ...\n def __mul__(self, n: SupportsIndex) -> bytearray: ...\n def __rmul__(self, n: SupportsIndex) -> bytearray: ...\n def __imul__(self, n: SupportsIndex) -> bytearray: ...\n def __mod__(self, value: Any) -> bytes: ...\n # Incompatible with Sequence.__contains__\n def __contains__(self, o: SupportsIndex | bytes) -> bool: ... # type: ignore\n def __eq__(self, x: object) -> bool: ...\n def __ne__(self, x: object) -> bool: ...\n def __lt__(self, x: bytes) -> bool: ...\n def __le__(self, x: bytes) -> bool: ...\n def __gt__(self, x: bytes) -> bool: ...\n def __ge__(self, x: bytes) -> bool: ...\n\nclass memoryview(Sized, Sequence[int]):\n def __init__(self, obj: ReadableBuffer) -> None: ...\n @overload\n def __getitem__(self, i: SupportsIndex) -> int: ...\n @overload\n def __getitem__(self, s: slice) -> memoryview: ...\n def __contains__(self, x: object) -> bool: ...\n def __iter__(self) -> Iterator[int]: ...\n def __len__(self) -> int: ...\n @overload\n def __setitem__(self, s: slice, o: bytes) -> None: ...\n @overload\n def __setitem__(self, i: SupportsIndex, o: SupportsIndex) -> None: ...\n\n@final\nclass bool(int):\n def __new__(cls: Type[_T], __o: object = ...) -> _T: ...\n @overload\n def __and__(self, x: bool) -> bool: ...\n @overload\n def __and__(self, x: int) -> int: ...\n @overload\n def __or__(self, x: bool) -> bool: ...\n @overload\n def __or__(self, x: int) -> int: ...\n @overload\n def __xor__(self, x: bool) -> bool: ...\n @overload\n def __xor__(self, x: int) -> int: ...\n @overload\n def __rand__(self, x: bool) -> bool: ...\n @overload\n def __rand__(self, x: int) -> int: ...\n @overload\n def __ror__(self, x: bool) -> bool: ...\n @overload\n def __ror__(self, x: int) -> int: ...\n @overload\n def __rxor__(self, x: bool) -> bool: ...\n @overload\n def __rxor__(self, x: int) -> int: ...\n def __getnewargs__(self) -> Tuple[int]: ...\n\nclass slice(object):\n start: Any\n step: Any\n stop: Any\n __hash__: None # type: ignore\n def indices(self, len: SupportsIndex) -> Tuple[int, int, int]: ...\n\nclass tuple(Sequence[_T_co], Generic[_T_co]):\n def __new__(cls: Type[_T], iterable: Iterable[_T_co] = ...) -> _T: ...\n def __len__(self) -> int: ...\n def __contains__(self, x: object) -> bool: ...\n @overload\n def __getitem__(self, x: int) -> _T_co: ...\n @overload\n def __getitem__(self, x: slice) -> Tuple[_T_co, ...]: ...\n def __iter__(self) -> Iterator[_T_co]: ...\n def __lt__(self, x: Tuple[_T_co, ...]) -> bool: ...\n def __le__(self, x: Tuple[_T_co, ...]) -> bool: ...\n def __gt__(self, x: Tuple[_T_co, ...]) -> bool: ...\n def __ge__(self, x: Tuple[_T_co, ...]) -> bool: ...\n @overload\n def __add__(self, x: Tuple[_T_co, ...]) -> Tuple[_T_co, ...]: ...\n @overload\n def __add__(self, x: Tuple[_T, ...]) -> Tuple[_T_co | _T, ...]: ...\n def __mul__(self, n: SupportsIndex) -> Tuple[_T_co, ...]: ...\n def __rmul__(self, n: SupportsIndex) -> Tuple[_T_co, ...]: ...\n def count(self, __value: Any) -> int: ...\n def index(\n self, __value: Any, __start: SupportsIndex = ..., __stop: SupportsIndex = ...\n ) -> int: ...\n\n# Can we remove this?\nclass function:\n # TODO not defined in builtins!\n __name__: str\n __module__: str\n __code__: CodeType\n __qualname__: str\n __annotations__: dict[str, Any]\n\nclass list(MutableSequence[_T], Generic[_T]):\n @overload\n def __init__(self) -> None: ...\n @overload\n def __init__(self, iterable: Iterable[_T]) -> None: ...\n def clear(self) -> None: ...\n def copy(self) -> list[_T]: ...\n def append(self, __object: _T) -> None: ...\n def extend(self, __iterable: Iterable[_T]) -> None: ...\n def pop(self, __index: SupportsIndex = ...) -> _T: ...\n def index(\n self, __value: _T, __start: SupportsIndex = ..., __stop: SupportsIndex = ...\n ) -> int: ...\n def count(self, __value: _T) -> int: ...\n def insert(self, __index: SupportsIndex, __object: _T) -> None: ...\n def remove(self, __value: _T) -> None: ...\n def reverse(self) -> None: ...\n @overload\n def sort(\n self: list[SupportsLessThanT], *, key: None = ..., reverse: bool = ...\n ) -> None: ...\n @overload\n def sort(\n self, *, key: Callable[[_T], SupportsLessThan], reverse: bool = ...\n ) -> None: ...\n def __len__(self) -> int: ...\n def __iter__(self) -> Iterator[_T]: ...\n def __str__(self) -> str: ...\n __hash__: None # type: ignore\n @overload\n def __getitem__(self, i: SupportsIndex) -> _T: ...\n @overload\n def __getitem__(self, s: slice) -> list[_T]: ...\n @overload\n def __setitem__(self, i: SupportsIndex, o: _T) -> None: ...\n @overload\n def __setitem__(self, s: slice, o: Iterable[_T]) -> None: ...\n def __delitem__(self, i: SupportsIndex | slice) -> None: ...\n def __add__(self, x: list[_T]) -> list[_T]: ...\n def __iadd__(self: _S, x: Iterable[_T]) -> _S: ...\n def __mul__(self, n: SupportsIndex) -> list[_T]: ...\n def __rmul__(self, n: SupportsIndex) -> list[_T]: ...\n def __imul__(self: _S, n: SupportsIndex) -> _S: ...\n def __contains__(self, o: object) -> bool: ...\n def __reversed__(self) -> Iterator[_T]: ...\n def __gt__(self, x: list[_T]) -> bool: ...\n def __ge__(self, x: list[_T]) -> bool: ...\n def __lt__(self, x: list[_T]) -> bool: ...\n def __le__(self, x: list[_T]) -> bool: ...\n if sys.version_info >= (3, 9):\n def __class_getitem__(cls, item: Any) -> GenericAlias: ...\n\nclass dict(MutableMapping[_KT, _VT], Generic[_KT, _VT]):\n @overload\n def __init__(self: dict[_KT, _VT]) -> None: ...\n @overload\n def __init__(self: dict[str, _VT], **kwargs: _VT) -> None: ...\n @overload\n def __init__(\n self, map: SupportsKeysAndGetItem[_KT, _VT], **kwargs: _VT\n ) -> None: ...\n @overload\n def __init__(self, iterable: Iterable[Tuple[_KT, _VT]], **kwargs: _VT) -> None: ...\n def __new__(cls: Type[_T1], *args: Any, **kwargs: Any) -> _T1: ...\n def clear(self) -> None: ...\n def copy(self) -> dict[_KT, _VT]: ...\n def popitem(self) -> Tuple[_KT, _VT]: ...\n def setdefault(self, __key: _KT, __default: _VT = ...) -> _VT: ...\n @overload\n def update(self, __m: Mapping[_KT, _VT], **kwargs: _VT) -> None: ...\n @overload\n def update(self, __m: Iterable[Tuple[_KT, _VT]], **kwargs: _VT) -> None: ...\n @overload\n def update(self, **kwargs: _VT) -> None: ...\n def keys(self) -> KeysView[_KT]: ...\n def values(self) -> ValuesView[_VT]: ...\n def items(self) -> ItemsView[_KT, _VT]: ...\n @classmethod\n @overload\n def fromkeys(\n cls, __iterable: Iterable[_T], __value: None = ...\n ) -> dict[_T, Any | None]: ...\n @classmethod\n @overload\n def fromkeys(cls, __iterable: Iterable[_T], __value: _S) -> dict[_T, _S]: ...\n def __len__(self) -> int: ...\n def __getitem__(self, k: _KT) -> _VT: ...\n def __setitem__(self, k: _KT, v: _VT) -> None: ...\n def __delitem__(self, v: _KT) -> None: ...\n def __iter__(self) -> Iterator[_KT]: ...\n if sys.version_info >= (3, 8):\n def __reversed__(self) -> Iterator[_KT]: ...\n def __str__(self) -> str: ...\n __hash__: None # type: ignore\n if sys.version_info >= (3, 9):\n def __class_getitem__(cls, item: Any) -> GenericAlias: ...\n def __or__(self, __value: Mapping[_T1, _T2]) -> dict[_KT | _T1, _VT | _T2]: ...\n def __ror__(self, __value: Mapping[_T1, _T2]) -> dict[_KT | _T1, _VT | _T2]: ...\n def __ior__(self, __value: Mapping[_KT, _VT]) -> dict[_KT, _VT]: ... # type: ignore\n\nclass set(MutableSet[_T], Generic[_T]):\n def __init__(self, iterable: Iterable[_T] = ...) -> None: ...\n def add(self, element: _T) -> None: ...\n def clear(self) -> None: ...\n def copy(self) -> Set[_T]: ...\n def difference(self, *s: Iterable[Any]) -> Set[_T]: ...\n def difference_update(self, *s: Iterable[Any]) -> None: ...\n def discard(self, element: _T) -> None: ...\n def intersection(self, *s: Iterable[Any]) -> Set[_T]: ...\n def intersection_update(self, *s: Iterable[Any]) -> None: ...\n def isdisjoint(self, s: Iterable[Any]) -> bool: ...\n def issubset(self, s: Iterable[Any]) -> bool: ...\n def issuperset(self, s: Iterable[Any]) -> bool: ...\n def pop(self) -> _T: ...\n def remove(self, element: _T) -> None: ...\n def symmetric_difference(self, s: Iterable[_T]) -> Set[_T]: ...\n def symmetric_difference_update(self, s: Iterable[_T]) -> None: ...\n def union(self, *s: Iterable[_T]) -> Set[_T]: ...\n def update(self, *s: Iterable[_T]) -> None: ...\n def __len__(self) -> int: ...\n def __contains__(self, o: object) -> bool: ...\n def __iter__(self) -> Iterator[_T]: ...\n def __str__(self) -> str: ...\n def __and__(self, s: AbstractSet[object]) -> Set[_T]: ...\n def __iand__(self, s: AbstractSet[object]) -> Set[_T]: ...\n def __or__(self, s: AbstractSet[_S]) -> Set[_T | _S]: ...\n def __ior__(self, s: AbstractSet[_S]) -> Set[_T | _S]: ...\n def __sub__(self, s: AbstractSet[_T | None]) -> Set[_T]: ...\n def __isub__(self, s: AbstractSet[_T | None]) -> Set[_T]: ...\n def __xor__(self, s: AbstractSet[_S]) -> Set[_T | _S]: ...\n def __ixor__(self, s: AbstractSet[_S]) -> Set[_T | _S]: ...\n def __le__(self, s: AbstractSet[object]) -> bool: ...\n def __lt__(self, s: AbstractSet[object]) -> bool: ...\n def __ge__(self, s: AbstractSet[object]) -> bool: ...\n def __gt__(self, s: AbstractSet[object]) -> bool: ...\n __hash__: None # type: ignore\n if sys.version_info >= (3, 9):\n def __class_getitem__(cls, item: Any) -> GenericAlias: ...\n\nclass enumerate(Iterator[Tuple[int, _T]], Generic[_T]):\n def __init__(self, iterable: Iterable[_T], start: int = ...) -> None: ...\n def __iter__(self) -> Iterator[Tuple[int, _T]]: ...\n def __next__(self) -> Tuple[int, _T]: ...\n if sys.version_info >= (3, 9):\n def __class_getitem__(cls, item: Any) -> GenericAlias: ...\n\nclass range(Sequence[int]):\n start: int\n stop: int\n step: int\n @overload\n def __init__(self, stop: SupportsIndex) -> None: ...\n @overload\n def __init__(\n self, start: SupportsIndex, stop: SupportsIndex, step: SupportsIndex = ...\n ) -> None: ...\n def __len__(self) -> int: ...\n def __contains__(self, o: object) -> bool: ...\n def __iter__(self) -> Iterator[int]: ...\n @overload\n def __getitem__(self, i: SupportsIndex) -> int: ...\n @overload\n def __getitem__(self, s: slice) -> range: ...\n def __repr__(self) -> str: ...\n def __reversed__(self) -> Iterator[int]: ...\n\nclass property(object):\n fget: Callable[[Any], Any] | None\n fset: Callable[[Any, Any], None] | None\n fdel: Callable[[Any], None] | None\n def __init__(\n self,\n fget: Callable[[Any], Any] | None = ...,\n fset: Callable[[Any, Any], None] | None = ...,\n fdel: Callable[[Any], None] | None = ...,\n doc: str | None = ...,\n ) -> None: ...\n def getter(self, fget: Callable[[Any], Any]) -> property: ...\n def setter(self, fset: Callable[[Any, Any], None]) -> property: ...\n def deleter(self, fdel: Callable[[Any], None]) -> property: ...\n def __get__(self, obj: Any, type: type | None = ...) -> Any: ...\n def __set__(self, obj: Any, value: Any) -> None: ...\n def __delete__(self, obj: Any) -> None: ...\n\nclass _NotImplementedType(Any): # type: ignore\n # A little weird, but typing the __call__ as NotImplemented makes the error message\n # for NotImplemented() much better\n __call__: NotImplemented # type: ignore\n\nNotImplemented: _NotImplementedType\n\ndef abs(__x: SupportsAbs[_T]) -> _T: ...\ndef all(__iterable: Iterable[object]) -> bool: ...\ndef any(__iterable: Iterable[object]) -> bool: ...\ndef bin(__number: int | SupportsIndex) -> str: ...\n\nif sys.version_info >= (3, 7):\n def breakpoint(*args: Any, **kws: Any) -> None: ...\n\ndef callable(__obj: object) -> bool: ...\ndef chr(__i: int) -> str: ...\n\n# We define this here instead of using os.PathLike to avoid import cycle issues.\n# See https://github.com/python/typeshed/pull/991#issuecomment-288160993\n_AnyStr_co = TypeVar(\"_AnyStr_co\", str, bytes, covariant=True)\n\nclass _PathLike(Protocol[_AnyStr_co]):\n def __fspath__(self) -> _AnyStr_co: ...\n\nif sys.version_info >= (3, 10):\n def aiter(__iterable: AsyncIterable[_T]) -> AsyncIterator[_T]: ...\n @overload\n async def anext(__i: AsyncIterator[_T]) -> _T: ...\n @overload\n async def anext(__i: AsyncIterator[_T], default: _VT) -> _T | _VT: ...\n\ndef delattr(__obj: Any, __name: str) -> None: ...\ndef dir(__o: object = ...) -> list[str]: ...\n@overload\ndef divmod(__x: SupportsDivMod[_T_contra, _T_co], __y: _T_contra) -> _T_co: ...\n@overload\ndef divmod(__x: _T_contra, __y: SupportsRDivMod[_T_contra, _T_co]) -> _T_co: ...\ndef eval(\n __source: str | bytes | CodeType,\n __globals: dict[str, Any] | None = ...,\n __locals: Mapping[str, Any] | None = ...,\n) -> Any: ...\ndef exec(\n __source: str | bytes | CodeType,\n __globals: dict[str, Any] | None = ...,\n __locals: Mapping[str, Any] | None = ...,\n) -> Any: ...\n\nclass filter(Iterator[_T], Generic[_T]):\n @overload\n def __init__(self, __function: None, __iterable: Iterable[_T | None]) -> None: ...\n @overload\n def __init__(\n self, __function: Callable[[_T], Any], __iterable: Iterable[_T]\n ) -> None: ...\n def __iter__(self) -> Iterator[_T]: ...\n def __next__(self) -> _T: ...\n\n@overload\ndef getattr(__o: object, name: str) -> Any: ...\n\n# While technically covered by the last overload, spelling out the types for None and bool\n# help mypy out in some tricky situations involving type context (aka bidirectional inference)\n@overload\ndef getattr(__o: object, name: str, __default: None) -> Any | None: ...\n@overload\ndef getattr(__o: object, name: str, __default: bool) -> Any | bool: ...\n@overload\ndef getattr(__o: object, name: str, __default: _T) -> Any | _T: ...\ndef globals() -> dict[str, Any]: ...\ndef hasattr(__obj: object, __name: str) -> bool: ...\ndef hash(__obj: object) -> int: ...\ndef help(*args: Any, **kwds: Any) -> None: ...\ndef hex(__number: int | SupportsIndex) -> str: ...\ndef id(__obj: object) -> int: ...\ndef input(__prompt: Any = ...) -> str: ...\n@overload\ndef iter(__iterable: Iterable[_T]) -> Iterator[_T]: ...\n@overload\ndef iter(__function: Callable[[], _T | None], __sentinel: None) -> Iterator[_T]: ...\n@overload\ndef iter(__function: Callable[[], _T], __sentinel: Any) -> Iterator[_T]: ...\n\nif sys.version_info >= (3, 10):\n def isinstance(\n __obj: object,\n __class_or_tuple: type\n | types.UnionType\n | Tuple[type | types.UnionType | Tuple[Any, ...], ...],\n ) -> bool: ...\n def issubclass(\n __cls: type,\n __class_or_tuple: type\n | types.UnionType\n | Tuple[type | types.UnionType | Tuple[Any, ...], ...],\n ) -> bool: ...\n\nelse:\n def isinstance(\n __obj: object, __class_or_tuple: type | Tuple[type | Tuple[Any, ...], ...]\n ) -> bool: ...\n def issubclass(\n __cls: type, __class_or_tuple: type | Tuple[type | Tuple[Any, ...], ...]\n ) -> bool: ...\n\ndef len(__obj: Sized) -> int: ...\ndef locals() -> dict[str, Any]: ...\n\nclass map(Iterator[_S], Generic[_S]):\n @overload\n def __init__(self, __func: Callable[[_T1], _S], __iter1: Iterable[_T1]) -> None: ...\n @overload\n def __init__(\n self,\n __func: Callable[[_T1, _T2], _S],\n __iter1: Iterable[_T1],\n __iter2: Iterable[_T2],\n ) -> None: ...\n @overload\n def __init__(\n self,\n __func: Callable[[_T1, _T2, _T3], _S],\n __iter1: Iterable[_T1],\n __iter2: Iterable[_T2],\n __iter3: Iterable[_T3],\n ) -> None: ...\n @overload\n def __init__(\n self,\n __func: Callable[[_T1, _T2, _T3, _T4], _S],\n __iter1: Iterable[_T1],\n __iter2: Iterable[_T2],\n __iter3: Iterable[_T3],\n __iter4: Iterable[_T4],\n ) -> None: ...\n @overload\n def __init__(\n self,\n __func: Callable[[_T1, _T2, _T3, _T4, _T5], _S],\n __iter1: Iterable[_T1],\n __iter2: Iterable[_T2],\n __iter3: Iterable[_T3],\n __iter4: Iterable[_T4],\n __iter5: Iterable[_T5],\n ) -> None: ...\n @overload\n def __init__(\n self,\n __func: Callable[..., _S],\n __iter1: Iterable[Any],\n __iter2: Iterable[Any],\n __iter3: Iterable[Any],\n __iter4: Iterable[Any],\n __iter5: Iterable[Any],\n __iter6: Iterable[Any],\n *iterables: Iterable[Any],\n ) -> None: ...\n def __iter__(self) -> Iterator[_S]: ...\n def __next__(self) -> _S: ...\n\n@overload\ndef max(\n __arg1: SupportsLessThanT,\n __arg2: SupportsLessThanT,\n *_args: SupportsLessThanT,\n key: None = ...,\n) -> SupportsLessThanT: ...\n@overload\ndef max(\n __arg1: _T, __arg2: _T, *_args: _T, key: Callable[[_T], SupportsLessThan]\n) -> _T: ...\n@overload\ndef max(\n __iterable: Iterable[SupportsLessThanT], *, key: None = ...\n) -> SupportsLessThanT: ...\n@overload\ndef max(__iterable: Iterable[_T], *, key: Callable[[_T], SupportsLessThan]) -> _T: ...\n@overload\ndef max(\n __iterable: Iterable[SupportsLessThanT], *, key: None = ..., default: _T\n) -> SupportsLessThanT | _T: ...\n@overload\ndef max(\n __iterable: Iterable[_T1], *, key: Callable[[_T1], SupportsLessThan], default: _T2\n) -> _T1 | _T2: ...\n@overload\ndef min(\n __arg1: SupportsLessThanT,\n __arg2: SupportsLessThanT,\n *_args: SupportsLessThanT,\n key: None = ...,\n) -> SupportsLessThanT: ...\n@overload\ndef min(\n __arg1: _T, __arg2: _T, *_args: _T, key: Callable[[_T], SupportsLessThan]\n) -> _T: ...\n@overload\ndef min(\n __iterable: Iterable[SupportsLessThanT], *, key: None = ...\n) -> SupportsLessThanT: ...\n@overload\ndef min(__iterable: Iterable[_T], *, key: Callable[[_T], SupportsLessThan]) -> _T: ...\n@overload\ndef min(\n __iterable: Iterable[SupportsLessThanT], *, key: None = ..., default: _T\n) -> SupportsLessThanT | _T: ...\n@overload\ndef min(\n __iterable: Iterable[_T1], *, key: Callable[[_T1], SupportsLessThan], default: _T2\n) -> _T1 | _T2: ...\n@overload\ndef next(__i: Iterator[_T]) -> _T: ...\n@overload\ndef next(__i: Iterator[_T], default: _VT) -> _T | _VT: ...\ndef oct(__number: int | SupportsIndex) -> str: ...\n\n_OpenFile = Union[StrOrBytesPath, int]\n_Opener = Callable[[str, int], int]\n\n# Text mode: always returns a TextIOWrapper\n@overload\ndef open(\n file: _OpenFile,\n mode: OpenTextMode = ...,\n buffering: int = ...,\n encoding: str | None = ...,\n errors: str | None = ...,\n newline: str | None = ...,\n closefd: bool = ...,\n opener: _Opener | None = ...,\n) -> TextIO: ...\n\n# Unbuffered binary mode: returns a FileIO\n@overload\ndef open(\n file: _OpenFile,\n mode: OpenBinaryMode,\n buffering: int = ...,\n encoding: None = ...,\n errors: None = ...,\n newline: None = ...,\n closefd: bool = ...,\n opener: _Opener | None = ...,\n) -> BinaryIO: ...\n\n# Fallback if mode is not specified\n@overload\ndef open(\n file: _OpenFile,\n mode: str,\n buffering: int = ...,\n encoding: str | None = ...,\n errors: str | None = ...,\n newline: str | None = ...,\n closefd: bool = ...,\n opener: _Opener | None = ...,\n) -> IO[Any]: ...\ndef ord(__c: str | bytes) -> int: ...\ndef print(\n *values: object,\n sep: str | None = ...,\n end: str | None = ...,\n file: SupportsWrite[str] | None = ...,\n flush: bool = ...,\n) -> None: ...\n\n_E = TypeVar(\"_E\", contravariant=True)\n_M = TypeVar(\"_M\", contravariant=True)\n\nclass _SupportsPow2(Protocol[_E, _T_co]):\n def __pow__(self, __other: _E) -> _T_co: ...\n\nclass _SupportsPow3(Protocol[_E, _M, _T_co]):\n def __pow__(self, __other: _E, __modulo: _M) -> _T_co: ...\n\nif sys.version_info >= (3, 8):\n @overload\n def pow(\n base: int, exp: int, mod: None = ...\n ) -> Any: ... # returns int or float depending on whether exp is non-negative\n @overload\n def pow(base: int, exp: int, mod: int) -> int: ...\n @overload\n def pow(base: float, exp: float, mod: None = ...) -> float: ...\n @overload\n def pow(base: _SupportsPow2[_E, _T_co], exp: _E) -> _T_co: ...\n @overload\n def pow(base: _SupportsPow3[_E, _M, _T_co], exp: _E, mod: _M) -> _T_co: ...\n\nelse:\n @overload\n def pow(\n __base: int, __exp: int, __mod: None = ...\n ) -> Any: ... # returns int or float depending on whether exp is non-negative\n @overload\n def pow(__base: int, __exp: int, __mod: int) -> int: ...\n @overload\n def pow(__base: float, __exp: float, __mod: None = ...) -> float: ...\n @overload\n def pow(__base: _SupportsPow2[_E, _T_co], __exp: _E) -> _T_co: ...\n @overload\n def pow(__base: _SupportsPow3[_E, _M, _T_co], __exp: _E, __mod: _M) -> _T_co: ...\n\nclass reversed(Iterator[_T], Generic[_T]):\n @overload\n def __init__(self, __sequence: Reversible[_T]) -> None: ...\n @overload\n def __init__(self, __sequence: SupportsLenAndGetItem[_T]) -> None: ...\n def __iter__(self) -> Iterator[_T]: ...\n def __next__(self) -> _T: ...\n\ndef repr(__obj: object) -> str: ...\n@overload\ndef round(number: SupportsRound[Any]) -> int: ...\n@overload\ndef round(number: SupportsRound[Any], ndigits: None) -> int: ...\n@overload\ndef round(number: SupportsRound[_T], ndigits: SupportsIndex) -> _T: ...\ndef setattr(__obj: object, __name: str, __value: Any) -> None: ...\n@overload\ndef sorted(\n __iterable: Iterable[SupportsLessThanT], *, key: None = ..., reverse: bool = ...\n) -> list[SupportsLessThanT]: ...\n@overload\ndef sorted(\n __iterable: Iterable[_T],\n *,\n key: Callable[[_T], SupportsLessThan],\n reverse: bool = ...,\n) -> list[_T]: ...\n\nif sys.version_info >= (3, 8):\n @overload\n def sum(__iterable: Iterable[_T]) -> _T | int: ...\n @overload\n def sum(__iterable: Iterable[_T], start: _S) -> _T | _S: ...\n\nelse:\n @overload\n def sum(__iterable: Iterable[_T]) -> _T | int: ...\n @overload\n def sum(__iterable: Iterable[_T], __start: _S) -> _T | _S: ...\n\nclass zip(Iterator[_T_co], Generic[_T_co]):\n @overload\n def __new__(cls, __iter1: Iterable[_T1]) -> zip[Tuple[_T1]]: ...\n @overload\n def __new__(\n cls, __iter1: Iterable[_T1], __iter2: Iterable[_T2]\n ) -> zip[Tuple[_T1, _T2]]: ...\n @overload\n def __new__(\n cls, __iter1: Iterable[_T1], __iter2: Iterable[_T2], __iter3: Iterable[_T3]\n ) -> zip[Tuple[_T1, _T2, _T3]]: ...\n @overload\n def __new__(\n cls,\n __iter1: Iterable[_T1],\n __iter2: Iterable[_T2],\n __iter3: Iterable[_T3],\n __iter4: Iterable[_T4],\n ) -> zip[Tuple[_T1, _T2, _T3, _T4]]: ...\n @overload\n def __new__(\n cls,\n __iter1: Iterable[_T1],\n __iter2: Iterable[_T2],\n __iter3: Iterable[_T3],\n __iter4: Iterable[_T4],\n __iter5: Iterable[_T5],\n ) -> zip[Tuple[_T1, _T2, _T3, _T4, _T5]]: ...\n @overload\n def __new__(\n cls,\n __iter1: Iterable[Any],\n __iter2: Iterable[Any],\n __iter3: Iterable[Any],\n __iter4: Iterable[Any],\n __iter5: Iterable[Any],\n __iter6: Iterable[Any],\n *iterables: Iterable[Any],\n ) -> zip[Tuple[Any, ...]]: ...\n def __iter__(self) -> Iterator[_T_co]: ...\n def __next__(self) -> _T_co: ...\n\ndef __import__(\n name: str,\n globals: Mapping[str, Any] | None = ...,\n locals: Mapping[str, Any] | None = ...,\n fromlist: Sequence[str] = ...,\n level: int = ...,\n) -> Any: ...\n\n# Actually the type of Ellipsis is , but since it's\n# not exposed anywhere under that name, we make it private here.\nclass ellipsis: ...\n\nEllipsis: ellipsis\n\nclass BaseException(object):\n args: Tuple[Any, ...]\n __cause__: BaseException | None\n __context__: BaseException | None\n __suppress_context__: bool\n __traceback__: TracebackType | None\n def __init__(self, *args: object) -> None: ...\n def __str__(self) -> str: ...\n def __repr__(self) -> str: ...\n def with_traceback(self: _TBE, tb: TracebackType | None) -> _TBE: ...\n\nclass GeneratorExit(BaseException): ...\nclass KeyboardInterrupt(BaseException): ...\n\nclass SystemExit(BaseException):\n code: int\n\nclass Exception(BaseException): ...\n\nclass StopIteration(Exception):\n value: Any\n\n_StandardError = Exception\n\nclass OSError(Exception):\n errno: int\n strerror: str\n # filename, filename2 are actually str | bytes | None\n filename: Any\n filename2: Any\n if sys.platform == \"win32\":\n winerror: int\n\nif sys.platform == \"win32\":\n WindowsError = OSError\n\nclass ArithmeticError(_StandardError): ...\nclass AssertionError(_StandardError): ...\n\nclass AttributeError(_StandardError):\n if sys.version_info >= (3, 10):\n name: str\n obj: object\n\nclass EOFError(_StandardError): ...\n\nclass ImportError(_StandardError):\n def __init__(\n self, *args: object, name: str | None = ..., path: str | None = ...\n ) -> None: ...\n name: str | None\n path: str | None\n msg: str # undocumented\n\nclass LookupError(_StandardError): ...\nclass MemoryError(_StandardError): ...\n\nclass NameError(_StandardError):\n if sys.version_info >= (3, 10):\n name: str\n\nclass RuntimeError(_StandardError): ...\n\nclass StopAsyncIteration(Exception):\n value: Any\n\nclass SyntaxError(_StandardError):\n msg: str\n lineno: int | None\n offset: int | None\n text: str | None\n filename: str | None\n if sys.version_info >= (3, 10):\n end_lineno: int | None\n end_offset: int | None\n\nclass TypeError(_StandardError): ...\nclass ValueError(_StandardError): ...\nclass FloatingPointError(ArithmeticError): ...\nclass OverflowError(ArithmeticError): ...\nclass ZeroDivisionError(ArithmeticError): ...\nclass IndexError(LookupError): ...\nclass KeyError(LookupError): ...\nclass NotImplementedError(RuntimeError): ...\nclass IndentationError(SyntaxError): ...\nclass TabError(IndentationError): ...\n", "/typeshed/stdlib/errno.pyi": "from typing import Mapping\n\nerrorcode: Mapping[int, str]\n\nEACCES: int\nEADDRINUSE: int\nEAGAIN: int\nEALREADY: int\nEBADF: int\nECONNABORTED: int\nECONNREFUSED: int\nECONNRESET: int\nEEXIST: int\nEHOSTUNREACH: int\nEINPROGRESS: int\nEINVAL: int\nEIO: int\nEISDIR: int\nENOBUFS: int\nENODEV: int\nENOENT: int\nENOMEM: int\nENOTCONN: int\nEOPNOTSUPP: int\nEPERM: int\nETIMEDOUT: int\n", "/typeshed/stdlib/gc.pyi": "\"\"\"Contr\u00f4ler le ramasse-miettes\"\"\"\nfrom typing import overload\n\ndef enable() -> None:\n \"\"\"Active la collecte automatique du ramasse-miettes.\"\"\"\n ...\n\ndef disable() -> None:\n \"\"\"D\u00e9sactive la collecte automatique du ramasse-miettes.\n\nHeap memory can still be allocated,\nand garbage collection can still be initiated manually using ``gc.collect``.\"\"\"\n\ndef collect() -> None:\n \"\"\"Ex\u00e9cute une collecte avec le ramasse-miettes\"\"\"\n ...\n\ndef mem_alloc() -> int:\n \"\"\"Obtenir le nombre d'octets allou\u00e9s pour le tas en RAM\n\n:return: The number of bytes allocated.\n\nThis function is MicroPython extension.\"\"\"\n ...\n\ndef mem_free() -> int:\n \"\"\"Obtenir le nombre d'octets disponibles pour le tas en RAM, ou -1 si ce nombre est inconnu.\n\n:return: The number of bytes free.\n\nThis function is MicroPython extension.\"\"\"\n ...\n\n@overload\ndef threshold() -> int:\n \"\"\"Demander le seuil d'allocation suppl\u00e9mentaire GC.\n\n:return: The GC allocation threshold.\n\nThis function is a MicroPython extension. CPython has a similar\nfunction - ``set_threshold()``, but due to different GC\nimplementations, its signature and semantics are different.\"\"\"\n ...\n\n@overload\ndef threshold(amount: int) -> None:\n \"\"\"Fixer le seuil d'allocation suppl\u00e9mentaire GC.\n\nNormally, a collection is triggered only when a new allocation\ncannot be satisfied, i.e. on an out-of-memory (OOM) condition.\nIf this function is called, in addition to OOM, a collection\nwill be triggered each time after ``amount`` bytes have been\nallocated (in total, since the previous time such an amount of bytes\nhave been allocated). ``amount`` is usually specified as less than the\nfull heap size, with the intention to trigger a collection earlier than when the\nheap becomes exhausted, and in the hope that an early collection will prevent\nexcessive memory fragmentation. This is a heuristic measure, the effect\nof which will vary from application to application, as well as\nthe optimal value of the ``amount`` parameter.\n\nA value of -1 means a disabled allocation threshold.\n\nThis function is a MicroPython extension. CPython has a similar\nfunction - ``set_threshold()``, but due to different GC\nimplementations, its signature and semantics are different.\n\n:param amount: Le nombre d'octets apr\u00e8s lequel un passage du ramasse-miettes doit \u00eatre d\u00e9clench\u00e9.\"\"\"\n ...", - "/typeshed/stdlib/log.pyi": "\"\"\"Journalisez des donn\u00e9es sur votre micro:bit V2.\"\"\"\nfrom typing import Literal, Mapping, Optional, Union, overload\nMILLISECONDS = 1\n\"\"\"Format d'horodatage en millisecondes.\"\"\"\nSECONDS = 10\n\"\"\"Format d'horodatage en secondes.\"\"\"\nMINUTES = 600\n\"\"\"Format d'horodatage en minutes.\"\"\"\nHOURS = 36000\n\"\"\"Format d'horodatage en heures.\"\"\"\nDAYS = 864000\n\"\"\"Format d'horodatage en jours.\"\"\"\n\ndef set_labels(*labels: str, timestamp: Optional[Literal[1, 10, 36000, 864000]]=SECONDS) -> None:\n \"\"\"D\u00e9finir l'en-t\u00eate du fichier journal\n\nExample: ``log.set_labels('X', 'Y', 'Z', timestamp=log.MINUTES)``\n\nIdeally this function should be called a single time, before any data is\nlogged, to configure the data table header once.\n\nIf a log file already exists when the program starts, or if this function\nis called multiple times, it will check the labels already defined in the\nlog file. If this function call contains any new labels not already\npresent, it will generate a new header row with the additional columns.\n\nBy default the first column contains a timestamp for each row. The time\nunit can be selected via the timestamp argument.\n\n:param *labels: Any number of positional arguments, each corresponding to an entry in the log header.\n:param timestamp: (horodatage) Select the timestamp unit that will be automatically added as the first column in every row. Timestamp values can be one of ``log.MILLISECONDS``, ``log.SECONDS``, ``log.MINUTES``, ``log.HOURS``, ``log.DAYS`` or ``None`` to disable the timestamp. The default value is ``log.SECONDS``.\"\"\"\n ...\n\n@overload\ndef add(data_dictionary: Optional[Mapping[str, Union[str, int, float]]]) -> None:\n \"\"\"Ajoute une ligne de donn\u00e9es au journal en passant un dictionnaire d'en-t\u00eates et de valeurs.\n\nExample: ``log.add({ 'temp': temperature() })``\n\nEach call to this function adds a row to the log.\n\nNew labels not previously specified via the set_labels function, or by a\nprevious call to this function, will trigger a new header entry to be added\nto the log with the extra labels.\n\nLabels previously specified and not present in a call to this function will\nbe skipped with an empty value in the log row.\n\n:param data_dictionary: The data to log as a dictionary with a key for each header.\"\"\"\n ...\n\n@overload\ndef add(**kwargs: Union[str, int, float]) -> None:\n \"\"\"Ajoute une ligne de donn\u00e9es au journal en utilisant des arguments nomm\u00e9s.\n\nExample: ``log.add(temp=temperature())``\n\nEach call to this function adds a row to the log.\n\nNew labels not previously specified via the set_labels function, or by a\nprevious call to this function, will trigger a new header entry to be added\nto the log with the extra labels.\n\nLabels previously specified and not present in a call to this function will\nbe skipped with an empty value in the log row.\"\"\"\n ...\n\ndef delete(full=False):\n \"\"\"Supprime le contenu du journal, y compris les en-t\u00eates.\n\nExample: ``log.delete()``\n\nTo add the log headers again the ``set_labels`` function should to be called after this function.\n\nThere are two erase modes; \u201cfull\u201d completely removes the data from the physical storage,\nand \u201cfast\u201d invalidates the data without removing it.\n\n:param full: ``True`` selects a \u201cfull\u201d erase and ``False`` selects the \u201cfast\u201d erase method.\"\"\"\n ...\n\ndef set_mirroring(serial: bool):\n \"\"\"Configure mirroring of the data logging activity to the serial output.\n\nExample: ``log.set_mirroring(True)``\n\nSerial mirroring is disabled by default. When enabled, it will print to serial each row logged into the log file.\n\n:param serial: ``True`` enables mirroring data to the serial output.\"\"\"\n ...", + "/typeshed/stdlib/log.pyi": "\"\"\"Journalisez des donn\u00e9es sur votre micro:bit V2.\"\"\"\nfrom typing import Literal, Mapping, Optional, Union, overload\nMILLISECONDS = 1\n\"\"\"Format d'horodatage en millisecondes.\"\"\"\nSECONDS = 10\n\"\"\"Format d'horodatage en secondes.\"\"\"\nMINUTES = 600\n\"\"\"Format d'horodatage en minutes.\"\"\"\nHOURS = 36000\n\"\"\"Format d'horodatage en heures.\"\"\"\nDAYS = 864000\n\"\"\"Format d'horodatage en jours.\"\"\"\n\ndef set_labels(*labels: str, timestamp: Optional[Literal[1, 10, 36000, 864000]]=SECONDS) -> None:\n \"\"\"D\u00e9finir l'en-t\u00eate du fichier journal\n\nExample: ``log.set_labels('X', 'Y', 'Z', timestamp=log.MINUTES)``\n\nIdeally this function should be called a single time, before any data is\nlogged, to configure the data table header once.\n\nIf a log file already exists when the program starts, or if this function\nis called multiple times, it will check the labels already defined in the\nlog file. If this function call contains any new labels not already\npresent, it will generate a new header row with the additional columns.\n\nBy default the first column contains a timestamp for each row. The time\nunit can be selected via the timestamp argument.\n\n:param *labels: (*etiquettes) Un nombre quelconque d'arguments positionnels, chacun correspondant \u00e0 une entr\u00e9e dans l'en-t\u00eate du journal.\n:param timestamp: (horodatage) S\u00e9lectionnez l'unit\u00e9 d'horodatage qui sera automatiquement ajout\u00e9e comme premi\u00e8re colonne de chaque ligne. Les valeurs d'horodatage peuvent \u00eatre l'une des suivantes ``log.MILLISECONDS``, ``log.SECONDS``, ``log.MINUTES``, ``log.HOURS``, ``log.DAYS`` ou ``None`` pour d\u00e9sactiver l'horodatage. La valeur par d\u00e9faut est ``log.SECONDS``.\"\"\"\n ...\n\n@overload\ndef add(data_dictionary: Optional[Mapping[str, Union[str, int, float]]]) -> None:\n \"\"\"Ajoute une ligne de donn\u00e9es au journal en passant un dictionnaire d'en-t\u00eates et de valeurs.\n\nExample: ``log.add({ 'temp': temperature() })``\n\nEach call to this function adds a row to the log.\n\nNew labels not previously specified via the set_labels function, or by a\nprevious call to this function, will trigger a new header entry to be added\nto the log with the extra labels.\n\nLabels previously specified and not present in a call to this function will\nbe skipped with an empty value in the log row.\n\n:param data_dictionary: (dictionnaire de donn\u00e9es) Les donn\u00e9es \u00e0 enregistrer sous forme de dictionnaire avec une cl\u00e9 pour chaque en-t\u00eate.\"\"\"\n ...\n\n@overload\ndef add(**kwargs: Union[str, int, float]) -> None:\n \"\"\"Ajoute une ligne de donn\u00e9es au journal en utilisant des arguments nomm\u00e9s.\n\nExample: ``log.add(temp=temperature())``\n\nEach call to this function adds a row to the log.\n\nNew labels not previously specified via the set_labels function, or by a\nprevious call to this function, will trigger a new header entry to be added\nto the log with the extra labels.\n\nLabels previously specified and not present in a call to this function will\nbe skipped with an empty value in the log row.\"\"\"\n ...\n\ndef delete(full=False):\n \"\"\"Supprime le contenu du journal, y compris les en-t\u00eates.\n\nExample: ``log.delete()``\n\nTo add the log headers again the ``set_labels`` function should to be called after this function.\n\nThere are two erase modes; \u201cfull\u201d completely removes the data from the physical storage,\nand \u201cfast\u201d invalidates the data without removing it.\n\n:param full: ``True`` s\u00e9lectionne un effacement \"complet\" et ``False`` s\u00e9lectionne la m\u00e9thode d'effacement \"rapide\".\"\"\"\n ...\n\ndef set_mirroring(serial: bool):\n \"\"\"Configurez la mise en miroir de l'activit\u00e9 d'enregistrement des donn\u00e9es sur la sortie s\u00e9rie.\n\nExample: ``log.set_mirroring(True)``\n\nSerial mirroring is disabled by default. When enabled, it will print to serial each row logged into the log file.\n\n:param serial: ``True`` active la mise en miroir des donn\u00e9es sur la sortie s\u00e9rie.\"\"\"\n ...", "/typeshed/stdlib/love.pyi": "def badaboom() -> None: ...\n", "/typeshed/stdlib/machine.pyi": "\"\"\"Utilitaires bas niveau\"\"\"\nfrom typing import Any\nfrom .microbit import MicroBitDigitalPin\n\ndef unique_id() -> bytes:\n \"\"\"R\u00e9cup\u00e8re une cha\u00eene d'octets repr\u00e9sentant un identifiant unique d'une carte.\n\nExample: ``machine.unique_id()``\n\n:return: An identifier that varies from one board instance to another.\"\"\"\n ...\n\ndef reset() -> None:\n \"\"\"R\u00e9initialise l'appareil d'une mani\u00e8re similaire \u00e0 la pression sur le bouton RESET externe.\n\nExample: ``machine.reset()``\"\"\"\n ...\n\ndef freq() -> int:\n \"\"\"R\u00e9cup\u00e8re la fr\u00e9quence du CPU en hertz.\n\nExample: ``machine.freq()``\n\n:return: The CPU frequency.\"\"\"\n ...\n\ndef disable_irq() -> Any:\n \"\"\"D\u00e9sactiver les demandes d'interruption.\n\nExample: ``interrupt_state = machine.disable_irq()``\n\n:return: the previous IRQ state which should be considered an opaque value\n\nThe return value should be passed to the ``enable_irq`` function to restore\ninterrupts to their original state.\"\"\"\n ...\n\ndef enable_irq(state: Any) -> None:\n \"\"\"R\u00e9activer les demandes d'interruption.\n\nExample: ``machine.enable_irq(interrupt_state)``\n\n:param state: La valeur qui a \u00e9t\u00e9 renvoy\u00e9e par l'appel le plus r\u00e9cent \u00e0 la fonction ``disable_irq``.\"\"\"\n ...\n\ndef time_pulse_us(pin: MicroBitDigitalPin, pulse_level: int, timeout_us: int=1000000) -> int:\n \"\"\"Chronom\u00e9trer une impulsion sur une broche.\n\nExample: ``time_pulse_us(pin0, 1)``\n\nIf the current input value of the pin is different to ``pulse_level``, the\nfunction first waits until the pin input becomes equal to\n``pulse_level``, then times the duration that the pin is equal to\n``pulse_level``. If the pin is already equal to ``pulse_level`` then timing\nstarts straight away.\n\n:param pin: (broche) La broche \u00e0 utiliser\n:param pulse_level: 0 pour chronom\u00e9trer une impulsion basse ou 1 pour chronom\u00e9trer une impulsion haute.\n:param timeout_us: Un d\u00e9lai d'attente en microseconde\n:return: The duration of the pulse in microseconds, or -1 for a timeout waiting for the level to match ``pulse_level``, or -2 on timeout waiting for the pulse to end\"\"\"\n ...\n\nclass mem:\n \"\"\"La classe pour les vues m\u00e9moire ``mem8``, ``mem16`` et ``mem32``.\"\"\"\n\n def __getitem__(self, address: int) -> int:\n \"\"\"Acc\u00e9der \u00e0 une valeur dans la m\u00e9moire.\n\n:param address: L'adresse en m\u00e9moire.\n:return: The value at that address as an integer.\"\"\"\n ...\n\n def __setitem__(self, address: int, value: int) -> None:\n \"\"\"\u00c9crire une valeur \u00e0 une adresse donn\u00e9e.\n\n:param address: L'adresse en m\u00e9moire.\n:param value: La valeur enti\u00e8re \u00e0 \u00e9crire.\"\"\"\n ...\nmem8: mem\n\"\"\"Vue de la m\u00e9moire au format 8-bit (octet).\"\"\"\nmem16: mem\n\"\"\"Vue de la m\u00e9moire au format 16-bit.\"\"\"\nmem32: mem\n\"\"\"Vue de la m\u00e9moire au format 32-bit.\"\"\"", "/typeshed/stdlib/math.pyi": "\"\"\"Fonctions math\u00e9matiques.\"\"\"\nfrom typing import Tuple\n\ndef acos(x: float) -> float:\n \"\"\"Calculer le cosinus invers\u00e9.\n\nExample: ``math.acos(1)``\n\n:param x: Un nombre\n:return: The inverse cosine of ``x``\"\"\"\n ...\n\ndef asin(x: float) -> float:\n \"\"\"Calculer le sinus invers\u00e9.\n\nExample: ``math.asin(0)``\n\n:param x: Un nombre\n:return: The inverse sine of ``x``\"\"\"\n ...\n\ndef atan(x: float) -> float:\n \"\"\"Calculer la tangente inverse.\n\nExample: ``math.atan(0)``\n\n:param x: Un nombre\n:return: The inverse tangent of ``x``\"\"\"\n ...\n\ndef atan2(y: float, x: float) -> float:\n \"\"\"Calculer la valeur principale de la tangente inverse de ``y/x``.\n\nExample: ``math.atan2(0, -1)``\n\n:param y: Un nombre\n:param x: Un nombre\n:return: The principal value of the inverse tangent of ``y/x``\"\"\"\n ...\n\ndef ceil(x: float) -> float:\n \"\"\"Arrondir un nombre vers l'infini positif.\n\nExample: ``math.ceil(0.1)``\n\n:param x: Un nombre\n:return: ``x`` rounded towards positive infinity.\"\"\"\n ...\n\ndef copysign(x: float, y: float) -> float:\n \"\"\"Calculer ``x`` avec le signe de ``y``.\n\nExample: ``math.copysign(1, -1)``\n\n:param x: Un nombre\n:param y: La source du signe pour la valeur de retour\n:return: ``x`` with the sign of ``y``\"\"\"\n ...\n\ndef cos(x: float) -> float:\n \"\"\"Calculer le cosinus de ``x``.\n\nExample: ``math.cos(0)``\n\n:param x: Un nombre\n:return: The cosine of ``x``\"\"\"\n ...\n\ndef degrees(x: float) -> float:\n \"\"\"Convertir les radians en degr\u00e9s. (degr\u00e9s)\n\nExample: ``math.degrees(2 * math.pi)``\n\n:param x: Une valeur en radians\n:return: The value converted to degrees\"\"\"\n ...\n\ndef exp(x: float) -> float:\n \"\"\"Calculer l'exponentiel de ``x``.\n\nExample: ``math.exp(1)``\n\n:param x: Un nombre\n:return: The exponential of ``x``.\"\"\"\n ...\n\ndef fabs(x: float) -> float:\n \"\"\"Renvoie la valeur absolue de ``x``.\n\nExample: ``math.fabs(-0.1)``\n\n:param x: Un nombre\n:return: The absolute value of ``x``\"\"\"\n ...\n\ndef floor(x: float) -> int:\n \"\"\"Arrondir un nombre vers l'infini n\u00e9gatif.\n\nExample: ``math.floor(0.9)``\n\n:param x: Un nombre\n:return: ``x`` rounded towards negative infinity.\"\"\"\n ...\n\ndef fmod(x: float, y: float) -> float:\n \"\"\"Calculer le reste de ``x/y``.\n\nExample: ``math.fmod(10, 3)``\n\n:param x: Le num\u00e9rateur\n:param y: Le d\u00e9nominateur\"\"\"\n ...\n\ndef frexp(x: float) -> Tuple[float, int]:\n \"\"\"D\u00e9compose un nombre \u00e0 virgule flottante en sa mantisse et son exposant.\n\nExample: ``mantissa, exponent = math.frexp(2)``\n\nThe returned value is the tuple ``(m, e)`` such that ``x == m * 2**e``\nexactly. If ``x == 0`` then the function returns ``(0.0, 0)``, otherwise\nthe relation ``0.5 <= abs(m) < 1`` holds.\n\n:param x: Un nombre \u00e0 virgule flottante\n:return: A tuple of length two containing its mantissa then exponent\"\"\"\n ...\n\ndef isfinite(x: float) -> bool:\n \"\"\"V\u00e9rifier si une valeur est finie.\n\nExample: ``math.isfinite(float('inf'))``\n\n:param x: Un nombre.\n:return: ``True`` if ``x`` is finite, ``False`` otherwise.\"\"\"\n ...\n\ndef isinf(x: float) -> bool:\n \"\"\"V\u00e9rifie si une valeur est infinie.\n\nExample: ``math.isinf(float('-inf'))``\n\n:param x: Un nombre.\n:return: ``True`` if ``x`` is infinite, ``False`` otherwise.\"\"\"\n ...\n\ndef isnan(x: float) -> bool:\n \"\"\"V\u00e9rifie si une valeur n'est pas un nombre (NaN).\n\nExample: ``math.isnan(float('nan'))``\n\n:param x: Un nombre\n:return: ``True`` if ``x`` is not-a-number (NaN), ``False`` otherwise.\"\"\"\n ...\n\ndef ldexp(x: float, exp: int) -> float:\n \"\"\"Calculer ``x * (2**exp)``.\n\nExample: ``math.ldexp(0.5, 2)``\n\n:param x: Un nombre\n:param exp: Exposant entier\n:return: ``x * (2**exp)``\"\"\"\n ...\n\ndef log(x: float, base: float=e) -> float:\n \"\"\"Calculer le logarithme de ``x`` \u00e0 la base donn\u00e9e (logarithme naturel par d\u00e9faut).\n\nExample: ``math.log(math.e)``\n\nWith one argument, return the natural logarithm of x (to base e).\n\nWith two arguments, return the logarithm of x to the given base, calculated as ``log(x)/log(base)``.\n\n:param x: Un nombre\n:param base: La base \u00e0 utiliser\n:return: The natural logarithm of ``x``\"\"\"\n ...\n\ndef modf(x: float) -> Tuple[float, float]:\n \"\"\"Calculer les parties fractionnelles et int\u00e9grales de ``x``.\n\nExample: ``fractional, integral = math.modf(1.5)``\n\n:param x: Un nombre\n:return: A tuple of two floats representing the fractional then integral parts of ``x``.\n\nBoth the fractional and integral values have the same sign as ``x``.\"\"\"\n ...\n\ndef pow(x: float, y: float) -> float:\n \"\"\"Renvoie ``x`` \u00e0 la puissance ``y``.\n\nExample: ``math.pow(4, 0.5)``\n\n:param x: Un nombre\n:param y: L'exposant\n:return: ``x`` to the power of ``y``\"\"\"\n ...\n\ndef radians(x: float) -> float:\n \"\"\"Convertir les degr\u00e9s en radians.\n\nExample: ``math.radians(360)``\n\n:param x: Une valeur en degr\u00e9s\n:return: The value converted to radians\"\"\"\n ...\n\ndef sin(x: float) -> float:\n \"\"\"Calculer le sinus de ``x``.\n\nExample: ``math.sin(math.pi/2)``\n\n:param x: Un nombre\n:return: The sine of ``x``\"\"\"\n ...\n\ndef sqrt(x: float) -> float:\n \"\"\"Calculer la racine carr\u00e9e de ``x``.\n\nExample: ``math.sqrt(4)``\n\n:param x: Un nombre\n:return: The square root of ``x``\"\"\"\n ...\n\ndef tan(x: float) -> float:\n \"\"\"Calculer la tangente de ``x``.\n\nExample: ``math.tan(0)``\n\n:param x: Un nombre\n:return: The tangent of ``x``.\"\"\"\n ...\n\ndef trunc(x: float) -> int:\n \"\"\"Arrondir un nombre vers 0.\n\nExample: ``math.trunc(-0.9)``\n\n:param x: Un nombre\n:return: ``x`` rounded towards zero.\"\"\"\n ...\ne: float\n\"\"\"Base du logarithme naturel\"\"\"\npi: float\n\"\"\"Le ratio entre la circonf\u00e9rence d'un cercle et son diam\u00e8tre\"\"\"", @@ -35,9 +35,8 @@ "/typeshed/stdlib/usys.pyi": "from sys import *\n", "/typeshed/stdlib/utime.pyi": "from time import *\n", "/typeshed/stdlib/_typeshed/__init__.pyi": "# Utility types for typeshed\n#\n# See the README.md file in this directory for more information.\n\nimport array\nimport sys\nfrom os import PathLike\nfrom typing import AbstractSet, Any, Container, Iterable, Protocol, Tuple, TypeVar, Union\nfrom typing_extensions import Literal, final\n\n_KT = TypeVar(\"_KT\")\n_KT_co = TypeVar(\"_KT_co\", covariant=True)\n_KT_contra = TypeVar(\"_KT_contra\", contravariant=True)\n_VT = TypeVar(\"_VT\")\n_VT_co = TypeVar(\"_VT_co\", covariant=True)\n_T = TypeVar(\"_T\")\n_T_co = TypeVar(\"_T_co\", covariant=True)\n_T_contra = TypeVar(\"_T_contra\", contravariant=True)\n\n# Use for \"self\" annotations:\n# def __enter__(self: Self) -> Self: ...\nSelf = TypeVar(\"Self\") # noqa Y001\n\n# stable\nclass IdentityFunction(Protocol):\n def __call__(self, __x: _T) -> _T: ...\n\nclass SupportsLessThan(Protocol):\n def __lt__(self, __other: Any) -> bool: ...\n\nSupportsLessThanT = TypeVar(\"SupportsLessThanT\", bound=SupportsLessThan) # noqa: Y001\n\nclass SupportsDivMod(Protocol[_T_contra, _T_co]):\n def __divmod__(self, __other: _T_contra) -> _T_co: ...\n\nclass SupportsRDivMod(Protocol[_T_contra, _T_co]):\n def __rdivmod__(self, __other: _T_contra) -> _T_co: ...\n\nclass SupportsLenAndGetItem(Protocol[_T_co]):\n def __len__(self) -> int: ...\n def __getitem__(self, __k: int) -> _T_co: ...\n\n# Mapping-like protocols\n\n# stable\nclass SupportsItems(Protocol[_KT_co, _VT_co]):\n def items(self) -> AbstractSet[Tuple[_KT_co, _VT_co]]: ...\n\n# stable\nclass SupportsKeysAndGetItem(Protocol[_KT, _VT_co]):\n def keys(self) -> Iterable[_KT]: ...\n def __getitem__(self, __k: _KT) -> _VT_co: ...\n\n# stable\nclass SupportsGetItem(Container[_KT_contra], Protocol[_KT_contra, _VT_co]):\n def __getitem__(self, __k: _KT_contra) -> _VT_co: ...\n\n# stable\nclass SupportsItemAccess(SupportsGetItem[_KT_contra, _VT], Protocol[_KT_contra, _VT]):\n def __setitem__(self, __k: _KT_contra, __v: _VT) -> None: ...\n def __delitem__(self, __v: _KT_contra) -> None: ...\n\n# These aliases are simple strings in Python 2.\nStrPath = Union[str, PathLike[str]] # stable\nBytesPath = Union[bytes, PathLike[bytes]] # stable\nStrOrBytesPath = Union[str, bytes, PathLike[str], PathLike[bytes]] # stable\n\nOpenTextModeUpdating = Literal[\n \"r+\",\n \"+r\",\n \"rt+\",\n \"r+t\",\n \"+rt\",\n \"tr+\",\n \"t+r\",\n \"+tr\",\n \"w+\",\n \"+w\",\n \"wt+\",\n \"w+t\",\n \"+wt\",\n \"tw+\",\n \"t+w\",\n \"+tw\",\n \"a+\",\n \"+a\",\n \"at+\",\n \"a+t\",\n \"+at\",\n \"ta+\",\n \"t+a\",\n \"+ta\",\n \"x+\",\n \"+x\",\n \"xt+\",\n \"x+t\",\n \"+xt\",\n \"tx+\",\n \"t+x\",\n \"+tx\",\n]\nOpenTextModeWriting = Literal[\"w\", \"wt\", \"tw\", \"a\", \"at\", \"ta\", \"x\", \"xt\", \"tx\"]\nOpenTextModeReading = Literal[\"r\", \"rt\", \"tr\", \"U\", \"rU\", \"Ur\", \"rtU\", \"rUt\", \"Urt\", \"trU\", \"tUr\", \"Utr\"]\nOpenTextMode = Union[OpenTextModeUpdating, OpenTextModeWriting, OpenTextModeReading]\nOpenBinaryModeUpdating = Literal[\n \"rb+\",\n \"r+b\",\n \"+rb\",\n \"br+\",\n \"b+r\",\n \"+br\",\n \"wb+\",\n \"w+b\",\n \"+wb\",\n \"bw+\",\n \"b+w\",\n \"+bw\",\n \"ab+\",\n \"a+b\",\n \"+ab\",\n \"ba+\",\n \"b+a\",\n \"+ba\",\n \"xb+\",\n \"x+b\",\n \"+xb\",\n \"bx+\",\n \"b+x\",\n \"+bx\",\n]\nOpenBinaryModeWriting = Literal[\"wb\", \"bw\", \"ab\", \"ba\", \"xb\", \"bx\"]\nOpenBinaryModeReading = Literal[\"rb\", \"br\", \"rbU\", \"rUb\", \"Urb\", \"brU\", \"bUr\", \"Ubr\"]\nOpenBinaryMode = Union[OpenBinaryModeUpdating, OpenBinaryModeReading, OpenBinaryModeWriting]\n\n# stable\nclass HasFileno(Protocol):\n def fileno(self) -> int: ...\n\nFileDescriptor = int # stable\nFileDescriptorLike = Union[int, HasFileno] # stable\n\n# stable\nclass SupportsRead(Protocol[_T_co]):\n def read(self, __length: int = ...) -> _T_co: ...\n\n# stable\nclass SupportsReadline(Protocol[_T_co]):\n def readline(self, __length: int = ...) -> _T_co: ...\n\n# stable\nclass SupportsNoArgReadline(Protocol[_T_co]):\n def readline(self) -> _T_co: ...\n\n# stable\nclass SupportsWrite(Protocol[_T_contra]):\n def write(self, __s: _T_contra) -> Any: ...\n\nReadableBuffer = Union[bytes, bytearray, memoryview, array.array[Any]] # stable\nWriteableBuffer = Union[bytearray, memoryview, array.array[Any]] # stable\n\n# stable\nif sys.version_info >= (3, 10):\n from types import NoneType as NoneType\nelse:\n # Used by type checkers for checks involving None (does not exist at runtime)\n @final\n class NoneType:\n def __bool__(self) -> Literal[False]: ...\n", - "/typeshed/stdlib/collections/__init__.pyi": "import sys\nfrom typing import (\n Any,\n Dict,\n Generic,\n ItemsView,\n Iterable,\n Iterator,\n KeysView,\n Optional,\n Reversible,\n Tuple,\n Type,\n TypeVar,\n Union,\n ValuesView,\n)\n\n_S = TypeVar(\"_S\")\n_T = TypeVar(\"_T\")\n_KT = TypeVar(\"_KT\")\n_VT = TypeVar(\"_VT\")\n\nif sys.version_info >= (3, 7):\n def namedtuple(\n typename: str,\n field_names: Union[str, Iterable[str]],\n *,\n rename: bool = ...,\n module: Optional[str] = ...,\n defaults: Optional[Iterable[Any]] = ...,\n ) -> Type[Tuple[Any, ...]]: ...\n\nelse:\n def namedtuple(\n typename: str,\n field_names: Union[str, Iterable[str]],\n *,\n verbose: bool = ...,\n rename: bool = ...,\n module: Optional[str] = ...,\n ) -> Type[Tuple[Any, ...]]: ...\n\nclass _OrderedDictKeysView(KeysView[_KT], Reversible[_KT]):\n def __reversed__(self) -> Iterator[_KT]: ...\n\nclass _OrderedDictItemsView(ItemsView[_KT, _VT], Reversible[Tuple[_KT, _VT]]):\n def __reversed__(self) -> Iterator[Tuple[_KT, _VT]]: ...\n\nclass _OrderedDictValuesView(ValuesView[_VT], Reversible[_VT]):\n def __reversed__(self) -> Iterator[_VT]: ...\n\nclass OrderedDict(Dict[_KT, _VT], Reversible[_KT], Generic[_KT, _VT]):\n def popitem(self, last: bool = ...) -> Tuple[_KT, _VT]: ...\n def move_to_end(self, key: _KT, last: bool = ...) -> None: ...\n def copy(self: _S) -> _S: ...\n def __reversed__(self) -> Iterator[_KT]: ...\n def keys(self) -> _OrderedDictKeysView[_KT]: ...\n def items(self) -> _OrderedDictItemsView[_KT, _VT]: ...\n def values(self) -> _OrderedDictValuesView[_VT]: ...\n", - "/typeshed/stdlib/microbit/__init__.pyi": "\"\"\"Broches, images, sons, temp\u00e9rature et volume\"\"\"\nfrom typing import Any, Callable, List, Optional, Tuple, Union, overload\nfrom _typeshed import ReadableBuffer\nfrom . import accelerometer as accelerometer\nfrom . import audio as audio\nfrom . import compass as compass\nfrom . import display as display\nfrom . import i2c as i2c\nfrom . import microphone as microphone\nfrom . import speaker as speaker\nfrom . import spi as spi\nfrom . import uart as uart\n\ndef run_every(callback: Optional[Callable[[], None]]=None, days: int=0, h: int=0, min: int=0, s: int=0, ms: int=0) -> Callable[[Callable[[], None]], Callable[[], None]]:\n \"\"\"Schedule to run a function at the interval specified by the time arguments **V2 only**.\n\nExample: ``run_every(my_logging, min=5)``\n\n``run_every`` can be used in two ways:\n\nAs a Decorator - placed on top of the function to schedule. For example::\n\n @run_every(h=1, min=20, s=30, ms=50)\n def my_function():\n # Do something here\n\nAs a Function - passing the callback as a positional argument. For example::\n\n def my_function():\n # Do something here\n run_every(my_function, s=30)\n\nEach argument corresponds to a different time unit and they are additive.\nSo ``run_every(min=1, s=30)`` schedules the callback every minute and a half.\n\nWhen an exception is thrown inside the callback function it deschedules the\nfunction. To avoid this you can catch exceptions with ``try/except``.\n\n:param callback: Function to call at the provided interval. Omit when using as a decorator.\n:param days: Sets the day mark for the scheduling.\n:param h: Sets the hour mark for the scheduling.\n:param min: Sets the minute mark for the scheduling.\n:param s: Sets the second mark for the scheduling.\n:param ms: Sets the millisecond mark for the scheduling.\"\"\"\n\ndef panic(n: int) -> None:\n \"\"\"Passer en mode panique.\n\nExample: ``panic(127)``\n\n:param n: Un nombre entier arbitraire <= 255 pour indiquer un \u00e9tat.\n\nRequires restart.\"\"\"\n\ndef reset() -> None:\n \"\"\"Red\u00e9marrer la carte.\"\"\"\n\n@overload\ndef scale(value: float, from_: Tuple[float, float], to: Tuple[int, int]) -> int:\n \"\"\"Convertit une valeur dans intervalle donn\u00e9 vers son \u00e9quivalent dans un autre intervalle d'entiers. (Mise \u00e0 l'\u00e9chelle)\n\nExample: ``volume = scale(accelerometer.get_x(), from_=(-2000, 2000), to=(0, 255))``\n\nFor example, to convert an accelerometer X value to a speaker volume.\n\nIf one of the numbers in the ``to`` parameter is a floating point\n(i.e a decimal number like ``10.0``), this function will return a\nfloating point number.\n\n temp_fahrenheit = scale(30, from_=(0.0, 100.0), to=(32.0, 212.0))\n\n:param value: Un nombre \u00e0 convertir.\n:param from_: (de) Un tuple qui d\u00e9finit l'intervalle de d\u00e9part.\n:param to: (vers) Un tuple qui d\u00e9finit l'intervalle d'arriv\u00e9e.\n:return: The ``value`` converted to the ``to`` range.\"\"\"\n\n@overload\ndef scale(value: float, from_: Tuple[float, float], to: Tuple[float, float]) -> float:\n \"\"\"Convertit une valeur dans intervalle donn\u00e9 vers son \u00e9quivalent dans un autre intervalle de nombres \u00e0 virgule flottante. (Mise \u00e0 l'\u00e9chelle)\n\nExample: ``temp_fahrenheit = scale(30, from_=(0.0, 100.0), to=(32.0, 212.0))``\n\nFor example, to convert temperature from a Celsius scale to Fahrenheit.\n\nIf one of the numbers in the ``to`` parameter is a floating point\n(i.e a decimal number like ``10.0``), this function will return a\nfloating point number.\nIf they are both integers (i.e ``10``), it will return an integer::\n\n returns_int = scale(accelerometer.get_x(), from_=(-2000, 2000), to=(0, 255))\n\n:param value: Un nombre \u00e0 convertir.\n:param from_: (de) Un tuple qui d\u00e9finit l'intervalle de d\u00e9part.\n:param to: (vers) Un tuple qui d\u00e9finit l'intervalle d'arriv\u00e9e.\n:return: The ``value`` converted to the ``to`` range.\"\"\"\n\ndef sleep(n: float) -> None:\n \"\"\"Attendre ``n`` millisecondes.\n\nExample: ``sleep(1000)``\n\n:param n: Le nombre de millisecondes \u00e0 attendre\n\nOne second is 1000 milliseconds, so::\n\n microbit.sleep(1000)\n\nwill pause the execution for one second.\"\"\"\n\ndef running_time() -> int:\n \"\"\"Obtenir le temps de fonctionnement de la carte.\n\n:return: The number of milliseconds since the board was switched on or restarted.\"\"\"\n\ndef temperature() -> int:\n \"\"\"Obtenir la temp\u00e9rature du micro:bit en degr\u00e9s Celcius.\"\"\"\n\ndef set_volume(v: int) -> None:\n \"\"\"D\u00e9finit le volume.\n\nExample: ``set_volume(127)``\n\n:param v: Une valeur entre 0 (bas) et 255 (haut).\n\nOut of range values will be clamped to 0 or 255.\n\n**V2** only.\"\"\"\n ...\n\nclass Button:\n \"\"\"La classe pour les boutons ``button_a`` et ``button_b``.\"\"\"\n\n def is_pressed(self) -> bool:\n \"\"\"V\u00e9rifier si le bouton est appuy\u00e9.\n\n:return: ``True`` if the specified button ``button`` is pressed, and ``False`` otherwise.\"\"\"\n ...\n\n def was_pressed(self) -> bool:\n \"\"\"V\u00e9rifie si le bouton a \u00e9t\u00e9 press\u00e9 depuis que l'appareil a \u00e9t\u00e9 d\u00e9marr\u00e9 ou depuis la derni\u00e8re fois o\u00f9 cette m\u00e9thode a \u00e9t\u00e9 appel\u00e9e.\n\nCalling this method will clear the press state so\nthat the button must be pressed again before this method will return\n``True`` again.\n\n:return: ``True`` if the specified button ``button`` was pressed, and ``False`` otherwise\"\"\"\n ...\n\n def get_presses(self) -> int:\n \"\"\"Obtenir le nombre total d'occurrences o\u00f9 le bouton a \u00e9t\u00e9 appuy\u00e9, et r\u00e9initialise ce total avant de retourner.\n\n:return: The number of presses since the device started or the last time this method was called\"\"\"\n ...\nbutton_a: Button\n\"\"\"L'objet bouton ``Button`` gauche.\"\"\"\nbutton_b: Button\n\"\"\"L'objet bouton ``Button`` droit.\"\"\"\n\nclass MicroBitDigitalPin:\n \"\"\"Une broche num\u00e9rique.\n\nSome pins support analog and touch features using the ``MicroBitAnalogDigitalPin`` and ``MicroBitTouchPin`` subclasses.\"\"\"\n NO_PULL: int\n PULL_UP: int\n PULL_DOWN: int\n\n def read_digital(self) -> int:\n \"\"\"R\u00e9cup\u00e8re la valeur num\u00e9rique de la broche\n\nExample: ``value = pin0.read_digital()``\n\n:return: 1 if the pin is high, and 0 if it's low.\"\"\"\n ...\n\n def write_digital(self, value: int) -> None:\n \"\"\"D\u00e9finit la valeur num\u00e9rique de la broche\n\nExample: ``pin0.write_digital(1)``\n\n:param value: 1 pour d\u00e9finir la broche \u00e0 un niveau haut ou 0 pour d\u00e9finir la broche \u00e0 un niveau bas\"\"\"\n ...\n\n def set_pull(self, value: int) -> None:\n \"\"\"D\u00e9finissez l'\u00e9tat de tirage sur l'une des trois valeurs possibles\\xa0: ``PULL_UP``, ``PULL_DOWN`` ou ``NO_PULL``.\n\nExample: ``pin0.set_pull(pin0.PULL_UP)``\n\n:param value: L'\u00e9tat de tirage sur la broche correspondante, par exemple ``pin0.PULL_UP``.\"\"\"\n ...\n\n def get_pull(self) -> int:\n \"\"\"Obtenir l'\u00e9tat de tirage sur une broche.\n\nExample: ``pin0.get_pull()``\n\n:return: ``NO_PULL``, ``PULL_DOWN``, or ``PULL_UP``\n\nThese are set using the ``set_pull()`` method or automatically configured\nwhen a pin mode requires it.\"\"\"\n ...\n\n def get_mode(self) -> str:\n \"\"\"Renvoie le mode de la broche\n\nExample: ``pin0.get_mode()``\n\nWhen a pin is used for a specific function, like\nwriting a digital value, or reading an analog value, the pin mode\nchanges.\n\n:return: ``\"unused\"``, ``\"analog\"``, ``\"read_digital\"``, ``\"write_digital\"``, ``\"display\"``, ``\"button\"``, ``\"music\"``, ``\"audio\"``, ``\"touch\"``, ``\"i2c\"``, or ``\"spi\"``\"\"\"\n ...\n\n def write_analog(self, value: int) -> None:\n \"\"\"Sortie d'un signal PWM sur la broche, avec un rapport cyclique proportionnel \u00e0 ``value``.\n\nExample: ``pin0.write_analog(254)``\n\n:param value: Un entier ou un nombre \u00e0 virgule flottante entre 0 (rapport cyclique \u00e0 0%) et 1023 (rapport cyclique \u00e0 100%).\"\"\"\n\n def set_analog_period(self, period: int) -> None:\n \"\"\"D\u00e9finit la p\u00e9riode de sortie du signal PWM \u00e0 ``period`` en millisecondes.\n\nExample: ``pin0.set_analog_period(10)``\n\n:param period: La p\u00e9riode en millisecondes avec une valeur minimale valide de 1 ms.\"\"\"\n\n def set_analog_period_microseconds(self, period: int) -> None:\n \"\"\"D\u00e9finit la p\u00e9riode de sortie du signal PWM \u00e0 ``period`` en millisecondes.\n\nExample: ``pin0.set_analog_period_microseconds(512)``\n\n:param period: La p\u00e9riode en microsecondes avec une valeur minimale valide de 256\u00b5s.\"\"\"\n\nclass MicroBitAnalogDigitalPin(MicroBitDigitalPin):\n \"\"\"Une broche avec des fonctions analogiques et num\u00e9riques.\"\"\"\n\n def read_analog(self) -> int:\n \"\"\"Lit la tension appliqu\u00e9e \u00e0 la broche.\n\nExample: ``pin0.read_analog()``\n\n:return: An integer between 0 (meaning 0V) and 1023 (meaning 3.3V).\"\"\"\n\nclass MicroBitTouchPin(MicroBitAnalogDigitalPin):\n \"\"\"Une broche avec des fonctions analogiques, num\u00e9riques et tactiles.\"\"\"\n CAPACITIVE: int\n RESISTIVE: int\n\n def is_touched(self) -> bool:\n \"\"\"V\u00e9rifie si la broche est touch\u00e9e.\n\nExample: ``pin0.is_touched()``\n\nThe default touch mode for the pins on the edge connector is ``resistive``.\nThe default for the logo pin **V2** is ``capacitive``.\n\n**Resistive touch**\nThis test is done by measuring how much resistance there is between the\npin and ground. A low resistance gives a reading of ``True``. To get\na reliable reading using a finger you may need to touch the ground pin\nwith another part of your body, for example your other hand.\n\n**Capacitive touch**\nThis test is done by interacting with the electric field of a capacitor\nusing a finger as a conductor. `Capacitive touch\n`_\ndoes not require you to make a ground connection as part of a circuit.\n\n:return: ``True`` if the pin is being touched with a finger, otherwise return ``False``.\"\"\"\n ...\n\n def set_touch_mode(self, value: int) -> None:\n \"\"\"D\u00e9finit le mode tactile pour la broche.\n\nExample: ``pin0.set_touch_mode(pin0.CAPACITIVE)``\n\nThe default touch mode for the pins on the edge connector is\n``resistive``. The default for the logo pin **V2** is ``capacitive``.\n\n:param value: ``CAPACITIVE`` ou ``RESISTIVE`` pour la broche correspondante.\"\"\"\n ...\npin0: MicroBitTouchPin\n\"\"\"Broche avec des fonctionnalit\u00e9s num\u00e9riques, analogiques, et tactiles.\"\"\"\npin1: MicroBitTouchPin\n\"\"\"Broche avec des fonctionnalit\u00e9s num\u00e9riques, analogiques, et tactiles.\"\"\"\npin2: MicroBitTouchPin\n\"\"\"Broche avec des fonctionnalit\u00e9s num\u00e9riques, analogiques, et tactiles.\"\"\"\npin3: MicroBitAnalogDigitalPin\n\"\"\"Broche avec des fonctionnalit\u00e9s num\u00e9riques et analogiques.\"\"\"\npin4: MicroBitAnalogDigitalPin\n\"\"\"Broche avec des fonctionnalit\u00e9s num\u00e9riques et analogiques.\"\"\"\npin5: MicroBitDigitalPin\n\"\"\"Broche avec des fonctionnalit\u00e9s num\u00e9riques\"\"\"\npin6: MicroBitDigitalPin\n\"\"\"Broche avec des fonctionnalit\u00e9s num\u00e9riques\"\"\"\npin7: MicroBitDigitalPin\n\"\"\"Broche avec des fonctionnalit\u00e9s num\u00e9riques\"\"\"\npin8: MicroBitDigitalPin\n\"\"\"Broche avec des fonctionnalit\u00e9s num\u00e9riques\"\"\"\npin9: MicroBitDigitalPin\n\"\"\"Broche avec des fonctionnalit\u00e9s num\u00e9riques\"\"\"\npin10: MicroBitAnalogDigitalPin\n\"\"\"Broche avec des fonctionnalit\u00e9s num\u00e9riques et analogiques.\"\"\"\npin11: MicroBitDigitalPin\n\"\"\"Broche avec des fonctionnalit\u00e9s num\u00e9riques\"\"\"\npin12: MicroBitDigitalPin\n\"\"\"Broche avec des fonctionnalit\u00e9s num\u00e9riques\"\"\"\npin13: MicroBitDigitalPin\n\"\"\"Broche avec des fonctionnalit\u00e9s num\u00e9riques\"\"\"\npin14: MicroBitDigitalPin\n\"\"\"Broche avec des fonctionnalit\u00e9s num\u00e9riques\"\"\"\npin15: MicroBitDigitalPin\n\"\"\"Broche avec des fonctionnalit\u00e9s num\u00e9riques\"\"\"\npin16: MicroBitDigitalPin\n\"\"\"Broche avec des fonctionnalit\u00e9s num\u00e9riques\"\"\"\npin19: MicroBitDigitalPin\n\"\"\"Broche avec des fonctionnalit\u00e9s num\u00e9riques\"\"\"\npin20: MicroBitDigitalPin\n\"\"\"Broche avec des fonctionnalit\u00e9s num\u00e9riques\"\"\"\npin_logo: MicroBitTouchPin\n\"\"\"Une broche logo sensible au toucher sur l'avant du micro:bit, qui est d\u00e9finie par d\u00e9faut en mode tactile capacitif.\"\"\"\npin_speaker: MicroBitAnalogDigitalPin\n\"\"\"Une broche pour adresser le haut-parleur micro:bit.\n\nThis API is intended only for use in Pulse-Width Modulation pin operations e.g. pin_speaker.write_analog(128).\n\"\"\"\n\nclass Image:\n \"\"\"Une image \u00e0 afficher sur l'\u00e9cran LED du micro:bit.\n\nGiven an image object it's possible to display it via the ``display`` API::\n\n display.show(Image.HAPPY)\"\"\"\n HEART: Image\n \"\"\"Image d'un c\u0153ur.\"\"\"\n HEART_SMALL: Image\n \"\"\"Petite image d'un c\u0153ur\"\"\"\n HAPPY: Image\n \"\"\"Image de visage heureux.\"\"\"\n SMILE: Image\n \"\"\"Image de visage souriant.\"\"\"\n SAD: Image\n \"\"\"Image de visage triste.\"\"\"\n CONFUSED: Image\n \"\"\"Image d'un visage perplexe.\"\"\"\n ANGRY: Image\n \"\"\"Image de visage en col\u00e8re.\"\"\"\n ASLEEP: Image\n \"\"\"Image de visage endormi\"\"\"\n SURPRISED: Image\n \"\"\"Image de visage surpris.\"\"\"\n SILLY: Image\n \"\"\"Image de visage absurde.\"\"\"\n FABULOUS: Image\n \"\"\"Image de visage avec lunettes de soleil.\"\"\"\n MEH: Image\n \"\"\"Image de visage pas impressionn\u00e9\"\"\"\n YES: Image\n \"\"\"Image d'une coche.\"\"\"\n NO: Image\n \"\"\"Image d'une croix.\"\"\"\n CLOCK12: Image\n \"\"\"Image avec une ligne indiquant vers 12 heures.\"\"\"\n CLOCK11: Image\n \"\"\"Image avec une ligne indiquant vers 11 heures.\"\"\"\n CLOCK10: Image\n \"\"\"Image avec une ligne indiquant vers 10 heures.\"\"\"\n CLOCK9: Image\n \"\"\"Image avec une ligne indiquant vers 9 heures.\"\"\"\n CLOCK8: Image\n \"\"\"Image avec une ligne indiquant vers 8 heures.\"\"\"\n CLOCK7: Image\n \"\"\"Image avec une ligne indiquant vers 7 heures.\"\"\"\n CLOCK6: Image\n \"\"\"Image avec une ligne indiquant vers 6 heures.\"\"\"\n CLOCK5: Image\n \"\"\"Image avec une ligne indiquant vers 5 heures.\"\"\"\n CLOCK4: Image\n \"\"\"Image avec une ligne indiquant vers 4 heures.\"\"\"\n CLOCK3: Image\n \"\"\"Image avec une ligne indiquant vers 3 heures.\"\"\"\n CLOCK2: Image\n \"\"\"Image avec une ligne indiquant vers 2 heures.\"\"\"\n CLOCK1: Image\n \"\"\"Image avec une ligne indiquant vers 1 heure.\"\"\"\n ARROW_N: Image\n \"\"\"Image de fl\u00e8che pointant vers le nord.\"\"\"\n ARROW_NE: Image\n \"\"\"Image de fl\u00e8che pointant vers le nord est.\"\"\"\n ARROW_E: Image\n \"\"\"Image de fl\u00e8che pointant vers l'est.\"\"\"\n ARROW_SE: Image\n \"\"\"Image de fl\u00e8che pointant vers le sud-est.\"\"\"\n ARROW_S: Image\n \"\"\"Image de fl\u00e8che pointant vers le sud.\"\"\"\n ARROW_SW: Image\n \"\"\"Image de fl\u00e8che pointant vers le sud-ouest.\"\"\"\n ARROW_W: Image\n \"\"\"Image de fl\u00e8che pointant vers l'ouest.\"\"\"\n ARROW_NW: Image\n \"\"\"Image de fl\u00e8che pointant vers le nord ouest.\"\"\"\n TRIANGLE: Image\n \"\"\"Image d'un triangle pointant vers le haut.\"\"\"\n TRIANGLE_LEFT: Image\n \"\"\"Image d'un triangle dans le coin gauche.\"\"\"\n CHESSBOARD: Image\n \"\"\"\u00c9clairage alternatif des LEDs dans un motif d'\u00e9chiquier.\"\"\"\n DIAMOND: Image\n \"\"\"Image de diamant.\"\"\"\n DIAMOND_SMALL: Image\n \"\"\"Petite image de diamant.\"\"\"\n SQUARE: Image\n \"\"\"Image de carr\u00e9.\"\"\"\n SQUARE_SMALL: Image\n \"\"\"Petite image de carr\u00e9.\"\"\"\n RABBIT: Image\n \"\"\"Image de lapin.\"\"\"\n COW: Image\n \"\"\"Image de vache.\"\"\"\n MUSIC_CROTCHET: Image\n \"\"\"Image d'une note.\"\"\"\n MUSIC_QUAVER: Image\n \"\"\"Image d'une croche.\"\"\"\n MUSIC_QUAVERS: Image\n \"\"\"Image d'une paire de croche.\"\"\"\n PITCHFORK: Image\n \"\"\"Image d'une fourche.\"\"\"\n XMAS: Image\n \"\"\"Image d'un arbre de No\u00ebl.\"\"\"\n PACMAN: Image\n \"\"\"Image du personnage d'arcade Pac-Man.\"\"\"\n TARGET: Image\n \"\"\"Image d'une cible.\"\"\"\n TSHIRT: Image\n \"\"\"Image de t-shirt.\"\"\"\n ROLLERSKATE: Image\n \"\"\"Image de patin \u00e0 roulette.\"\"\"\n DUCK: Image\n \"\"\"Image de canard.\"\"\"\n HOUSE: Image\n \"\"\"Image d'une maison.\"\"\"\n TORTOISE: Image\n \"\"\"Image d'une tortue.\"\"\"\n BUTTERFLY: Image\n \"\"\"Image d'un papillon.\"\"\"\n STICKFIGURE: Image\n \"\"\"Image d'un personnage.\"\"\"\n GHOST: Image\n \"\"\"Image de fant\u00f4me.\"\"\"\n SWORD: Image\n \"\"\"Image d'une \u00e9p\u00e9e.\"\"\"\n GIRAFFE: Image\n \"\"\"Image d'une girafe.\"\"\"\n SKULL: Image\n \"\"\"Image d'un cr\u00e2ne.\"\"\"\n UMBRELLA: Image\n \"\"\"Image d'un parapluie.\"\"\"\n SNAKE: Image\n \"\"\"Image de serpent.\"\"\"\n SCISSORS: Image\n \"\"\"Scissors image.\"\"\"\n ALL_CLOCKS: List[Image]\n \"\"\"Une liste contenant toutes les images CLOCK_ en s\u00e9quence.\"\"\"\n ALL_ARROWS: List[Image]\n \"\"\"Une liste contenant toutes les images ARROW_ en s\u00e9quence.\"\"\"\n\n @overload\n def __init__(self, string: str) -> None:\n \"\"\"Cr\u00e9er une image \u00e0 partir d'une cha\u00eene de caract\u00e8res d\u00e9crivant quelles LED sont allum\u00e9es.\n\n``string`` has to consist of digits 0-9 arranged into lines,\ndescribing the image, for example::\n\n image = Image(\"90009:\"\n \"09090:\"\n \"00900:\"\n \"09090:\"\n \"90009\")\n\nwill create a 5\u00d75 image of an X. The end of a line is indicated by a\ncolon. It's also possible to use newlines (\\\\n) insead of the colons.\n\n:param string: La cha\u00eene de caract\u00e8res d\u00e9crivant l'image.\"\"\"\n ...\n\n @overload\n def __init__(self, width: int=5, height: int=5, buffer: ReadableBuffer=None) -> None:\n \"\"\"Cr\u00e9er une image vide avec ``width`` colonnes et ``height`` lignes.\n\n:param width: Largeur optionnelle de l'image\n:param height: Hauteur optionnelle de l'image\n:param buffer: Tableau optionnel ou octets de ``width``\u00d7``height`` entiers dans la plage 0-9 pour initialiser l'image\n\nExamples::\n\n Image(2, 2, b'\\x08\\x08\\x08\\x08')\n Image(2, 2, bytearray([9,9,9,9]))\n\nThese create 2 x 2 pixel images at full brightness.\"\"\"\n ...\n\n def width(self) -> int:\n \"\"\"R\u00e9cup\u00e8re le nombre de colonnes.\n\n:return: The number of columns in the image\"\"\"\n ...\n\n def height(self) -> int:\n \"\"\"R\u00e9cup\u00e8re le nombre de lignes.\n\n:return: The number of rows in the image\"\"\"\n ...\n\n def set_pixel(self, x: int, y: int, value: int) -> None:\n \"\"\"D\u00e9finit la luminosit\u00e9 d'un pixel.\n\nExample: ``my_image.set_pixel(0, 0, 9)``\n\n:param x: Le num\u00e9ro de colonne\n:param y: Le num\u00e9ro de ligne\n:param value: La luminosit\u00e9 sous la forme d'un entier compris entre 0 (sombre) et 9 (lumineux)\n\nThis method will raise an exception when called on any of the built-in\nread-only images, like ``Image.HEART``.\"\"\"\n ...\n\n def get_pixel(self, x: int, y: int) -> int:\n \"\"\"R\u00e9cup\u00e8re la luminosit\u00e9 d'un pixel.\n\nExample: ``my_image.get_pixel(0, 0)``\n\n:param x: Le num\u00e9ro de colonne\n:param y: Le num\u00e9ro de ligne\n:return: The brightness as an integer between 0 and 9.\"\"\"\n ...\n\n def shift_left(self, n: int) -> Image:\n \"\"\"Cr\u00e9er une nouvelle image en d\u00e9pla\u00e7ant l'image \u00e0 gauche.\n\nExample: ``Image.HEART_SMALL.shift_left(1)``\n\n:param n: Le nombre de colonnes par lequel d\u00e9placer\n:return: The shifted image\"\"\"\n ...\n\n def shift_right(self, n: int) -> Image:\n \"\"\"Cr\u00e9er une nouvelle image en d\u00e9pla\u00e7ant l'image \u00e0 droite.\n\nExample: ``Image.HEART_SMALL.shift_right(1)``\n\n:param n: Le nombre de colonnes par lequel d\u00e9placer\n:return: The shifted image\"\"\"\n ...\n\n def shift_up(self, n: int) -> Image:\n \"\"\"Cr\u00e9er une nouvelle image en d\u00e9pla\u00e7ant l'image vers le haut.\n\nExample: ``Image.HEART_SMALL.shift_up(1)``\n\n:param n: Le nombre de lignes par lequel d\u00e9placer\n:return: The shifted image\"\"\"\n ...\n\n def shift_down(self, n: int) -> Image:\n \"\"\"Cr\u00e9er une nouvelle image en d\u00e9pla\u00e7ant l'image vers le bas.\n\nExample: ``Image.HEART_SMALL.shift_down(1)``\n\n:param n: Le nombre de lignes par lequel d\u00e9placer\n:return: The shifted image\"\"\"\n ...\n\n def crop(self, x: int, y: int, w: int, h: int) -> Image:\n \"\"\"Cr\u00e9er une nouvelle image en recadrant l'image.\n\nExample: ``Image.HEART.crop(1, 1, 3, 3)``\n\n:param x: Le nombre de colonnes duquel d\u00e9caler le recadrage\n:param y: Le nombre de lignes duquel d\u00e9caler le recadrage\n:param w: La largeur du recadrage\n:param h: La hauteur du recadrage\n:return: The new image\"\"\"\n ...\n\n def copy(self) -> Image:\n \"\"\"Cr\u00e9er une copie exacte de l'image.\n\nExample: ``Image.HEART.copy()``\n\n:return: The new image\"\"\"\n ...\n\n def invert(self) -> Image:\n \"\"\"Cr\u00e9er une nouvelle image en inversant la luminosit\u00e9 des pixels de l'image source.\n\nExample: ``Image.SMALL_HEART.invert()``\n\n:return: The new image.\"\"\"\n ...\n\n def fill(self, value: int) -> None:\n \"\"\"D\u00e9finit la luminosit\u00e9 de tous les pixels de l'image.\n\nExample: ``my_image.fill(5)``\n\n:param value: La nouvelle luminosit\u00e9 sous la forme d'un nombre compris entre 0 (sombre) et 9 (lumineux).\n\nThis method will raise an exception when called on any of the built-in\nread-only images, like ``Image.HEART``.\"\"\"\n ...\n\n def blit(self, src: Image, x: int, y: int, w: int, h: int, xdest: int=0, ydest: int=0) -> None:\n \"\"\"Copier la zone d'une autre image vers cette image.\n\nExample: ``my_image.blit(Image.HEART, 1, 1, 3, 3, 1, 1)``\n\n:param src: L'image source\n:param x: Le d\u00e9calage de la colonne de d\u00e9part dans l'image source\n:param y: D\u00e9calage de la ligne de d\u00e9part dans l'image source\n:param w: Le nombre de colonnes \u00e0 copier\n:param h: Le nombre de lignes \u00e0 copier\n:param xdest: Le d\u00e9calage de la colonne \u00e0 modifier dans cette image\n:param ydest: Le d\u00e9calage de la ligne \u00e0 modifier dans cette image\n\nPixels outside the source image are treated as having a brightness of 0.\n\n``shift_left()``, ``shift_right()``, ``shift_up()``, ``shift_down()``\nand ``crop()`` can are all implemented by using ``blit()``.\n\nFor example, img.crop(x, y, w, h) can be implemented as::\n\n def crop(self, x, y, w, h):\n res = Image(w, h)\n res.blit(self, x, y, w, h)\n return res\"\"\"\n ...\n\n def __repr__(self) -> str:\n \"\"\"R\u00e9cup\u00e8re une repr\u00e9sentation de l'image sous forme de texte compact.\"\"\"\n ...\n\n def __str__(self) -> str:\n \"\"\"R\u00e9cup\u00e8re une cha\u00eene de caract\u00e8res lisible de l'image.\"\"\"\n ...\n\n def __add__(self, other: Image) -> Image:\n \"\"\"Cr\u00e9e une nouvelle image en additionnant les valeurs de luminosit\u00e9 des deux images\npour chaque pixel.\n\nExample: ``Image.HEART + Image.HAPPY``\n\n:param other: L'image \u00e0 ajouter.\"\"\"\n ...\n\n def __sub__(self, other: Image) -> Image:\n \"\"\"Cr\u00e9e une nouvelle image en soustrayant de cette image les valeurs de luminosit\u00e9 de\nl'autre image.\n\nExample: ``Image.HEART - Image.HEART_SMALL``\n\n:param other: L'image \u00e0 soustraire.\"\"\"\n ...\n\n def __mul__(self, n: float) -> Image:\n \"\"\"Cr\u00e9e une nouvelle image en multipliant la luminosit\u00e9 de chaque pixel par\n``n``.\n\nExample: ``Image.HEART * 0.5``\n\n:param n: La valeur par laquelle multiplier.\"\"\"\n ...\n\n def __truediv__(self, n: float) -> Image:\n \"\"\"Cr\u00e9e une nouvelle image en divisant la luminosit\u00e9 de chaque pixel par\n``n``.\n\nExample: ``Image.HEART / 2``\n\n:param n: La valeur par laquelle diviser.\"\"\"\n ...\n\nclass SoundEvent:\n LOUD: SoundEvent\n \"\"\"Repr\u00e9sente la transition d'\u00e9v\u00e9nements sonores, de ``quiet`` \u00e0 ``loud`` comme un clap dans les mains ou un cri.\"\"\"\n QUIET: SoundEvent\n \"\"\"Repr\u00e9sente la transition d'\u00e9v\u00e9nements sonores de ``loud`` \u00e0 ``quiet`` comme parler ou \u00e9couter de la musique de fond.\"\"\"\n\nclass Sound:\n \"\"\"Les sons int\u00e9gr\u00e9s peuvent \u00eatre appel\u00e9s en utilisant ``audio.play(Sound.NAME)``.\"\"\"\n GIGGLE: Sound\n \"\"\"Bruit de gloussement.\"\"\"\n HAPPY: Sound\n \"\"\"Son joyeux.\"\"\"\n HELLO: Sound\n \"\"\"Son de salutation.\"\"\"\n MYSTERIOUS: Sound\n \"\"\"Son myst\u00e9rieux.\"\"\"\n SAD: Sound\n \"\"\"Son triste.\"\"\"\n SLIDE: Sound\n \"\"\"Bruit de glissade.\"\"\"\n SOARING: Sound\n \"\"\"Bruit d'envol\u00e9e.\"\"\"\n SPRING: Sound\n \"\"\"Son d'un ressort.\"\"\"\n TWINKLE: Sound\n \"\"\"Son de scintillement.\"\"\"\n YAWN: Sound\n \"\"\"Son de b\u00e2illement.\"\"\"", - "/typeshed/stdlib/microbit/accelerometer.pyi": "\"\"\"Mesurer l'acc\u00e9l\u00e9ration du micro:bit et reconnaitre des mouvements.\"\"\"\nfrom typing import Tuple\n\ndef get_x() -> int:\n \"\"\"R\u00e9cup\u00e9rer la mesure de l'acc\u00e9l\u00e9ration dans l'axe ``x`` en milli-g.\n\nExample: ``accelerometer.get_x()``\n\n:return: A positive or negative integer depending on direction in the range +/- 2000mg.\"\"\"\n ...\n\ndef get_y() -> int:\n \"\"\"R\u00e9cup\u00e9rer la mesure de l'acc\u00e9l\u00e9ration dans l'axe ``y`` en milli-g.\n\nExample: ``accelerometer.get_y()``\n\n:return: A positive or negative integer depending on direction in the range +/- 2000mg.\"\"\"\n ...\n\ndef get_z() -> int:\n \"\"\"R\u00e9cup\u00e9rer la mesure de l'acc\u00e9l\u00e9ration dans l'axe ``z`` en milli-g.\n\nExample: ``accelerometer.get_z()``\n\n:return: A positive or negative integer depending on direction in the range +/- 2000mg.\"\"\"\n ...\n\ndef get_values() -> Tuple[int, int, int]:\n \"\"\"R\u00e9cup\u00e9rer en une fois les mesures d'acc\u00e9l\u00e9ration dans tous les axes sous forme d'un tuple.\n\nExample: ``x, y, z = accelerometer.get_values()``\n\n:return: a three-element tuple of integers ordered as X, Y, Z, each value a positive or negative integer depending on direction in the range +/- 2000mg\"\"\"\n ...\n\ndef get_strength() -> int:\n \"\"\"Get the acceleration measurement of all axes combined, as a positive integer. This is the Pythagorean sum of the X, Y and Z axes.\n\nExample: ``accelerometer.get_strength()``\n\n:return: The combined acceleration strength of all the axes, in milli-g.\"\"\"\n ...\n\ndef current_gesture() -> str:\n \"\"\"R\u00e9cup\u00e9rer le nom du geste actuel.\n\nExample: ``accelerometer.current_gesture()``\n\nMicroPython understands the following gesture names: ``\"up\"``, ``\"down\"``,\n``\"left\"``, ``\"right\"``, ``\"face up\"``, ``\"face down\"``, ``\"freefall\"``,\n``\"3g\"``, ``\"6g\"``, ``\"8g\"``, ``\"shake\"``. Gestures are always\nrepresented as strings.\n\n:return: The current gesture\"\"\"\n ...\n\ndef is_gesture(name: str) -> bool:\n \"\"\"V\u00e9rifier si le geste nomm\u00e9 est actif en ce moment.\n\nExample: ``accelerometer.is_gesture('shake')``\n\nMicroPython understands the following gesture names: ``\"up\"``, ``\"down\"``,\n``\"left\"``, ``\"right\"``, ``\"face up\"``, ``\"face down\"``, ``\"freefall\"``,\n``\"3g\"``, ``\"6g\"``, ``\"8g\"``, ``\"shake\"``. Gestures are always\nrepresented as strings.\n\n:param name: Le nom du geste.\n:return: ``True`` if the gesture is active, ``False`` otherwise.\"\"\"\n ...\n\ndef was_gesture(name: str) -> bool:\n \"\"\"V\u00e9rifier si le geste nomm\u00e9 a \u00e9t\u00e9 actif depuis le dernier appel.\n\nExample: ``accelerometer.was_gesture('shake')``\n\nMicroPython understands the following gesture names: ``\"up\"``, ``\"down\"``,\n``\"left\"``, ``\"right\"``, ``\"face up\"``, ``\"face down\"``, ``\"freefall\"``,\n``\"3g\"``, ``\"6g\"``, ``\"8g\"``, ``\"shake\"``. Gestures are always\nrepresented as strings.\n\n:param name: Le nom du geste.\n:return: ``True`` if the gesture was active since the last call, ``False`` otherwise.\"\"\"\n\ndef get_gestures() -> Tuple[str, ...]:\n \"\"\"Renvoyer un tuple de l'historique des gestes.\n\nExample: ``accelerometer.get_gestures()``\n\nClears the gesture history before returning.\n\nGestures are not updated in the background so there needs to be constant\ncalls to some accelerometer method to do the gesture detection. Usually\ngestures can be detected using a loop with a small :func:`microbit.sleep` delay.\n\n:return: The history as a tuple, most recent last.\"\"\"\n ...\n\ndef set_range(value: int) -> None:\n \"\"\"Set the accelerometer sensitivity range, in g (standard gravity), to the closest values supported by the hardware, so it rounds to either ``2``, ``4``, or ``8`` g.\n\nExample: ``accelerometer.set_range(8)``\n\n:param value: New range for the accelerometer, an integer in ``g``.\"\"\"", + "/typeshed/stdlib/microbit/__init__.pyi": "\"\"\"Broches, images, sons, temp\u00e9rature et volume\"\"\"\nfrom typing import Any, Callable, List, Optional, Tuple, Union, overload\nfrom _typeshed import ReadableBuffer\nfrom . import accelerometer as accelerometer\nfrom . import audio as audio\nfrom . import compass as compass\nfrom . import display as display\nfrom . import i2c as i2c\nfrom . import microphone as microphone\nfrom . import speaker as speaker\nfrom . import spi as spi\nfrom . import uart as uart\n\ndef run_every(callback: Optional[Callable[[], None]]=None, days: int=0, h: int=0, min: int=0, s: int=0, ms: int=0) -> Callable[[Callable[[], None]], Callable[[], None]]:\n \"\"\"Planifie l'ex\u00e9cution d'une fonction \u00e0 l'intervalle sp\u00e9cifi\u00e9 par les arguments temporels **V2 uniquement**.\n\nExample: ``run_every(my_logging, min=5)``\n\n``run_every`` can be used in two ways:\n\nAs a Decorator - placed on top of the function to schedule. For example::\n\n @run_every(h=1, min=20, s=30, ms=50)\n def my_function():\n # Do something here\n\nAs a Function - passing the callback as a positional argument. For example::\n\n def my_function():\n # Do something here\n run_every(my_function, s=30)\n\nEach argument corresponds to a different time unit and they are additive.\nSo ``run_every(min=1, s=30)`` schedules the callback every minute and a half.\n\nWhen an exception is thrown inside the callback function it deschedules the\nfunction. To avoid this you can catch exceptions with ``try/except``.\n\n:param callback: Fonction \u00e0 appeler \u00e0 l'intervalle fourni. \u00c0 omettre en cas d'utilisation comme d\u00e9corateur.\n:param days: D\u00e9finit la marque du jour pour la programmation.\n:param h: D\u00e9finit la marque d'heure pour la programmation.\n:param min: D\u00e9finit la marque de minute pour la programmation.\n:param s: D\u00e9finit la marque de seconde pour la programmation.\n:param ms: D\u00e9finit la marque de milliseconde pour la programmation.\"\"\"\n\ndef panic(n: int) -> None:\n \"\"\"Passer en mode panique.\n\nExample: ``panic(127)``\n\n:param n: Un nombre entier arbitraire <= 255 pour indiquer un \u00e9tat.\n\nRequires restart.\"\"\"\n\ndef reset() -> None:\n \"\"\"Red\u00e9marrer la carte.\"\"\"\n\n@overload\ndef scale(value: float, from_: Tuple[float, float], to: Tuple[int, int]) -> int:\n \"\"\"Convertit une valeur dans intervalle donn\u00e9 vers son \u00e9quivalent dans un autre intervalle d'entiers. (Mise \u00e0 l'\u00e9chelle)\n\nExample: ``volume = scale(accelerometer.get_x(), from_=(-2000, 2000), to=(0, 255))``\n\nFor example, to convert an accelerometer X value to a speaker volume.\n\nIf one of the numbers in the ``to`` parameter is a floating point\n(i.e a decimal number like ``10.0``), this function will return a\nfloating point number.\n\n temp_fahrenheit = scale(30, from_=(0.0, 100.0), to=(32.0, 212.0))\n\n:param value: Un nombre \u00e0 convertir.\n:param from_: (de) Un tuple qui d\u00e9finit l'intervalle de d\u00e9part.\n:param to: (vers) Un tuple qui d\u00e9finit l'intervalle d'arriv\u00e9e.\n:return: The ``value`` converted to the ``to`` range.\"\"\"\n\n@overload\ndef scale(value: float, from_: Tuple[float, float], to: Tuple[float, float]) -> float:\n \"\"\"Convertit une valeur dans intervalle donn\u00e9 vers son \u00e9quivalent dans un autre intervalle de nombres \u00e0 virgule flottante. (Mise \u00e0 l'\u00e9chelle)\n\nExample: ``temp_fahrenheit = scale(30, from_=(0.0, 100.0), to=(32.0, 212.0))``\n\nFor example, to convert temperature from a Celsius scale to Fahrenheit.\n\nIf one of the numbers in the ``to`` parameter is a floating point\n(i.e a decimal number like ``10.0``), this function will return a\nfloating point number.\nIf they are both integers (i.e ``10``), it will return an integer::\n\n returns_int = scale(accelerometer.get_x(), from_=(-2000, 2000), to=(0, 255))\n\n:param value: Un nombre \u00e0 convertir.\n:param from_: (de) Un tuple qui d\u00e9finit l'intervalle de d\u00e9part.\n:param to: (vers) Un tuple qui d\u00e9finit l'intervalle d'arriv\u00e9e.\n:return: The ``value`` converted to the ``to`` range.\"\"\"\n\ndef sleep(n: float) -> None:\n \"\"\"Attendre ``n`` millisecondes.\n\nExample: ``sleep(1000)``\n\n:param n: Le nombre de millisecondes \u00e0 attendre\n\nOne second is 1000 milliseconds, so::\n\n microbit.sleep(1000)\n\nwill pause the execution for one second.\"\"\"\n\ndef running_time() -> int:\n \"\"\"Obtenir le temps de fonctionnement de la carte.\n\n:return: The number of milliseconds since the board was switched on or restarted.\"\"\"\n\ndef temperature() -> int:\n \"\"\"Obtenir la temp\u00e9rature du micro:bit en degr\u00e9s Celcius.\"\"\"\n\ndef set_volume(v: int) -> None:\n \"\"\"D\u00e9finit le volume.\n\nExample: ``set_volume(127)``\n\n:param v: Une valeur entre 0 (bas) et 255 (haut).\n\nOut of range values will be clamped to 0 or 255.\n\n**V2** only.\"\"\"\n ...\n\nclass Button:\n \"\"\"La classe pour les boutons ``button_a`` et ``button_b``.\"\"\"\n\n def is_pressed(self) -> bool:\n \"\"\"V\u00e9rifier si le bouton est appuy\u00e9.\n\n:return: ``True`` if the specified button ``button`` is pressed, and ``False`` otherwise.\"\"\"\n ...\n\n def was_pressed(self) -> bool:\n \"\"\"V\u00e9rifie si le bouton a \u00e9t\u00e9 press\u00e9 depuis que l'appareil a \u00e9t\u00e9 d\u00e9marr\u00e9 ou depuis la derni\u00e8re fois o\u00f9 cette m\u00e9thode a \u00e9t\u00e9 appel\u00e9e.\n\nCalling this method will clear the press state so\nthat the button must be pressed again before this method will return\n``True`` again.\n\n:return: ``True`` if the specified button ``button`` was pressed, and ``False`` otherwise\"\"\"\n ...\n\n def get_presses(self) -> int:\n \"\"\"Obtenir le nombre total d'occurrences o\u00f9 le bouton a \u00e9t\u00e9 appuy\u00e9, et r\u00e9initialise ce total avant de retourner.\n\n:return: The number of presses since the device started or the last time this method was called\"\"\"\n ...\nbutton_a: Button\n\"\"\"L'objet bouton ``Button`` gauche.\"\"\"\nbutton_b: Button\n\"\"\"L'objet bouton ``Button`` droit.\"\"\"\n\nclass MicroBitDigitalPin:\n \"\"\"Une broche num\u00e9rique.\n\nSome pins support analog and touch features using the ``MicroBitAnalogDigitalPin`` and ``MicroBitTouchPin`` subclasses.\"\"\"\n NO_PULL: int\n PULL_UP: int\n PULL_DOWN: int\n\n def read_digital(self) -> int:\n \"\"\"R\u00e9cup\u00e8re la valeur num\u00e9rique de la broche\n\nExample: ``value = pin0.read_digital()``\n\n:return: 1 if the pin is high, and 0 if it's low.\"\"\"\n ...\n\n def write_digital(self, value: int) -> None:\n \"\"\"D\u00e9finit la valeur num\u00e9rique de la broche\n\nExample: ``pin0.write_digital(1)``\n\n:param value: 1 pour d\u00e9finir la broche \u00e0 un niveau haut ou 0 pour d\u00e9finir la broche \u00e0 un niveau bas\"\"\"\n ...\n\n def set_pull(self, value: int) -> None:\n \"\"\"D\u00e9finissez l'\u00e9tat de tirage sur l'une des trois valeurs possibles\\xa0: ``PULL_UP``, ``PULL_DOWN`` ou ``NO_PULL``.\n\nExample: ``pin0.set_pull(pin0.PULL_UP)``\n\n:param value: L'\u00e9tat de tirage sur la broche correspondante, par exemple ``pin0.PULL_UP``.\"\"\"\n ...\n\n def get_pull(self) -> int:\n \"\"\"Obtenir l'\u00e9tat de tirage sur une broche.\n\nExample: ``pin0.get_pull()``\n\n:return: ``NO_PULL``, ``PULL_DOWN``, or ``PULL_UP``\n\nThese are set using the ``set_pull()`` method or automatically configured\nwhen a pin mode requires it.\"\"\"\n ...\n\n def get_mode(self) -> str:\n \"\"\"Renvoie le mode de la broche\n\nExample: ``pin0.get_mode()``\n\nWhen a pin is used for a specific function, like\nwriting a digital value, or reading an analog value, the pin mode\nchanges.\n\n:return: ``\"unused\"``, ``\"analog\"``, ``\"read_digital\"``, ``\"write_digital\"``, ``\"display\"``, ``\"button\"``, ``\"music\"``, ``\"audio\"``, ``\"touch\"``, ``\"i2c\"``, or ``\"spi\"``\"\"\"\n ...\n\n def write_analog(self, value: int) -> None:\n \"\"\"Sortie d'un signal PWM sur la broche, avec un rapport cyclique proportionnel \u00e0 ``value``.\n\nExample: ``pin0.write_analog(254)``\n\n:param value: Un entier ou un nombre \u00e0 virgule flottante entre 0 (rapport cyclique \u00e0 0%) et 1023 (rapport cyclique \u00e0 100%).\"\"\"\n\n def set_analog_period(self, period: int) -> None:\n \"\"\"D\u00e9finit la p\u00e9riode de sortie du signal PWM \u00e0 ``period`` en millisecondes.\n\nExample: ``pin0.set_analog_period(10)``\n\n:param period: La p\u00e9riode en millisecondes avec une valeur minimale valide de 1 ms.\"\"\"\n\n def set_analog_period_microseconds(self, period: int) -> None:\n \"\"\"D\u00e9finit la p\u00e9riode de sortie du signal PWM \u00e0 ``period`` en millisecondes.\n\nExample: ``pin0.set_analog_period_microseconds(512)``\n\n:param period: La p\u00e9riode en microsecondes avec une valeur minimale valide de 256\u00b5s.\"\"\"\n\nclass MicroBitAnalogDigitalPin(MicroBitDigitalPin):\n \"\"\"Une broche avec des fonctions analogiques et num\u00e9riques.\"\"\"\n\n def read_analog(self) -> int:\n \"\"\"Lit la tension appliqu\u00e9e \u00e0 la broche.\n\nExample: ``pin0.read_analog()``\n\n:return: An integer between 0 (meaning 0V) and 1023 (meaning 3.3V).\"\"\"\n\nclass MicroBitTouchPin(MicroBitAnalogDigitalPin):\n \"\"\"Une broche avec des fonctions analogiques, num\u00e9riques et tactiles.\"\"\"\n CAPACITIVE: int\n RESISTIVE: int\n\n def is_touched(self) -> bool:\n \"\"\"V\u00e9rifie si la broche est touch\u00e9e.\n\nExample: ``pin0.is_touched()``\n\nThe default touch mode for the pins on the edge connector is ``resistive``.\nThe default for the logo pin **V2** is ``capacitive``.\n\n**Resistive touch**\nThis test is done by measuring how much resistance there is between the\npin and ground. A low resistance gives a reading of ``True``. To get\na reliable reading using a finger you may need to touch the ground pin\nwith another part of your body, for example your other hand.\n\n**Capacitive touch**\nThis test is done by interacting with the electric field of a capacitor\nusing a finger as a conductor. `Capacitive touch\n`_\ndoes not require you to make a ground connection as part of a circuit.\n\n:return: ``True`` if the pin is being touched with a finger, otherwise return ``False``.\"\"\"\n ...\n\n def set_touch_mode(self, value: int) -> None:\n \"\"\"D\u00e9finit le mode tactile pour la broche.\n\nExample: ``pin0.set_touch_mode(pin0.CAPACITIVE)``\n\nThe default touch mode for the pins on the edge connector is\n``resistive``. The default for the logo pin **V2** is ``capacitive``.\n\n:param value: ``CAPACITIVE`` ou ``RESISTIVE`` pour la broche correspondante.\"\"\"\n ...\npin0: MicroBitTouchPin\n\"\"\"Broche avec des fonctionnalit\u00e9s num\u00e9riques, analogiques, et tactiles.\"\"\"\npin1: MicroBitTouchPin\n\"\"\"Broche avec des fonctionnalit\u00e9s num\u00e9riques, analogiques, et tactiles.\"\"\"\npin2: MicroBitTouchPin\n\"\"\"Broche avec des fonctionnalit\u00e9s num\u00e9riques, analogiques, et tactiles.\"\"\"\npin3: MicroBitAnalogDigitalPin\n\"\"\"Broche avec des fonctionnalit\u00e9s num\u00e9riques et analogiques.\"\"\"\npin4: MicroBitAnalogDigitalPin\n\"\"\"Broche avec des fonctionnalit\u00e9s num\u00e9riques et analogiques.\"\"\"\npin5: MicroBitDigitalPin\n\"\"\"Broche avec des fonctionnalit\u00e9s num\u00e9riques\"\"\"\npin6: MicroBitDigitalPin\n\"\"\"Broche avec des fonctionnalit\u00e9s num\u00e9riques\"\"\"\npin7: MicroBitDigitalPin\n\"\"\"Broche avec des fonctionnalit\u00e9s num\u00e9riques\"\"\"\npin8: MicroBitDigitalPin\n\"\"\"Broche avec des fonctionnalit\u00e9s num\u00e9riques\"\"\"\npin9: MicroBitDigitalPin\n\"\"\"Broche avec des fonctionnalit\u00e9s num\u00e9riques\"\"\"\npin10: MicroBitAnalogDigitalPin\n\"\"\"Broche avec des fonctionnalit\u00e9s num\u00e9riques et analogiques.\"\"\"\npin11: MicroBitDigitalPin\n\"\"\"Broche avec des fonctionnalit\u00e9s num\u00e9riques\"\"\"\npin12: MicroBitDigitalPin\n\"\"\"Broche avec des fonctionnalit\u00e9s num\u00e9riques\"\"\"\npin13: MicroBitDigitalPin\n\"\"\"Broche avec des fonctionnalit\u00e9s num\u00e9riques\"\"\"\npin14: MicroBitDigitalPin\n\"\"\"Broche avec des fonctionnalit\u00e9s num\u00e9riques\"\"\"\npin15: MicroBitDigitalPin\n\"\"\"Broche avec des fonctionnalit\u00e9s num\u00e9riques\"\"\"\npin16: MicroBitDigitalPin\n\"\"\"Broche avec des fonctionnalit\u00e9s num\u00e9riques\"\"\"\npin19: MicroBitDigitalPin\n\"\"\"Broche avec des fonctionnalit\u00e9s num\u00e9riques\"\"\"\npin20: MicroBitDigitalPin\n\"\"\"Broche avec des fonctionnalit\u00e9s num\u00e9riques\"\"\"\npin_logo: MicroBitTouchPin\n\"\"\"Une broche logo sensible au toucher sur l'avant du micro:bit, qui est d\u00e9finie par d\u00e9faut en mode tactile capacitif.\"\"\"\npin_speaker: MicroBitAnalogDigitalPin\n\"\"\"Une broche pour adresser le haut-parleur micro:bit.\n\nThis API is intended only for use in Pulse-Width Modulation pin operations e.g. pin_speaker.write_analog(128).\n\"\"\"\n\nclass Image:\n \"\"\"Une image \u00e0 afficher sur l'\u00e9cran LED du micro:bit.\n\nGiven an image object it's possible to display it via the ``display`` API::\n\n display.show(Image.HAPPY)\"\"\"\n HEART: Image\n \"\"\"Image d'un c\u0153ur.\"\"\"\n HEART_SMALL: Image\n \"\"\"Petite image d'un c\u0153ur\"\"\"\n HAPPY: Image\n \"\"\"Image de visage heureux.\"\"\"\n SMILE: Image\n \"\"\"Image de visage souriant.\"\"\"\n SAD: Image\n \"\"\"Image de visage triste.\"\"\"\n CONFUSED: Image\n \"\"\"Image d'un visage perplexe.\"\"\"\n ANGRY: Image\n \"\"\"Image de visage en col\u00e8re.\"\"\"\n ASLEEP: Image\n \"\"\"Image de visage endormi\"\"\"\n SURPRISED: Image\n \"\"\"Image de visage surpris.\"\"\"\n SILLY: Image\n \"\"\"Image de visage absurde.\"\"\"\n FABULOUS: Image\n \"\"\"Image de visage avec lunettes de soleil.\"\"\"\n MEH: Image\n \"\"\"Image de visage pas impressionn\u00e9\"\"\"\n YES: Image\n \"\"\"Image d'une coche.\"\"\"\n NO: Image\n \"\"\"Image d'une croix.\"\"\"\n CLOCK12: Image\n \"\"\"Image avec une ligne indiquant vers 12 heures.\"\"\"\n CLOCK11: Image\n \"\"\"Image avec une ligne indiquant vers 11 heures.\"\"\"\n CLOCK10: Image\n \"\"\"Image avec une ligne indiquant vers 10 heures.\"\"\"\n CLOCK9: Image\n \"\"\"Image avec une ligne indiquant vers 9 heures.\"\"\"\n CLOCK8: Image\n \"\"\"Image avec une ligne indiquant vers 8 heures.\"\"\"\n CLOCK7: Image\n \"\"\"Image avec une ligne indiquant vers 7 heures.\"\"\"\n CLOCK6: Image\n \"\"\"Image avec une ligne indiquant vers 6 heures.\"\"\"\n CLOCK5: Image\n \"\"\"Image avec une ligne indiquant vers 5 heures.\"\"\"\n CLOCK4: Image\n \"\"\"Image avec une ligne indiquant vers 4 heures.\"\"\"\n CLOCK3: Image\n \"\"\"Image avec une ligne indiquant vers 3 heures.\"\"\"\n CLOCK2: Image\n \"\"\"Image avec une ligne indiquant vers 2 heures.\"\"\"\n CLOCK1: Image\n \"\"\"Image avec une ligne indiquant vers 1 heure.\"\"\"\n ARROW_N: Image\n \"\"\"Image de fl\u00e8che pointant vers le nord.\"\"\"\n ARROW_NE: Image\n \"\"\"Image de fl\u00e8che pointant vers le nord est.\"\"\"\n ARROW_E: Image\n \"\"\"Image de fl\u00e8che pointant vers l'est.\"\"\"\n ARROW_SE: Image\n \"\"\"Image de fl\u00e8che pointant vers le sud-est.\"\"\"\n ARROW_S: Image\n \"\"\"Image de fl\u00e8che pointant vers le sud.\"\"\"\n ARROW_SW: Image\n \"\"\"Image de fl\u00e8che pointant vers le sud-ouest.\"\"\"\n ARROW_W: Image\n \"\"\"Image de fl\u00e8che pointant vers l'ouest.\"\"\"\n ARROW_NW: Image\n \"\"\"Image de fl\u00e8che pointant vers le nord ouest.\"\"\"\n TRIANGLE: Image\n \"\"\"Image d'un triangle pointant vers le haut.\"\"\"\n TRIANGLE_LEFT: Image\n \"\"\"Image d'un triangle dans le coin gauche.\"\"\"\n CHESSBOARD: Image\n \"\"\"\u00c9clairage alternatif des LEDs dans un motif d'\u00e9chiquier.\"\"\"\n DIAMOND: Image\n \"\"\"Image de diamant.\"\"\"\n DIAMOND_SMALL: Image\n \"\"\"Petite image de diamant.\"\"\"\n SQUARE: Image\n \"\"\"Image de carr\u00e9.\"\"\"\n SQUARE_SMALL: Image\n \"\"\"Petite image de carr\u00e9.\"\"\"\n RABBIT: Image\n \"\"\"Image de lapin.\"\"\"\n COW: Image\n \"\"\"Image de vache.\"\"\"\n MUSIC_CROTCHET: Image\n \"\"\"Image d'une note.\"\"\"\n MUSIC_QUAVER: Image\n \"\"\"Image d'une croche.\"\"\"\n MUSIC_QUAVERS: Image\n \"\"\"Image d'une paire de croche.\"\"\"\n PITCHFORK: Image\n \"\"\"Image d'une fourche.\"\"\"\n XMAS: Image\n \"\"\"Image d'un arbre de No\u00ebl.\"\"\"\n PACMAN: Image\n \"\"\"Image du personnage d'arcade Pac-Man.\"\"\"\n TARGET: Image\n \"\"\"Image d'une cible.\"\"\"\n TSHIRT: Image\n \"\"\"Image de t-shirt.\"\"\"\n ROLLERSKATE: Image\n \"\"\"Image de patin \u00e0 roulette.\"\"\"\n DUCK: Image\n \"\"\"Image de canard.\"\"\"\n HOUSE: Image\n \"\"\"Image d'une maison.\"\"\"\n TORTOISE: Image\n \"\"\"Image d'une tortue.\"\"\"\n BUTTERFLY: Image\n \"\"\"Image d'un papillon.\"\"\"\n STICKFIGURE: Image\n \"\"\"Image d'un personnage.\"\"\"\n GHOST: Image\n \"\"\"Image de fant\u00f4me.\"\"\"\n SWORD: Image\n \"\"\"Image d'une \u00e9p\u00e9e.\"\"\"\n GIRAFFE: Image\n \"\"\"Image d'une girafe.\"\"\"\n SKULL: Image\n \"\"\"Image d'un cr\u00e2ne.\"\"\"\n UMBRELLA: Image\n \"\"\"Image d'un parapluie.\"\"\"\n SNAKE: Image\n \"\"\"Image de serpent.\"\"\"\n SCISSORS: Image\n \"\"\"Image de ciseaux. (ciseaux)\"\"\"\n ALL_CLOCKS: List[Image]\n \"\"\"Une liste contenant toutes les images CLOCK_ en s\u00e9quence.\"\"\"\n ALL_ARROWS: List[Image]\n \"\"\"Une liste contenant toutes les images ARROW_ en s\u00e9quence.\"\"\"\n\n @overload\n def __init__(self, string: str) -> None:\n \"\"\"Cr\u00e9er une image \u00e0 partir d'une cha\u00eene de caract\u00e8res d\u00e9crivant quelles LED sont allum\u00e9es.\n\n``string`` has to consist of digits 0-9 arranged into lines,\ndescribing the image, for example::\n\n image = Image(\"90009:\"\n \"09090:\"\n \"00900:\"\n \"09090:\"\n \"90009\")\n\nwill create a 5\u00d75 image of an X. The end of a line is indicated by a\ncolon. It's also possible to use newlines (\\\\n) insead of the colons.\n\n:param string: La cha\u00eene de caract\u00e8res d\u00e9crivant l'image.\"\"\"\n ...\n\n @overload\n def __init__(self, width: int=5, height: int=5, buffer: ReadableBuffer=None) -> None:\n \"\"\"Cr\u00e9er une image vide avec ``width`` colonnes et ``height`` lignes.\n\n:param width: Largeur optionnelle de l'image\n:param height: Hauteur optionnelle de l'image\n:param buffer: Tableau optionnel ou octets de ``width``\u00d7``height`` entiers dans la plage 0-9 pour initialiser l'image\n\nExamples::\n\n Image(2, 2, b'\\x08\\x08\\x08\\x08')\n Image(2, 2, bytearray([9,9,9,9]))\n\nThese create 2 x 2 pixel images at full brightness.\"\"\"\n ...\n\n def width(self) -> int:\n \"\"\"R\u00e9cup\u00e8re le nombre de colonnes.\n\n:return: The number of columns in the image\"\"\"\n ...\n\n def height(self) -> int:\n \"\"\"R\u00e9cup\u00e8re le nombre de lignes.\n\n:return: The number of rows in the image\"\"\"\n ...\n\n def set_pixel(self, x: int, y: int, value: int) -> None:\n \"\"\"D\u00e9finit la luminosit\u00e9 d'un pixel.\n\nExample: ``my_image.set_pixel(0, 0, 9)``\n\n:param x: Le num\u00e9ro de colonne\n:param y: Le num\u00e9ro de ligne\n:param value: La luminosit\u00e9 sous la forme d'un entier compris entre 0 (sombre) et 9 (lumineux)\n\nThis method will raise an exception when called on any of the built-in\nread-only images, like ``Image.HEART``.\"\"\"\n ...\n\n def get_pixel(self, x: int, y: int) -> int:\n \"\"\"R\u00e9cup\u00e8re la luminosit\u00e9 d'un pixel.\n\nExample: ``my_image.get_pixel(0, 0)``\n\n:param x: Le num\u00e9ro de colonne\n:param y: Le num\u00e9ro de ligne\n:return: The brightness as an integer between 0 and 9.\"\"\"\n ...\n\n def shift_left(self, n: int) -> Image:\n \"\"\"Cr\u00e9er une nouvelle image en d\u00e9pla\u00e7ant l'image \u00e0 gauche.\n\nExample: ``Image.HEART_SMALL.shift_left(1)``\n\n:param n: Le nombre de colonnes par lequel d\u00e9placer\n:return: The shifted image\"\"\"\n ...\n\n def shift_right(self, n: int) -> Image:\n \"\"\"Cr\u00e9er une nouvelle image en d\u00e9pla\u00e7ant l'image \u00e0 droite.\n\nExample: ``Image.HEART_SMALL.shift_right(1)``\n\n:param n: Le nombre de colonnes par lequel d\u00e9placer\n:return: The shifted image\"\"\"\n ...\n\n def shift_up(self, n: int) -> Image:\n \"\"\"Cr\u00e9er une nouvelle image en d\u00e9pla\u00e7ant l'image vers le haut.\n\nExample: ``Image.HEART_SMALL.shift_up(1)``\n\n:param n: Le nombre de lignes par lequel d\u00e9placer\n:return: The shifted image\"\"\"\n ...\n\n def shift_down(self, n: int) -> Image:\n \"\"\"Cr\u00e9er une nouvelle image en d\u00e9pla\u00e7ant l'image vers le bas.\n\nExample: ``Image.HEART_SMALL.shift_down(1)``\n\n:param n: Le nombre de lignes par lequel d\u00e9placer\n:return: The shifted image\"\"\"\n ...\n\n def crop(self, x: int, y: int, w: int, h: int) -> Image:\n \"\"\"Cr\u00e9er une nouvelle image en recadrant l'image.\n\nExample: ``Image.HEART.crop(1, 1, 3, 3)``\n\n:param x: Le nombre de colonnes duquel d\u00e9caler le recadrage\n:param y: Le nombre de lignes duquel d\u00e9caler le recadrage\n:param w: La largeur du recadrage\n:param h: La hauteur du recadrage\n:return: The new image\"\"\"\n ...\n\n def copy(self) -> Image:\n \"\"\"Cr\u00e9er une copie exacte de l'image.\n\nExample: ``Image.HEART.copy()``\n\n:return: The new image\"\"\"\n ...\n\n def invert(self) -> Image:\n \"\"\"Cr\u00e9er une nouvelle image en inversant la luminosit\u00e9 des pixels de l'image source.\n\nExample: ``Image.SMALL_HEART.invert()``\n\n:return: The new image.\"\"\"\n ...\n\n def fill(self, value: int) -> None:\n \"\"\"D\u00e9finit la luminosit\u00e9 de tous les pixels de l'image.\n\nExample: ``my_image.fill(5)``\n\n:param value: La nouvelle luminosit\u00e9 sous la forme d'un nombre compris entre 0 (sombre) et 9 (lumineux).\n\nThis method will raise an exception when called on any of the built-in\nread-only images, like ``Image.HEART``.\"\"\"\n ...\n\n def blit(self, src: Image, x: int, y: int, w: int, h: int, xdest: int=0, ydest: int=0) -> None:\n \"\"\"Copier la zone d'une autre image vers cette image.\n\nExample: ``my_image.blit(Image.HEART, 1, 1, 3, 3, 1, 1)``\n\n:param src: L'image source\n:param x: Le d\u00e9calage de la colonne de d\u00e9part dans l'image source\n:param y: D\u00e9calage de la ligne de d\u00e9part dans l'image source\n:param w: Le nombre de colonnes \u00e0 copier\n:param h: Le nombre de lignes \u00e0 copier\n:param xdest: Le d\u00e9calage de la colonne \u00e0 modifier dans cette image\n:param ydest: Le d\u00e9calage de la ligne \u00e0 modifier dans cette image\n\nPixels outside the source image are treated as having a brightness of 0.\n\n``shift_left()``, ``shift_right()``, ``shift_up()``, ``shift_down()``\nand ``crop()`` can are all implemented by using ``blit()``.\n\nFor example, img.crop(x, y, w, h) can be implemented as::\n\n def crop(self, x, y, w, h):\n res = Image(w, h)\n res.blit(self, x, y, w, h)\n return res\"\"\"\n ...\n\n def __repr__(self) -> str:\n \"\"\"R\u00e9cup\u00e8re une repr\u00e9sentation de l'image sous forme de texte compact.\"\"\"\n ...\n\n def __str__(self) -> str:\n \"\"\"R\u00e9cup\u00e8re une cha\u00eene de caract\u00e8res lisible de l'image.\"\"\"\n ...\n\n def __add__(self, other: Image) -> Image:\n \"\"\"Cr\u00e9e une nouvelle image en additionnant les valeurs de luminosit\u00e9 des deux images\npour chaque pixel.\n\nExample: ``Image.HEART + Image.HAPPY``\n\n:param other: L'image \u00e0 ajouter.\"\"\"\n ...\n\n def __sub__(self, other: Image) -> Image:\n \"\"\"Cr\u00e9e une nouvelle image en soustrayant de cette image les valeurs de luminosit\u00e9 de\nl'autre image.\n\nExample: ``Image.HEART - Image.HEART_SMALL``\n\n:param other: L'image \u00e0 soustraire.\"\"\"\n ...\n\n def __mul__(self, n: float) -> Image:\n \"\"\"Cr\u00e9e une nouvelle image en multipliant la luminosit\u00e9 de chaque pixel par\n``n``.\n\nExample: ``Image.HEART * 0.5``\n\n:param n: La valeur par laquelle multiplier.\"\"\"\n ...\n\n def __truediv__(self, n: float) -> Image:\n \"\"\"Cr\u00e9e une nouvelle image en divisant la luminosit\u00e9 de chaque pixel par\n``n``.\n\nExample: ``Image.HEART / 2``\n\n:param n: La valeur par laquelle diviser.\"\"\"\n ...\n\nclass SoundEvent:\n LOUD: SoundEvent\n \"\"\"Repr\u00e9sente la transition d'\u00e9v\u00e9nements sonores, de ``quiet`` \u00e0 ``loud`` comme un clap dans les mains ou un cri.\"\"\"\n QUIET: SoundEvent\n \"\"\"Repr\u00e9sente la transition d'\u00e9v\u00e9nements sonores de ``loud`` \u00e0 ``quiet`` comme parler ou \u00e9couter de la musique de fond.\"\"\"\n\nclass Sound:\n \"\"\"Les sons int\u00e9gr\u00e9s peuvent \u00eatre appel\u00e9s en utilisant ``audio.play(Sound.NAME)``.\"\"\"\n GIGGLE: Sound\n \"\"\"Bruit de gloussement.\"\"\"\n HAPPY: Sound\n \"\"\"Son joyeux.\"\"\"\n HELLO: Sound\n \"\"\"Son de salutation.\"\"\"\n MYSTERIOUS: Sound\n \"\"\"Son myst\u00e9rieux.\"\"\"\n SAD: Sound\n \"\"\"Son triste.\"\"\"\n SLIDE: Sound\n \"\"\"Bruit de glissade.\"\"\"\n SOARING: Sound\n \"\"\"Bruit d'envol\u00e9e.\"\"\"\n SPRING: Sound\n \"\"\"Son d'un ressort.\"\"\"\n TWINKLE: Sound\n \"\"\"Son de scintillement.\"\"\"\n YAWN: Sound\n \"\"\"Son de b\u00e2illement.\"\"\"", + "/typeshed/stdlib/microbit/accelerometer.pyi": "\"\"\"Mesurer l'acc\u00e9l\u00e9ration du micro:bit et reconnaitre des mouvements.\"\"\"\nfrom typing import Tuple\n\ndef get_x() -> int:\n \"\"\"R\u00e9cup\u00e9rer la mesure de l'acc\u00e9l\u00e9ration dans l'axe ``x`` en milli-g.\n\nExample: ``accelerometer.get_x()``\n\n:return: A positive or negative integer depending on direction in the range +/- 2000mg.\"\"\"\n ...\n\ndef get_y() -> int:\n \"\"\"R\u00e9cup\u00e9rer la mesure de l'acc\u00e9l\u00e9ration dans l'axe ``y`` en milli-g.\n\nExample: ``accelerometer.get_y()``\n\n:return: A positive or negative integer depending on direction in the range +/- 2000mg.\"\"\"\n ...\n\ndef get_z() -> int:\n \"\"\"R\u00e9cup\u00e9rer la mesure de l'acc\u00e9l\u00e9ration dans l'axe ``z`` en milli-g.\n\nExample: ``accelerometer.get_z()``\n\n:return: A positive or negative integer depending on direction in the range +/- 2000mg.\"\"\"\n ...\n\ndef get_values() -> Tuple[int, int, int]:\n \"\"\"R\u00e9cup\u00e9rer en une fois les mesures d'acc\u00e9l\u00e9ration dans tous les axes sous forme d'un tuple.\n\nExample: ``x, y, z = accelerometer.get_values()``\n\n:return: a three-element tuple of integers ordered as X, Y, Z, each value a positive or negative integer depending on direction in the range +/- 2000mg\"\"\"\n ...\n\ndef get_strength() -> int:\n \"\"\"Obtenir la mesure de l'acc\u00e9l\u00e9ration de tous les axes combin\u00e9s, sous la forme d'un nombre entier positif. C'est la somme pythagoricienne des axes X, Y et Z. (obtenir la force)\n\nExample: ``accelerometer.get_strength()``\n\n:return: The combined acceleration strength of all the axes, in milli-g.\"\"\"\n ...\n\ndef current_gesture() -> str:\n \"\"\"R\u00e9cup\u00e9rer le nom du geste actuel.\n\nExample: ``accelerometer.current_gesture()``\n\nMicroPython understands the following gesture names: ``\"up\"``, ``\"down\"``,\n``\"left\"``, ``\"right\"``, ``\"face up\"``, ``\"face down\"``, ``\"freefall\"``,\n``\"3g\"``, ``\"6g\"``, ``\"8g\"``, ``\"shake\"``. Gestures are always\nrepresented as strings.\n\n:return: The current gesture\"\"\"\n ...\n\ndef is_gesture(name: str) -> bool:\n \"\"\"V\u00e9rifier si le geste nomm\u00e9 est actif en ce moment.\n\nExample: ``accelerometer.is_gesture('shake')``\n\nMicroPython understands the following gesture names: ``\"up\"``, ``\"down\"``,\n``\"left\"``, ``\"right\"``, ``\"face up\"``, ``\"face down\"``, ``\"freefall\"``,\n``\"3g\"``, ``\"6g\"``, ``\"8g\"``, ``\"shake\"``. Gestures are always\nrepresented as strings.\n\n:param name: Le nom du geste.\n:return: ``True`` if the gesture is active, ``False`` otherwise.\"\"\"\n ...\n\ndef was_gesture(name: str) -> bool:\n \"\"\"V\u00e9rifier si le geste nomm\u00e9 a \u00e9t\u00e9 actif depuis le dernier appel.\n\nExample: ``accelerometer.was_gesture('shake')``\n\nMicroPython understands the following gesture names: ``\"up\"``, ``\"down\"``,\n``\"left\"``, ``\"right\"``, ``\"face up\"``, ``\"face down\"``, ``\"freefall\"``,\n``\"3g\"``, ``\"6g\"``, ``\"8g\"``, ``\"shake\"``. Gestures are always\nrepresented as strings.\n\n:param name: Le nom du geste.\n:return: ``True`` if the gesture was active since the last call, ``False`` otherwise.\"\"\"\n\ndef get_gestures() -> Tuple[str, ...]:\n \"\"\"Renvoyer un tuple de l'historique des gestes.\n\nExample: ``accelerometer.get_gestures()``\n\nClears the gesture history before returning.\n\nGestures are not updated in the background so there needs to be constant\ncalls to some accelerometer method to do the gesture detection. Usually\ngestures can be detected using a loop with a small :func:`microbit.sleep` delay.\n\n:return: The history as a tuple, most recent last.\"\"\"\n ...\n\ndef set_range(value: int) -> None:\n \"\"\"Set the accelerometer sensitivity range, in g (standard gravity), to the closest values supported by the hardware, so it rounds to either ``2``, ``4``, or ``8`` g.\n\nExample: ``accelerometer.set_range(8)``\n\n:param value: New range for the accelerometer, an integer in ``g``.\"\"\"", "/typeshed/stdlib/microbit/audio.pyi": "\"\"\"Jouer des sons en utilisant le micro:bit (importer ``audio`` pour compatibilit\u00e9 V1).\"\"\"\nfrom ..microbit import MicroBitDigitalPin, Sound, pin0\nfrom typing import ClassVar, Iterable, Union\n\ndef play(source: Union[Iterable[AudioFrame], Sound, SoundEffect], wait: bool=True, pin: MicroBitDigitalPin=pin0, return_pin: Union[MicroBitDigitalPin, None]=None) -> None:\n \"\"\"Play a built-in sound, sound effect or custom audio frames.\n\nExample: ``audio.play(Sound.GIGGLE)``\n\n:param source: A built-in ``Sound`` such as ``Sound.GIGGLE``, a ``SoundEffect`` or sample data as an iterable of ``AudioFrame`` objects.\n:param wait: Si ``wait`` est ``True``, cette fonction bloquera jusqu'\u00e0 ce que le son soit termin\u00e9.\n:param pin: (broche) Un argument optionnel pour sp\u00e9cifier la broche de sortie, peut \u00eatre utilis\u00e9 pour remplacer la valeur par d\u00e9faut ``pin0``. Si nous ne voulons pas que le son soit jou\u00e9, il est possible d'utiliser ``pin=None``.\n:param return_pin: Sp\u00e9cifie une broche de connecteur de bord diff\u00e9rentiel \u00e0 connecter \u00e0 un haut-parleur externe au lieu de la masse. Ceci est ignor\u00e9 dans la r\u00e9vision **V2**.\"\"\"\n\ndef is_playing() -> bool:\n \"\"\"V\u00e9rifier si un son est en train d'\u00eatre jou\u00e9.\n\nExample: ``audio.is_playing()``\n\n:return: ``True`` if audio is playing, otherwise ``False``.\"\"\"\n ...\n\ndef stop() -> None:\n \"\"\"Arr\u00eater toute lecture audio.\n\nExample: ``audio.stop()``\"\"\"\n ...\n\nclass SoundEffect:\n \"\"\"A sound effect, composed by a set of parameters configured via the constructor or attributes.\"\"\"\n WAVEFORM_SINE: ClassVar[int]\n \"\"\"Sine wave option used for the ``waveform`` parameter.\"\"\"\n WAVEFORM_SAWTOOTH: ClassVar[int]\n \"\"\"Sawtooth wave option used for the ``waveform`` parameter.\"\"\"\n WAVEFORM_TRIANGLE: ClassVar[int]\n \"\"\"Triangle wave option used for the ``waveform`` parameter.\"\"\"\n WAVEFORM_SQUARE: ClassVar[int]\n \"\"\"Square wave option used for the ``waveform`` parameter.\"\"\"\n WAVEFORM_NOISE: ClassVar[int]\n \"\"\"Noise option used for the ``waveform`` parameter.\"\"\"\n SHAPE_LINEAR: ClassVar[int]\n \"\"\"Linear interpolation option used for the ``shape`` parameter.\"\"\"\n SHAPE_CURVE: ClassVar[int]\n \"\"\"Curve interpolation option used for the ``shape`` parameter.\"\"\"\n SHAPE_LOG: ClassVar[int]\n \"\"\"Logarithmic interpolation option used for the ``shape`` parameter.\"\"\"\n FX_NONE: ClassVar[int]\n \"\"\"No effect option used for the ``fx`` parameter.\"\"\"\n FX_TREMOLO: ClassVar[int]\n \"\"\"Tremelo effect option used for the ``fx`` parameter.\"\"\"\n FX_VIBRATO: ClassVar[int]\n \"\"\"Vibrato effect option used for the ``fx`` parameter.\"\"\"\n FX_WARBLE: ClassVar[int]\n \"\"\"Warble effect option used for the ``fx`` parameter.\"\"\"\n freq_start: int\n \"\"\"Start frequency in Hertz (Hz), a number between ``0`` and ``9999``\"\"\"\n freq_end: int\n \"\"\"End frequency in Hertz (Hz), a number between ``0`` and ``9999``\"\"\"\n duration: int\n \"\"\"Duration of the sound in milliseconds, a number between ``0`` and ``9999``\"\"\"\n vol_start: int\n \"\"\"Start volume value, a number between ``0`` and ``255``\"\"\"\n vol_end: int\n \"\"\"End volume value, a number between ``0`` and ``255``\"\"\"\n waveform: int\n \"\"\"Type of waveform shape, one of these values: ``WAVEFORM_SINE``, ``WAVEFORM_SAWTOOTH``, ``WAVEFORM_TRIANGLE``, ``WAVEFORM_SQUARE``, ``WAVEFORM_NOISE`` (randomly generated noise)\"\"\"\n fx: int\n \"\"\"Effect to add on the sound, one of the following values: ``FX_TREMOLO``, ``FX_VIBRATO``, ``FX_WARBLE``, or ``FX_NONE``\"\"\"\n shape: int\n \"\"\"The type of the interpolation curve between the start and end frequencies, different wave shapes have different rates of change in frequency. One of the following values: ``SHAPE_LINEAR``, ``SHAPE_CURVE``, ``SHAPE_LOG``\"\"\"\n\n def __init__(self, freq_start: int=500, freq_end: int=2500, duration: int=500, vol_start: int=255, vol_end: int=0, waveform: int=WAVEFORM_SQUARE, fx: int=FX_NONE, shape: int=SHAPE_LOG):\n \"\"\"Create a new sound effect.\n\nExample: ``my_effect = SoundEffect(duration=1000)``\n\nAll the parameters are optional, with default values as shown above, and\nthey can all be modified via attributes of the same name. For example, we\ncan first create an effect ``my_effect = SoundEffect(duration=1000)``,\nand then change its attributes ``my_effect.duration = 500``.\n\n:param freq_start: Start frequency in Hertz (Hz), a number between ``0`` and ``9999``.\n:param freq_end: End frequency in Hertz (Hz), a number between ``0`` and ``9999``.\n:param duration: Duration of the sound in milliseconds, a number between ``0`` and ``9999``.\n:param vol_start: Start volume value, a number between ``0`` and ``255``.\n:param vol_end: End volume value, a number between ``0`` and ``255``.\n:param waveform: Type of waveform shape, one of these values: ``WAVEFORM_SINE``, ``WAVEFORM_SAWTOOTH``, ``WAVEFORM_TRIANGLE``, ``WAVEFORM_SQUARE``, ``WAVEFORM_NOISE`` (randomly generated noise).\n:param fx: Effect to add on the sound, one of the following values: ``FX_TREMOLO``, ``FX_VIBRATO``, ``FX_WARBLE``, or ``FX_NONE``.\n:param shape: The type of the interpolation curve between the start and end frequencies, different wave shapes have different rates of change in frequency. One of the following values: ``SHAPE_LINEAR``, ``SHAPE_CURVE``, ``SHAPE_LOG``.\"\"\"\n\n def copy(self) -> SoundEffect:\n \"\"\"Create a copy of this ``SoundEffect``.\n\nExample: ``sound_2 = sound_1.copy()``\n\n:return: A copy of the SoundEffect.\"\"\"\n\nclass AudioFrame:\n \"\"\"Un objet ``AudioFrame`` est une liste de 32 \u00e9chantillons, chacun d'eux \u00e9tant un octet non sign\u00e9\n(nombre entier entre 0 et 255).\n\nIt takes just over 4 ms to play a single frame.\n\nExample::\n\n frame = AudioFrame()\n for i in range(len(frame)):\n frame[i] = 252 - i * 8\"\"\"\n\n def copyfrom(self, other: AudioFrame) -> None:\n \"\"\"Overwrite the data in this ``AudioFrame`` with the data from another ``AudioFrame`` instance.\n\nExample: ``my_frame.copyfrom(source_frame)``\n\n:param other: ``AudioFrame`` instance from which to copy the data.\"\"\"\n\n def __len__(self) -> int:\n ...\n\n def __setitem__(self, key: int, value: int) -> None:\n ...\n\n def __getitem__(self, key: int) -> int:\n ...", "/typeshed/stdlib/microbit/compass.pyi": "\"\"\"Utiliser la boussole int\u00e9gr\u00e9e.\"\"\"\n\ndef calibrate() -> None:\n \"\"\"D\u00e9marrer le processus d'\u00e9talonnage.\n\nExample: ``compass.calibrate()``\n\nAn instructive message will be scrolled to the user after which they will need\nto rotate the device in order to draw a circle on the LED display.\"\"\"\n ...\n\ndef is_calibrated() -> bool:\n \"\"\"V\u00e9rifier si la boussole est \u00e9talonn\u00e9e.\n\nExample: ``compass.is_calibrated()``\n\n:return: ``True`` if the compass has been successfully calibrated, ``False`` otherwise.\"\"\"\n ...\n\ndef clear_calibration() -> None:\n \"\"\"Annule l'\u00e9talonnage, la boussole est ainsi \u00e0 nouveau non-\u00e9talonn\u00e9e.\n\nExample: ``compass.clear_calibration()``\"\"\"\n ...\n\ndef get_x() -> int:\n \"\"\"Obtenir la force du champ magn\u00e9tique sur l'axe ``x``.\n\nExample: ``compass.get_x()``\n\nCall ``calibrate`` first or the results will be inaccurate.\n\n:return: A positive or negative integer in nano tesla representing the magnitude and direction of the field.\"\"\"\n ...\n\ndef get_y() -> int:\n \"\"\"Obtenir la force du champ magn\u00e9tique sur l'axe ``y``.\n\nExample: ``compass.get_y()``\n\nCall ``calibrate`` first or the results will be inaccurate.\n\n:return: A positive or negative integer in nano tesla representing the magnitude and direction of the field.\"\"\"\n ...\n\ndef get_z() -> int:\n \"\"\"Obtenir la force du champ magn\u00e9tique sur l'axe ``z``.\n\nExample: ``compass.get_z()``\n\nCall ``calibrate`` first or the results will be inaccurate.\n\n:return: A positive or negative integer in nano tesla representing the magnitude and direction of the field.\"\"\"\n ...\n\ndef heading() -> int:\n \"\"\"Obtenir le cap de la boussole.\n\nExample: ``compass.heading()``\n\n:return: An integer in the range from 0 to 360, representing the angle in degrees, clockwise, with north as 0.\"\"\"\n ...\n\ndef get_field_strength() -> int:\n \"\"\"R\u00e9cup\u00e8re la magnitude du champ magn\u00e9tique autour de l'appareil.\n\nExample: ``compass.get_field_strength()``\n\n:return: An integer indication of the magnitude of the magnetic field in nano tesla.\"\"\"\n ...", "/typeshed/stdlib/microbit/display.pyi": "\"\"\"Afficher du texte, des images et des animations sur l'\u00e9cran LED 5\u00d75.\"\"\"\nfrom ..microbit import Image\nfrom typing import Union, overload, Iterable\n\ndef get_pixel(x: int, y: int) -> int:\n \"\"\"R\u00e9cup\u00e8re la luminosit\u00e9 de la LED \u00e0 la colonne ``x`` et \u00e0 la ligne ``y``.\n\nExample: ``display.get_pixel(0, 0)``\n\n:param x: La colonne d'affichage (0..4)\n:param y: La ligne d'affichage (0..4)\n:return: A number between 0 (off) and 9 (bright)\"\"\"\n ...\n\ndef set_pixel(x: int, y: int, value: int) -> None:\n \"\"\"D\u00e9finit la luminosit\u00e9 de la LED \u00e0 la colonne ``x`` et \u00e0 la ligne ``y``.\n\nExample: ``display.set_pixel(0, 0, 9)``\n\n:param x: La colonne d'affichage (0..4)\n:param y: La ligne d'affichage (0..4)\n:param value: La luminosit\u00e9 entre 0 (\u00e9teint) et 9 (lumineux)\"\"\"\n ...\n\ndef clear() -> None:\n \"\"\"R\u00e9gler la luminosit\u00e9 de toutes les LED \u00e0 0 (\u00e9teintes).\n\nExample: ``display.clear()``\"\"\"\n ...\n\ndef show(image: Union[str, float, int, Image, Iterable[Image]], delay: int=400, wait: bool=True, loop: bool=False, clear: bool=False) -> None:\n \"\"\"Afficher des images, des lettres ou des chiffres sur l'affichage LED.\n\nExample: ``display.show(Image.HEART)``\n\nWhen ``image`` is an image or a list of images then each image is displayed in turn.\nIf ``image`` is a string or number, each letter or digit is displayed in turn.\n\n:param image: Une cha\u00eene de caract\u00e8res, un nombre, une image ou une liste d'images \u00e0 afficher.\n:param delay: Chaque lettre, chiffre ou image est s\u00e9par\u00e9 par un d\u00e9lai de ``delay`` millisecondes.\n:param wait: Si ``wait`` est ``True`` cette fonction bloquera jusqu'\u00e0 la fin de l'animation, sinon l'animation s'effectuera en arri\u00e8re-plan.\n:param loop: Si ``loop`` est ``True``, l'animation se r\u00e9p\u00e9tera ind\u00e9finiment.\n:param clear: Si ``clear`` est ``True``, l'affichage sera effac\u00e9 une fois la s\u00e9quence termin\u00e9e.\n\nThe ``wait``, ``loop`` and ``clear`` arguments must be specified using their keyword.\"\"\"\n ...\n\ndef scroll(text: Union[str, float, int], delay: int=150, wait: bool=True, loop: bool=False, monospace: bool=False) -> None:\n \"\"\"Faire d\u00e9filer un nombre ou un texte sur l'affichage LED.\n\nExample: ``display.scroll('micro:bit')``\n\n:param text: La cha\u00eene de caract\u00e8res \u00e0 faire d\u00e9filer. Si ``text`` est un entier ou un nombre d\u00e9cimal, il sera converti en une cha\u00eene avec ``str()``.\n:param delay: Le param\u00e8tre ``delay`` contr\u00f4le la vitesse de d\u00e9filement du texte.\n:param wait: Si ``wait`` est ``True`` cette fonction bloquera jusqu'\u00e0 la fin de l'animation, sinon l'animation s'effectuera en arri\u00e8re-plan.\n:param loop: Si ``loop`` est ``True``, l'animation se r\u00e9p\u00e9tera ind\u00e9finiment.\n:param monospace: Si ``monospace`` est ``True``, tous les caract\u00e8res utiliseront 5 pixels en largeur, sinon, exactement 1 colonne de pixel vide sera ins\u00e9r\u00e9e entre chaque caract\u00e8re lors du d\u00e9filement.\n\nThe ``wait``, ``loop`` and ``monospace`` arguments must be specified\nusing their keyword.\"\"\"\n ...\n\ndef on() -> None:\n \"\"\"Allumer l'\u00e9cran LED.\n\nExample: ``display.on()``\"\"\"\n ...\n\ndef off() -> None:\n \"\"\"Eteindre l'\u00e9cran LED (d\u00e9sactiver l'affichage vous permet de r\u00e9utiliser les broches GPIO \u00e0 d'autres fins).\n\nExample: ``display.off()``\"\"\"\n ...\n\ndef is_on() -> bool:\n \"\"\"V\u00e9rifier si l'affichage LED est activ\u00e9.\n\nExample: ``display.is_on()``\n\n:return: ``True`` if the display is on, otherwise returns ``False``.\"\"\"\n ...\n\ndef read_light_level() -> int:\n \"\"\"Lit le niveau de lumi\u00e8re.\n\nExample: ``display.read_light_level()``\n\nUses the display's LEDs in reverse-bias mode to sense the amount of light\nfalling on the display.\n\n:return: An integer between 0 and 255 representing the light level, with larger meaning more light.\"\"\"\n ...", @@ -46,6 +45,7 @@ "/typeshed/stdlib/microbit/speaker.pyi": "\"\"\"Contr\u00f4ler le haut-parleur int\u00e9gr\u00e9 (V2 uniquement).\"\"\"\n\ndef off() -> None:\n \"\"\"\u00c9teindre le haut-parleur.\n\nExample: ``speaker.off()``\n\nThis does not disable sound output to an edge connector pin.\"\"\"\n ...\n\ndef on() -> None:\n \"\"\"Activer le haut-parleur.\n\nExample: ``speaker.on()``\"\"\"\n ...", "/typeshed/stdlib/microbit/spi.pyi": "\"\"\"Communiquer avec les p\u00e9riph\u00e9riques \u00e0 l'aide du bus SPI (Serial Peripheral Interface).\"\"\"\nfrom _typeshed import ReadableBuffer, WriteableBuffer\nfrom ..microbit import pin13, pin14, pin15, MicroBitDigitalPin\n\ndef init(baudrate: int=1000000, bits: int=8, mode: int=0, sclk: MicroBitDigitalPin=pin13, mosi: MicroBitDigitalPin=pin15, miso: MicroBitDigitalPin=pin14) -> None:\n \"\"\"Initialiser la communication SPI.\n\nExample: ``spi.init()``\n\nFor correct communication, the parameters have to be the same on both communicating devices.\n\n:param baudrate: La vitesse de communication.\n:param bits: La largeur en bits de chaque transfert. Actuellement, seul ``bits=8`` est pris en charge. Cependant, cela peut \u00e9voluer \u00e0 l'avenir.\n:param mode: D\u00e9termine la combinaison de la polarit\u00e9 et de la phase de l'horloge. - `voir le tableau en ligne `_.\n:param sclk: Broche sclk (13 par d\u00e9faut)\n:param mosi: Broche mosi (15 par d\u00e9faut)\n:param miso: Broche miso (14 par d\u00e9faut)\"\"\"\n ...\n\ndef read(nbytes: int) -> bytes:\n \"\"\"Lire des octets.\n\nExample: ``spi.read(64)``\n\n:param nbytes: Nombre maximal d'octets \u00e0 lire.\n:return: The bytes read.\"\"\"\n ...\n\ndef write(buffer: ReadableBuffer) -> None:\n \"\"\"\u00c9crire des octets sur le bus.\n\nExample: ``spi.write(bytes([1, 2, 3]))``\n\n:param buffer: Un buffer \u00e0 partir duquel lire les donn\u00e9es.\"\"\"\n ...\n\ndef write_readinto(out: WriteableBuffer, in_: ReadableBuffer) -> None:\n \"\"\"Ecrire le buffer ``out`` sur le bus et lire toute r\u00e9ponse dans le buffer ``in_``.\n\nExample: ``spi.write_readinto(out_buffer, in_buffer)``\n\nThe length of the buffers should be the same. The buffers can be the same object.\n\n:param out: Le buffer vers lequel \u00e9crire une r\u00e9ponse.\n:param in_: Le buffer depuis lequel lire les donn\u00e9es.\"\"\"\n ...", "/typeshed/stdlib/microbit/uart.pyi": "\"\"\"Communiquer avec un p\u00e9riph\u00e9rique \u00e0 l'aide d'une interface s\u00e9rie.\"\"\"\nfrom _typeshed import WriteableBuffer\nfrom ..microbit import MicroBitDigitalPin\nfrom typing import Optional, Union\nODD: int\n\"\"\"Parit\u00e9 impaire\"\"\"\nEVEN: int\n\"\"\"Parit\u00e9 paire\"\"\"\n\ndef init(baudrate: int=9600, bits: int=8, parity: Optional[int]=None, stop: int=1, tx: Optional[MicroBitDigitalPin]=None, rx: Optional[MicroBitDigitalPin]=None) -> None:\n \"\"\"Initialiser la communication s\u00e9rie.\n\nExample: ``uart.init(115200, tx=pin0, rx=pin1)``\n\n:param baudrate: La vitesse de communication.\n:param bits: La taille des octets transmis. micro:bit ne prend en charge que 8.\n:param parity: Comment la parit\u00e9 est v\u00e9rifi\u00e9e, ``None``, ``uart.ODD`` ou ``uart.EVEN``.\n:param stop: Le nombre de bits d'arr\u00eat, doit \u00eatre 1 pour micro:bit.\n:param tx: Broche de transmission.\n:param rx: Broche de r\u00e9ception.\n\nInitializing the UART on external pins will cause the Python console on\nUSB to become unaccessible, as it uses the same hardware. To bring the\nconsole back you must reinitialize the UART without passing anything for\n``tx`` or ``rx`` (or passing ``None`` to these arguments). This means\nthat calling ``uart.init(115200)`` is enough to restore the Python console.\n\nFor more details see `the online documentation `_.\"\"\"\n ...\n\ndef any() -> bool:\n \"\"\"V\u00e9rifier s'il y a des donn\u00e9es en attente.\n\nExample: ``uart.any()``\n\n:return: ``True`` if any data is waiting, else ``False``.\"\"\"\n ...\n\ndef read(nbytes: Optional[int]=None) -> Optional[bytes]:\n \"\"\"Lire des octets.\n\nExample: ``uart.read()``\n\n:param nbytes: Si ``nbytes`` est sp\u00e9cifi\u00e9, alors lire au maximum cette quantit\u00e9 d'octets, sinon lire autant d'octets que possible\n:return: A bytes object or ``None`` on timeout\"\"\"\n ...\n\ndef readinto(buf: WriteableBuffer, nbytes: Optional[int]=None) -> Optional[int]:\n \"\"\"Lire les octets dans le ``buf``.\n\nExample: ``uart.readinto(input_buffer)``\n\n:param buf: Le buffer dans lequel \u00e9crire.\n:param nbytes: Si ``nbytes`` est sp\u00e9cifi\u00e9, alors lire au maximum cette quantit\u00e9 d'octets, sinon lire ``len(buf)`` octets.\n:return: number of bytes read and stored into ``buf`` or ``None`` on timeout.\"\"\"\n ...\n\ndef readline() -> Optional[bytes]:\n \"\"\"Lire une ligne termin\u00e9e par un caract\u00e8re de nouvelle ligne.\n\nExample: ``uart.readline()``\n\n:return: The line read or ``None`` on timeout. The newline character is included in the returned bytes.\"\"\"\n ...\n\ndef write(buf: Union[bytes, str]) -> Optional[int]:\n \"\"\"\u00c9crire un buffer sur un bus\n\nExample: ``uart.write('hello world')``\n\n:param buf: Un objet d'octets ou une cha\u00eene de caract\u00e8res.\n:return: The number of bytes written, or ``None`` on timeout.\n\nExamples::\n\n uart.write('hello world')\n uart.write(b'hello world')\n uart.write(bytes([1, 2, 3]))\"\"\"\n ...", + "/typeshed/stdlib/collections/__init__.pyi": "import sys\nfrom typing import (\n Any,\n Dict,\n Generic,\n ItemsView,\n Iterable,\n Iterator,\n KeysView,\n Optional,\n Reversible,\n Tuple,\n Type,\n TypeVar,\n Union,\n ValuesView,\n)\n\n_S = TypeVar(\"_S\")\n_T = TypeVar(\"_T\")\n_KT = TypeVar(\"_KT\")\n_VT = TypeVar(\"_VT\")\n\nif sys.version_info >= (3, 7):\n def namedtuple(\n typename: str,\n field_names: Union[str, Iterable[str]],\n *,\n rename: bool = ...,\n module: Optional[str] = ...,\n defaults: Optional[Iterable[Any]] = ...,\n ) -> Type[Tuple[Any, ...]]: ...\n\nelse:\n def namedtuple(\n typename: str,\n field_names: Union[str, Iterable[str]],\n *,\n verbose: bool = ...,\n rename: bool = ...,\n module: Optional[str] = ...,\n ) -> Type[Tuple[Any, ...]]: ...\n\nclass _OrderedDictKeysView(KeysView[_KT], Reversible[_KT]):\n def __reversed__(self) -> Iterator[_KT]: ...\n\nclass _OrderedDictItemsView(ItemsView[_KT, _VT], Reversible[Tuple[_KT, _VT]]):\n def __reversed__(self) -> Iterator[Tuple[_KT, _VT]]: ...\n\nclass _OrderedDictValuesView(ValuesView[_VT], Reversible[_VT]):\n def __reversed__(self) -> Iterator[_VT]: ...\n\nclass OrderedDict(Dict[_KT, _VT], Reversible[_KT], Generic[_KT, _VT]):\n def popitem(self, last: bool = ...) -> Tuple[_KT, _VT]: ...\n def move_to_end(self, key: _KT, last: bool = ...) -> None: ...\n def copy(self: _S) -> _S: ...\n def __reversed__(self) -> Iterator[_KT]: ...\n def keys(self) -> _OrderedDictKeysView[_KT]: ...\n def items(self) -> _OrderedDictItemsView[_KT, _VT]: ...\n def values(self) -> _OrderedDictValuesView[_VT]: ...\n", "/src/pyrightconfig.json": "{ \n \"pythonVersion\": \"3.6\",\n \"pythonPlatform\": \"Linux\",\n \"typeCheckingMode\": \"basic\",\n \"typeshedPath\": \"/typeshed/\",\n \"reportMissingModuleSource\": false,\n \"reportWildcardImportFromLibrary\": false,\n \"verboseOutput\": true\n }\n" } } \ No newline at end of file diff --git a/src/micropython/main/typeshed.ja.json b/src/micropython/main/typeshed.ja.json index 331e4f2c7..c7a08b291 100644 --- a/src/micropython/main/typeshed.ja.json +++ b/src/micropython/main/typeshed.ja.json @@ -35,7 +35,6 @@ "/typeshed/stdlib/usys.pyi": "from sys import *\n", "/typeshed/stdlib/utime.pyi": "from time import *\n", "/typeshed/stdlib/_typeshed/__init__.pyi": "# Utility types for typeshed\n#\n# See the README.md file in this directory for more information.\n\nimport array\nimport sys\nfrom os import PathLike\nfrom typing import AbstractSet, Any, Container, Iterable, Protocol, Tuple, TypeVar, Union\nfrom typing_extensions import Literal, final\n\n_KT = TypeVar(\"_KT\")\n_KT_co = TypeVar(\"_KT_co\", covariant=True)\n_KT_contra = TypeVar(\"_KT_contra\", contravariant=True)\n_VT = TypeVar(\"_VT\")\n_VT_co = TypeVar(\"_VT_co\", covariant=True)\n_T = TypeVar(\"_T\")\n_T_co = TypeVar(\"_T_co\", covariant=True)\n_T_contra = TypeVar(\"_T_contra\", contravariant=True)\n\n# Use for \"self\" annotations:\n# def __enter__(self: Self) -> Self: ...\nSelf = TypeVar(\"Self\") # noqa Y001\n\n# stable\nclass IdentityFunction(Protocol):\n def __call__(self, __x: _T) -> _T: ...\n\nclass SupportsLessThan(Protocol):\n def __lt__(self, __other: Any) -> bool: ...\n\nSupportsLessThanT = TypeVar(\"SupportsLessThanT\", bound=SupportsLessThan) # noqa: Y001\n\nclass SupportsDivMod(Protocol[_T_contra, _T_co]):\n def __divmod__(self, __other: _T_contra) -> _T_co: ...\n\nclass SupportsRDivMod(Protocol[_T_contra, _T_co]):\n def __rdivmod__(self, __other: _T_contra) -> _T_co: ...\n\nclass SupportsLenAndGetItem(Protocol[_T_co]):\n def __len__(self) -> int: ...\n def __getitem__(self, __k: int) -> _T_co: ...\n\n# Mapping-like protocols\n\n# stable\nclass SupportsItems(Protocol[_KT_co, _VT_co]):\n def items(self) -> AbstractSet[Tuple[_KT_co, _VT_co]]: ...\n\n# stable\nclass SupportsKeysAndGetItem(Protocol[_KT, _VT_co]):\n def keys(self) -> Iterable[_KT]: ...\n def __getitem__(self, __k: _KT) -> _VT_co: ...\n\n# stable\nclass SupportsGetItem(Container[_KT_contra], Protocol[_KT_contra, _VT_co]):\n def __getitem__(self, __k: _KT_contra) -> _VT_co: ...\n\n# stable\nclass SupportsItemAccess(SupportsGetItem[_KT_contra, _VT], Protocol[_KT_contra, _VT]):\n def __setitem__(self, __k: _KT_contra, __v: _VT) -> None: ...\n def __delitem__(self, __v: _KT_contra) -> None: ...\n\n# These aliases are simple strings in Python 2.\nStrPath = Union[str, PathLike[str]] # stable\nBytesPath = Union[bytes, PathLike[bytes]] # stable\nStrOrBytesPath = Union[str, bytes, PathLike[str], PathLike[bytes]] # stable\n\nOpenTextModeUpdating = Literal[\n \"r+\",\n \"+r\",\n \"rt+\",\n \"r+t\",\n \"+rt\",\n \"tr+\",\n \"t+r\",\n \"+tr\",\n \"w+\",\n \"+w\",\n \"wt+\",\n \"w+t\",\n \"+wt\",\n \"tw+\",\n \"t+w\",\n \"+tw\",\n \"a+\",\n \"+a\",\n \"at+\",\n \"a+t\",\n \"+at\",\n \"ta+\",\n \"t+a\",\n \"+ta\",\n \"x+\",\n \"+x\",\n \"xt+\",\n \"x+t\",\n \"+xt\",\n \"tx+\",\n \"t+x\",\n \"+tx\",\n]\nOpenTextModeWriting = Literal[\"w\", \"wt\", \"tw\", \"a\", \"at\", \"ta\", \"x\", \"xt\", \"tx\"]\nOpenTextModeReading = Literal[\"r\", \"rt\", \"tr\", \"U\", \"rU\", \"Ur\", \"rtU\", \"rUt\", \"Urt\", \"trU\", \"tUr\", \"Utr\"]\nOpenTextMode = Union[OpenTextModeUpdating, OpenTextModeWriting, OpenTextModeReading]\nOpenBinaryModeUpdating = Literal[\n \"rb+\",\n \"r+b\",\n \"+rb\",\n \"br+\",\n \"b+r\",\n \"+br\",\n \"wb+\",\n \"w+b\",\n \"+wb\",\n \"bw+\",\n \"b+w\",\n \"+bw\",\n \"ab+\",\n \"a+b\",\n \"+ab\",\n \"ba+\",\n \"b+a\",\n \"+ba\",\n \"xb+\",\n \"x+b\",\n \"+xb\",\n \"bx+\",\n \"b+x\",\n \"+bx\",\n]\nOpenBinaryModeWriting = Literal[\"wb\", \"bw\", \"ab\", \"ba\", \"xb\", \"bx\"]\nOpenBinaryModeReading = Literal[\"rb\", \"br\", \"rbU\", \"rUb\", \"Urb\", \"brU\", \"bUr\", \"Ubr\"]\nOpenBinaryMode = Union[OpenBinaryModeUpdating, OpenBinaryModeReading, OpenBinaryModeWriting]\n\n# stable\nclass HasFileno(Protocol):\n def fileno(self) -> int: ...\n\nFileDescriptor = int # stable\nFileDescriptorLike = Union[int, HasFileno] # stable\n\n# stable\nclass SupportsRead(Protocol[_T_co]):\n def read(self, __length: int = ...) -> _T_co: ...\n\n# stable\nclass SupportsReadline(Protocol[_T_co]):\n def readline(self, __length: int = ...) -> _T_co: ...\n\n# stable\nclass SupportsNoArgReadline(Protocol[_T_co]):\n def readline(self) -> _T_co: ...\n\n# stable\nclass SupportsWrite(Protocol[_T_contra]):\n def write(self, __s: _T_contra) -> Any: ...\n\nReadableBuffer = Union[bytes, bytearray, memoryview, array.array[Any]] # stable\nWriteableBuffer = Union[bytearray, memoryview, array.array[Any]] # stable\n\n# stable\nif sys.version_info >= (3, 10):\n from types import NoneType as NoneType\nelse:\n # Used by type checkers for checks involving None (does not exist at runtime)\n @final\n class NoneType:\n def __bool__(self) -> Literal[False]: ...\n", - "/typeshed/stdlib/collections/__init__.pyi": "import sys\nfrom typing import (\n Any,\n Dict,\n Generic,\n ItemsView,\n Iterable,\n Iterator,\n KeysView,\n Optional,\n Reversible,\n Tuple,\n Type,\n TypeVar,\n Union,\n ValuesView,\n)\n\n_S = TypeVar(\"_S\")\n_T = TypeVar(\"_T\")\n_KT = TypeVar(\"_KT\")\n_VT = TypeVar(\"_VT\")\n\nif sys.version_info >= (3, 7):\n def namedtuple(\n typename: str,\n field_names: Union[str, Iterable[str]],\n *,\n rename: bool = ...,\n module: Optional[str] = ...,\n defaults: Optional[Iterable[Any]] = ...,\n ) -> Type[Tuple[Any, ...]]: ...\n\nelse:\n def namedtuple(\n typename: str,\n field_names: Union[str, Iterable[str]],\n *,\n verbose: bool = ...,\n rename: bool = ...,\n module: Optional[str] = ...,\n ) -> Type[Tuple[Any, ...]]: ...\n\nclass _OrderedDictKeysView(KeysView[_KT], Reversible[_KT]):\n def __reversed__(self) -> Iterator[_KT]: ...\n\nclass _OrderedDictItemsView(ItemsView[_KT, _VT], Reversible[Tuple[_KT, _VT]]):\n def __reversed__(self) -> Iterator[Tuple[_KT, _VT]]: ...\n\nclass _OrderedDictValuesView(ValuesView[_VT], Reversible[_VT]):\n def __reversed__(self) -> Iterator[_VT]: ...\n\nclass OrderedDict(Dict[_KT, _VT], Reversible[_KT], Generic[_KT, _VT]):\n def popitem(self, last: bool = ...) -> Tuple[_KT, _VT]: ...\n def move_to_end(self, key: _KT, last: bool = ...) -> None: ...\n def copy(self: _S) -> _S: ...\n def __reversed__(self) -> Iterator[_KT]: ...\n def keys(self) -> _OrderedDictKeysView[_KT]: ...\n def items(self) -> _OrderedDictItemsView[_KT, _VT]: ...\n def values(self) -> _OrderedDictValuesView[_VT]: ...\n", "/typeshed/stdlib/microbit/__init__.pyi": "\"\"\"\u7aef\u5b50\u3001\u30a4\u30e1\u30fc\u30b8\u3001\u30b5\u30a6\u30f3\u30c9\u3001\u6e29\u5ea6\u3068\u97f3\u91cf\u3002\"\"\"\nfrom typing import Any, Callable, List, Optional, Tuple, Union, overload\nfrom _typeshed import ReadableBuffer\nfrom . import accelerometer as accelerometer\nfrom . import audio as audio\nfrom . import compass as compass\nfrom . import display as display\nfrom . import i2c as i2c\nfrom . import microphone as microphone\nfrom . import speaker as speaker\nfrom . import spi as spi\nfrom . import uart as uart\n\ndef run_every(callback: Optional[Callable[[], None]]=None, days: int=0, h: int=0, min: int=0, s: int=0, ms: int=0) -> Callable[[Callable[[], None]], Callable[[], None]]:\n \"\"\"time \u5f15\u6570\u3067\u6307\u5b9a\u3057\u305f\u9593\u9694\u3067\u95a2\u6570\u3092\u5b9f\u884c\u3059\u308b\u3088\u3046\u30b9\u30b1\u30b8\u30e5\u30fc\u30eb\u3057\u307e\u3059\u3002 **V2** \u306e\u307f\u3067\u4f7f\u3048\u307e\u3059\u3002\n\nExample: ``run_every(my_logging, min=5)``\n\n``run_every`` can be used in two ways:\n\nAs a Decorator - placed on top of the function to schedule. For example::\n\n @run_every(h=1, min=20, s=30, ms=50)\n def my_function():\n # Do something here\n\nAs a Function - passing the callback as a positional argument. For example::\n\n def my_function():\n # Do something here\n run_every(my_function, s=30)\n\nEach argument corresponds to a different time unit and they are additive.\nSo ``run_every(min=1, s=30)`` schedules the callback every minute and a half.\n\nWhen an exception is thrown inside the callback function it deschedules the\nfunction. To avoid this you can catch exceptions with ``try/except``.\n\n:param callback: \u6307\u5b9a\u3057\u305f\u9593\u9694\u3067\u547c\u3073\u51fa\u3059\u95a2\u6570\u3002\u30c7\u30b3\u30ec\u30fc\u30bf\u3068\u3057\u3066\u4f7f\u3046\u5834\u5408\u306f\u7701\u7565\u3057\u3066\u304f\u3060\u3055\u3044\u3002\n:param days: \u30b9\u30b1\u30b8\u30e5\u30fc\u30ea\u30f3\u30b0\u306e\u305f\u3081\u306e\u65e5\u6570\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002\n:param h: \u30b9\u30b1\u30b8\u30e5\u30fc\u30ea\u30f3\u30b0\u306e\u305f\u3081\u306e\u6642\u9593\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002\n:param min: \u30b9\u30b1\u30b8\u30e5\u30fc\u30ea\u30f3\u30b0\u306e\u305f\u3081\u306e\u5206\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002\n:param s: \u30b9\u30b1\u30b8\u30e5\u30fc\u30ea\u30f3\u30b0\u306e\u305f\u3081\u306e\u30df\u30ea\u79d2\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002\n:param ms: \u30b9\u30b1\u30b8\u30e5\u30fc\u30ea\u30f3\u30b0\u306e\u305f\u3081\u306e\u79d2\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002\"\"\"\n\ndef panic(n: int) -> None:\n \"\"\"\u30d1\u30cb\u30c3\u30af\u30e2\u30fc\u30c9\u306b\u5165\u308a\u307e\u3059\u3002\n\nExample: ``panic(127)``\n\n:param n: \u72b6\u614b\u3092\u793a\u3059 255 \u4ee5\u4e0b\u306e\u4efb\u610f\u306e\u6574\u6570\u3002\n\nRequires restart.\"\"\"\n\ndef reset() -> None:\n \"\"\"\u30dc\u30fc\u30c9\u3092\u518d\u8d77\u52d5\u3057\u307e\u3059\u3002\"\"\"\n\n@overload\ndef scale(value: float, from_: Tuple[float, float], to: Tuple[int, int]) -> int:\n \"\"\"\u3042\u308b\u6574\u6570\u533a\u9593\u304b\u3089\u5225\u306e\u6574\u6570\u533a\u9593\u306b\u5024\u3092\u5909\u63db\u3057\u307e\u3059\u3002\n\nExample: ``volume = scale(accelerometer.get_x(), from_=(-2000, 2000), to=(0, 255))``\n\nFor example, to convert an accelerometer X value to a speaker volume.\n\nIf one of the numbers in the ``to`` parameter is a floating point\n(i.e a decimal number like ``10.0``), this function will return a\nfloating point number.\n\n temp_fahrenheit = scale(30, from_=(0.0, 100.0), to=(32.0, 212.0))\n\n:param value: \u5909\u63db\u3059\u308b\u6570\u5024\u3002\n:param from_: \u5909\u63db\u5143\u306e\u533a\u9593\u3092\u5b9a\u7fa9\u3059\u308b\u305f\u3081\u306e\u30bf\u30d7\u30eb\u3002\n:param to: \u5909\u63db\u5148\u306e\u533a\u9593\u3092\u5b9a\u7fa9\u3059\u308b\u305f\u3081\u306e\u30bf\u30d7\u30eb\u3002\n:return: The ``value`` converted to the ``to`` range.\"\"\"\n\n@overload\ndef scale(value: float, from_: Tuple[float, float], to: Tuple[float, float]) -> float:\n \"\"\"\u3042\u308b\u6d6e\u52d5\u5c0f\u6570\u70b9\u6570\u533a\u9593\u304b\u3089\u5225\u306e\u6d6e\u52d5\u5c0f\u6570\u70b9\u6570\u533a\u9593\u306b\u5024\u3092\u5909\u63db\u3057\u307e\u3059\u3002\n\nExample: ``temp_fahrenheit = scale(30, from_=(0.0, 100.0), to=(32.0, 212.0))``\n\nFor example, to convert temperature from a Celsius scale to Fahrenheit.\n\nIf one of the numbers in the ``to`` parameter is a floating point\n(i.e a decimal number like ``10.0``), this function will return a\nfloating point number.\nIf they are both integers (i.e ``10``), it will return an integer::\n\n returns_int = scale(accelerometer.get_x(), from_=(-2000, 2000), to=(0, 255))\n\n:param value: \u5909\u63db\u3059\u308b\u6570\u5024\u3002\n:param from_: \u5909\u63db\u5143\u306e\u533a\u9593\u3092\u5b9a\u7fa9\u3059\u308b\u305f\u3081\u306e\u30bf\u30d7\u30eb\u3002\n:param to: \u5909\u63db\u5148\u306e\u533a\u9593\u3092\u5b9a\u7fa9\u3059\u308b\u305f\u3081\u306e\u30bf\u30d7\u30eb\u3002\n:return: The ``value`` converted to the ``to`` range.\"\"\"\n\ndef sleep(n: float) -> None:\n \"\"\"``n`` \u30df\u30ea\u79d2\u5f85\u6a5f\u3057\u307e\u3059\u3002\n\nExample: ``sleep(1000)``\n\n:param n: \u30df\u30ea\u79d2\u5358\u4f4d\u306e\u5f85\u6a5f\u6642\u9593\n\nOne second is 1000 milliseconds, so::\n\n microbit.sleep(1000)\n\nwill pause the execution for one second.\"\"\"\n\ndef running_time() -> int:\n \"\"\"\u30dc\u30fc\u30c9\u306e\u5b9f\u884c\u6642\u9593\u3092\u53d6\u5f97\u3057\u307e\u3059\u3002\n\n:return: The number of milliseconds since the board was switched on or restarted.\"\"\"\n\ndef temperature() -> int:\n \"\"\"micro:bit\u306e\u6e29\u5ea6\u3092\u6442\u6c0f\u3067\u53d6\u5f97\u3057\u307e\u3059\u3002 (\u6e29\u5ea6)\"\"\"\n\ndef set_volume(v: int) -> None:\n \"\"\"\u97f3\u91cf\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002\n\nExample: ``set_volume(127)``\n\n:param v: 0\uff08\u4e0b\u9650\uff09\u304b\u3089 255\uff08\u4e0a\u9650\uff09\u307e\u3067\u306e\u9593\u306e\u5024\u3002\n\nOut of range values will be clamped to 0 or 255.\n\n**V2** only.\"\"\"\n ...\n\nclass Button:\n \"\"\"\u30dc\u30bf\u30f3 ``button_a`` \u3068 ``button_b`` \u306e\u30af\u30e9\u30b9\u3002\"\"\"\n\n def is_pressed(self) -> bool:\n \"\"\"\u30dc\u30bf\u30f3\u304c\u62bc\u3055\u308c\u3066\u3044\u308b\u304b\u3069\u3046\u304b\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002\n\n:return: ``True`` if the specified button ``button`` is pressed, and ``False`` otherwise.\"\"\"\n ...\n\n def was_pressed(self) -> bool:\n \"\"\"\u30c7\u30d0\u30a4\u30b9\u304c\u8d77\u52d5\u3055\u308c\u3066\u304b\u3089\u3001\u3082\u3057\u304f\u306f\u524d\u56de\u3053\u306e\u30e1\u30bd\u30c3\u30c9\u304c\u547c\u3073\u51fa\u3055\u308c\u3066\u304b\u3089\u30dc\u30bf\u30f3\u304c\u62bc\u3055\u308c\u305f\u304b\u3069\u3046\u304b\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002\n\nCalling this method will clear the press state so\nthat the button must be pressed again before this method will return\n``True`` again.\n\n:return: ``True`` if the specified button ``button`` was pressed, and ``False`` otherwise\"\"\"\n ...\n\n def get_presses(self) -> int:\n \"\"\"\u30dc\u30bf\u30f3\u3092\u62bc\u3057\u305f\u56de\u6570\u306e\u5408\u8a08\u3092\u53d6\u5f97\u3057\u3001\u8fd4\u3059\u524d\u306b\u56de\u6570\u3092\u30bc\u30ed\u306b\u30ea\u30bb\u30c3\u30c8\u3057\u307e\u3059\u3002\n\n:return: The number of presses since the device started or the last time this method was called\"\"\"\n ...\nbutton_a: Button\n\"\"\"\u5de6\u306e\u30dc\u30bf\u30f3 ``Button`` \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3002\"\"\"\nbutton_b: Button\n\"\"\"\u53f3\u306e\u30dc\u30bf\u30f3 ``Button`` \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3002\"\"\"\n\nclass MicroBitDigitalPin:\n \"\"\"\u30c7\u30b8\u30bf\u30eb\u7aef\u5b50\u3002\n\nSome pins support analog and touch features using the ``MicroBitAnalogDigitalPin`` and ``MicroBitTouchPin`` subclasses.\"\"\"\n NO_PULL: int\n PULL_UP: int\n PULL_DOWN: int\n\n def read_digital(self) -> int:\n \"\"\"\u7aef\u5b50\u306e\u30c7\u30b8\u30bf\u30eb\u5024\u3092\u53d6\u5f97\u3057\u307e\u3059\u3002\n\nExample: ``value = pin0.read_digital()``\n\n:return: 1 if the pin is high, and 0 if it's low.\"\"\"\n ...\n\n def write_digital(self, value: int) -> None:\n \"\"\"\u7aef\u5b50\u306e\u30c7\u30b8\u30bf\u30eb\u5024\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002\n\nExample: ``pin0.write_digital(1)``\n\n:param value: \u7aef\u5b50\u3092\u30cf\u30a4\u306b\u3059\u308b\u306b\u306f 1 \u3001\u30ed\u30fc\u306b\u3059\u308b\u306b\u306f 0 \u3092\u6307\u5b9a\"\"\"\n ...\n\n def set_pull(self, value: int) -> None:\n \"\"\"\u30d7\u30eb\u72b6\u614b\u3092 ``PULL_UP``\u3001``PULL_DOWN``\u3001``NO_PULL`` \u306e\uff13\u3064\u306e\u5024\u306e\u3044\u305a\u308c\u304b\u306b\u8a2d\u5b9a\u3057\u307e\u3059\u3002\n\nExample: ``pin0.set_pull(pin0.PULL_UP)``\n\n:param value: ``pin0.PULL_UP`` \u306a\u3069\u306e\u95a2\u9023\u3059\u308b\u7aef\u5b50\u306e\u30d7\u30eb\u72b6\u614b\u3002\"\"\"\n ...\n\n def get_pull(self) -> int:\n \"\"\"\u7aef\u5b50\u306e\u30d7\u30eb\u72b6\u614b\u3092\u53d6\u5f97\u3057\u307e\u3059\u3002\n\nExample: ``pin0.get_pull()``\n\n:return: ``NO_PULL``, ``PULL_DOWN``, or ``PULL_UP``\n\nThese are set using the ``set_pull()`` method or automatically configured\nwhen a pin mode requires it.\"\"\"\n ...\n\n def get_mode(self) -> str:\n \"\"\"\u7aef\u5b50\u306e\u30e2\u30fc\u30c9\u3092\u8fd4\u3057\u307e\u3059\u3002\n\nExample: ``pin0.get_mode()``\n\nWhen a pin is used for a specific function, like\nwriting a digital value, or reading an analog value, the pin mode\nchanges.\n\n:return: ``\"unused\"``, ``\"analog\"``, ``\"read_digital\"``, ``\"write_digital\"``, ``\"display\"``, ``\"button\"``, ``\"music\"``, ``\"audio\"``, ``\"touch\"``, ``\"i2c\"``, or ``\"spi\"``\"\"\"\n ...\n\n def write_analog(self, value: int) -> None:\n \"\"\"PWM \u4fe1\u53f7\u3092\u7aef\u5b50\u306b\u51fa\u529b\u3057\u307e\u3059\u3002\u6642\u9593\u5e45\u5468\u671f\u306f ``value`` \u306b\u6bd4\u4f8b\u3057\u307e\u3059\u3002\n\nExample: ``pin0.write_analog(254)``\n\n:param value: 0\uff08\u6642\u9593\u5e45\u5468\u671f 0%\uff09\u304b\u3089 1023\uff08\u6642\u9593\u5e45\u5468\u671f 100%\uff09\u307e\u3067\u306e\u6574\u6570\u307e\u305f\u306f\u6d6e\u52d5\u5c0f\u6570\u70b9\u6570\u3002\"\"\"\n\n def set_analog_period(self, period: int) -> None:\n \"\"\"\u51fa\u529b\u3055\u308c\u308bPWM\u4fe1\u53f7\u306e\u5468\u671f\u3092 ``period`` \u306b\u30df\u30ea\u79d2\u5358\u4f4d\u3067\u8a2d\u5b9a\u3057\u307e\u3059\u3002\n\nExample: ``pin0.set_analog_period(10)``\n\n:param period: \u5468\u671f\u3092\u30df\u30ea\u79d2\u5358\u4f4d\u3067\u6307\u5b9a\u3002\u6709\u52b9\u306a\u6700\u5c0f\u5024\u306f1ms\u3002\"\"\"\n\n def set_analog_period_microseconds(self, period: int) -> None:\n \"\"\"\u51fa\u529b\u3055\u308c\u308bPWM\u4fe1\u53f7\u306e\u5468\u671f\u3092 ``period`` \u306b\u30de\u30a4\u30af\u30ed\u79d2\u5358\u4f4d\u3067\u8a2d\u5b9a\u3057\u307e\u3059\u3002\n\nExample: ``pin0.set_analog_period_microseconds(512)``\n\n:param period: \u5468\u671f\u3092\u30de\u30a4\u30af\u30ed\u79d2\u5358\u4f4d\u3067\u6307\u5b9a\u3002\u6709\u52b9\u306a\u6700\u5c0f\u5024\u306f256\u00b5s\u3002\"\"\"\n\nclass MicroBitAnalogDigitalPin(MicroBitDigitalPin):\n \"\"\"\u30a2\u30ca\u30ed\u30b0\u3068\u30c7\u30b8\u30bf\u30eb\u6a5f\u80fd\u3092\u5099\u3048\u305f\u7aef\u5b50\u3002\"\"\"\n\n def read_analog(self) -> int:\n \"\"\"\u7aef\u5b50\u306b\u304b\u304b\u3063\u3066\u3044\u308b\u96fb\u5727\u3092\u8aad\u307f\u53d6\u308a\u307e\u3059\u3002\n\nExample: ``pin0.read_analog()``\n\n:return: An integer between 0 (meaning 0V) and 1023 (meaning 3.3V).\"\"\"\n\nclass MicroBitTouchPin(MicroBitAnalogDigitalPin):\n \"\"\"\u30a2\u30ca\u30ed\u30b0\u3001\u30c7\u30b8\u30bf\u30eb\u3001\u30bf\u30c3\u30c1\u6a5f\u80fd\u3092\u5099\u3048\u305f\u7aef\u5b50\u3002\"\"\"\n CAPACITIVE: int\n RESISTIVE: int\n\n def is_touched(self) -> bool:\n \"\"\"\u7aef\u5b50\u306b\u30bf\u30c3\u30c1\u3057\u3066\u3044\u308b\u304b\u3069\u3046\u304b\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002\n\nExample: ``pin0.is_touched()``\n\nThe default touch mode for the pins on the edge connector is ``resistive``.\nThe default for the logo pin **V2** is ``capacitive``.\n\n**Resistive touch**\nThis test is done by measuring how much resistance there is between the\npin and ground. A low resistance gives a reading of ``True``. To get\na reliable reading using a finger you may need to touch the ground pin\nwith another part of your body, for example your other hand.\n\n**Capacitive touch**\nThis test is done by interacting with the electric field of a capacitor\nusing a finger as a conductor. `Capacitive touch\n`_\ndoes not require you to make a ground connection as part of a circuit.\n\n:return: ``True`` if the pin is being touched with a finger, otherwise return ``False``.\"\"\"\n ...\n\n def set_touch_mode(self, value: int) -> None:\n \"\"\"\u7aef\u5b50\u306e\u30bf\u30c3\u30c1\u30e2\u30fc\u30c9\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002\n\nExample: ``pin0.set_touch_mode(pin0.CAPACITIVE)``\n\nThe default touch mode for the pins on the edge connector is\n``resistive``. The default for the logo pin **V2** is ``capacitive``.\n\n:param value: \u95a2\u9023\u3059\u308b\u7aef\u5b50\u306e ``CAPACITIVE`` \u307e\u305f\u306f ``RESISTIVE``\u3002\"\"\"\n ...\npin0: MicroBitTouchPin\n\"\"\"\u30c7\u30b8\u30bf\u30eb\u3001\u30a2\u30ca\u30ed\u30b0\u3001\u30bf\u30c3\u30c1\u6a5f\u80fd\u3092\u5099\u3048\u305f\u7aef\u5b50\u3002\"\"\"\npin1: MicroBitTouchPin\n\"\"\"\u30c7\u30b8\u30bf\u30eb\u3001\u30a2\u30ca\u30ed\u30b0\u3001\u30bf\u30c3\u30c1\u6a5f\u80fd\u3092\u5099\u3048\u305f\u7aef\u5b50\u3002\"\"\"\npin2: MicroBitTouchPin\n\"\"\"\u30c7\u30b8\u30bf\u30eb\u3001\u30a2\u30ca\u30ed\u30b0\u3001\u30bf\u30c3\u30c1\u6a5f\u80fd\u3092\u5099\u3048\u305f\u7aef\u5b50\u3002\"\"\"\npin3: MicroBitAnalogDigitalPin\n\"\"\"\u30c7\u30b8\u30bf\u30eb\u3068\u30a2\u30ca\u30ed\u30b0\u6a5f\u80fd\u3092\u5099\u3048\u305f\u7aef\u5b50\u3002\"\"\"\npin4: MicroBitAnalogDigitalPin\n\"\"\"\u30c7\u30b8\u30bf\u30eb\u3068\u30a2\u30ca\u30ed\u30b0\u6a5f\u80fd\u3092\u5099\u3048\u305f\u7aef\u5b50\u3002\"\"\"\npin5: MicroBitDigitalPin\n\"\"\"\u30c7\u30b8\u30bf\u30eb\u6a5f\u80fd\u3092\u5099\u3048\u305f\u7aef\u5b50\u3002\"\"\"\npin6: MicroBitDigitalPin\n\"\"\"\u30c7\u30b8\u30bf\u30eb\u6a5f\u80fd\u3092\u5099\u3048\u305f\u7aef\u5b50\u3002\"\"\"\npin7: MicroBitDigitalPin\n\"\"\"\u30c7\u30b8\u30bf\u30eb\u6a5f\u80fd\u3092\u5099\u3048\u305f\u7aef\u5b50\u3002\"\"\"\npin8: MicroBitDigitalPin\n\"\"\"\u30c7\u30b8\u30bf\u30eb\u6a5f\u80fd\u3092\u5099\u3048\u305f\u7aef\u5b50\u3002\"\"\"\npin9: MicroBitDigitalPin\n\"\"\"\u30c7\u30b8\u30bf\u30eb\u6a5f\u80fd\u3092\u5099\u3048\u305f\u7aef\u5b50\u3002\"\"\"\npin10: MicroBitAnalogDigitalPin\n\"\"\"\u30c7\u30b8\u30bf\u30eb\u3068\u30a2\u30ca\u30ed\u30b0\u6a5f\u80fd\u3092\u5099\u3048\u305f\u7aef\u5b50\u3002\"\"\"\npin11: MicroBitDigitalPin\n\"\"\"\u30c7\u30b8\u30bf\u30eb\u6a5f\u80fd\u3092\u5099\u3048\u305f\u7aef\u5b50\u3002\"\"\"\npin12: MicroBitDigitalPin\n\"\"\"\u30c7\u30b8\u30bf\u30eb\u6a5f\u80fd\u3092\u5099\u3048\u305f\u7aef\u5b50\u3002\"\"\"\npin13: MicroBitDigitalPin\n\"\"\"\u30c7\u30b8\u30bf\u30eb\u6a5f\u80fd\u3092\u5099\u3048\u305f\u7aef\u5b50\u3002\"\"\"\npin14: MicroBitDigitalPin\n\"\"\"\u30c7\u30b8\u30bf\u30eb\u6a5f\u80fd\u3092\u5099\u3048\u305f\u7aef\u5b50\u3002\"\"\"\npin15: MicroBitDigitalPin\n\"\"\"\u30c7\u30b8\u30bf\u30eb\u6a5f\u80fd\u3092\u5099\u3048\u305f\u7aef\u5b50\u3002\"\"\"\npin16: MicroBitDigitalPin\n\"\"\"\u30c7\u30b8\u30bf\u30eb\u6a5f\u80fd\u3092\u5099\u3048\u305f\u7aef\u5b50\u3002\"\"\"\npin19: MicroBitDigitalPin\n\"\"\"\u30c7\u30b8\u30bf\u30eb\u6a5f\u80fd\u3092\u5099\u3048\u305f\u7aef\u5b50\u3002\"\"\"\npin20: MicroBitDigitalPin\n\"\"\"\u30c7\u30b8\u30bf\u30eb\u6a5f\u80fd\u3092\u5099\u3048\u305f\u7aef\u5b50\u3002\"\"\"\npin_logo: MicroBitTouchPin\n\"\"\"micro:bit\u306e\u524d\u9762\u306b\u3042\u308b\u30bf\u30c3\u30c1\u30bb\u30f3\u30b5\u30fc\u6a5f\u80fd\u306e\u3042\u308b\u30ed\u30b4\u306e\u7aef\u5b50\u3067\u3059\u3002\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f\u9759\u96fb\u5bb9\u91cf\u65b9\u5f0f\u30bf\u30c3\u30c1\u30e2\u30fc\u30c9\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002\"\"\"\npin_speaker: MicroBitAnalogDigitalPin\n\"\"\"micro:bit\u30b9\u30d4\u30fc\u30ab\u30fc\u3092\u30a2\u30c9\u30ec\u30b9\u3059\u308b\u305f\u3081\u306e\u7aef\u5b50\u3002\n\nThis API is intended only for use in Pulse-Width Modulation pin operations e.g. pin_speaker.write_analog(128).\n\"\"\"\n\nclass Image:\n \"\"\"micro:bit\u306eLED\u30c7\u30a3\u30b9\u30d7\u30ec\u30a4\u306b\u8868\u793a\u3059\u308b\u30a4\u30e1\u30fc\u30b8\u3002\n\nGiven an image object it's possible to display it via the ``display`` API::\n\n display.show(Image.HAPPY)\"\"\"\n HEART: Image\n \"\"\"\u300c\u30cf\u30fc\u30c8\u300d\u30a4\u30e1\u30fc\u30b8\u3002\"\"\"\n HEART_SMALL: Image\n \"\"\"\u300c\u5c0f\u3055\u3044\u30cf\u30fc\u30c8\u300d\u30a4\u30e1\u30fc\u30b8\u3002\"\"\"\n HAPPY: Image\n \"\"\"\u300c\u3046\u308c\u3057\u3044\u9854\u300d\u30a4\u30e1\u30fc\u30b8\u3002\"\"\"\n SMILE: Image\n \"\"\"\u300c\u7b11\u9854\u300d\u30a4\u30e1\u30fc\u30b8\u3002\"\"\"\n SAD: Image\n \"\"\"\u300c\u304b\u306a\u3057\u3044\u9854\u300d\u30a4\u30e1\u30fc\u30b8\u3002\"\"\"\n CONFUSED: Image\n \"\"\"\u300c\u3053\u307e\u308a\u9854\u300d\u30a4\u30e1\u30fc\u30b8\u3002\"\"\"\n ANGRY: Image\n \"\"\"\u300c\u304a\u3053\u308a\u9854\u300d\u30a4\u30e1\u30fc\u30b8\u3002\"\"\"\n ASLEEP: Image\n \"\"\"\u300c\u306d\u3066\u308b\u9854\u300d\u30a4\u30e1\u30fc\u30b8\u3002\"\"\"\n SURPRISED: Image\n \"\"\"\u300c\u3073\u3063\u304f\u308a\u9854\u300d\u30a4\u30e1\u30fc\u30b8\u3002\"\"\"\n SILLY: Image\n \"\"\"\u300c\u3078\u3093\u9854\u300d\u30a4\u30e1\u30fc\u30b8\u3002\"\"\"\n FABULOUS: Image\n \"\"\"\u300c\u30b5\u30f3\u30b0\u30e9\u30b9\u306e\u7b11\u9854\u300d\u30a4\u30e1\u30fc\u30b8\u3002\"\"\"\n MEH: Image\n \"\"\"\u300c\u3075\u30fc\u3093\u300d\u30a4\u30e1\u30fc\u30b8\"\"\"\n YES: Image\n \"\"\"\u300c\u30c1\u30a7\u30c3\u30af\u300d\u30a4\u30e1\u30fc\u30b8\u3002\"\"\"\n NO: Image\n \"\"\"\u300c\u30d0\u30c4\u300d\u30a4\u30e1\u30fc\u30b8\u3002\"\"\"\n CLOCK12: Image\n \"\"\"\u300c12\u6642\u3092\u6307\u3059\u7dda\u300d\u30a4\u30e1\u30fc\u30b8\u3002\"\"\"\n CLOCK11: Image\n \"\"\"\u300c11\u6642\u3092\u6307\u3059\u7dda\u300d\u30a4\u30e1\u30fc\u30b8\u3002\"\"\"\n CLOCK10: Image\n \"\"\"\u300c10\u6642\u3092\u6307\u3059\u7dda\u300d\u30a4\u30e1\u30fc\u30b8\u3002\"\"\"\n CLOCK9: Image\n \"\"\"\u300c9\u6642\u3092\u6307\u3059\u7dda\u300d\u30a4\u30e1\u30fc\u30b8\u3002\"\"\"\n CLOCK8: Image\n \"\"\"\u300c8\u6642\u3092\u6307\u3059\u7dda\u300d\u30a4\u30e1\u30fc\u30b8\u3002\"\"\"\n CLOCK7: Image\n \"\"\"\u300c7\u6642\u3092\u6307\u3059\u7dda\u300d\u30a4\u30e1\u30fc\u30b8\u3002\"\"\"\n CLOCK6: Image\n \"\"\"\u300c6\u6642\u3092\u6307\u3059\u7dda\u300d\u30a4\u30e1\u30fc\u30b8\u3002\"\"\"\n CLOCK5: Image\n \"\"\"\u300c5\u6642\u3092\u6307\u3059\u7dda\u300d\u30a4\u30e1\u30fc\u30b8\u3002\"\"\"\n CLOCK4: Image\n \"\"\"\u300c4\u6642\u3092\u6307\u3059\u7dda\u300d\u30a4\u30e1\u30fc\u30b8\u3002\"\"\"\n CLOCK3: Image\n \"\"\"\u300c3\u6642\u3092\u6307\u3059\u7dda\u300d\u30a4\u30e1\u30fc\u30b8\u3002\"\"\"\n CLOCK2: Image\n \"\"\"\u300c2\u6642\u3092\u6307\u3059\u7dda\u300d\u30a4\u30e1\u30fc\u30b8\u3002\"\"\"\n CLOCK1: Image\n \"\"\"\u300c1\u6642\u3092\u6307\u3059\u7dda\u300d\u30a4\u30e1\u30fc\u30b8\u3002\"\"\"\n ARROW_N: Image\n \"\"\"\u300c\u5317\u3092\u6307\u3059\u77e2\u5370\u300d\u30a4\u30e1\u30fc\u30b8\u3002\"\"\"\n ARROW_NE: Image\n \"\"\"\u300c\u5317\u6771\u3092\u6307\u3059\u77e2\u5370\u300d\u30a4\u30e1\u30fc\u30b8\u3002\"\"\"\n ARROW_E: Image\n \"\"\"\u300c\u897f\u3092\u6307\u3059\u77e2\u5370\u300d\u30a4\u30e1\u30fc\u30b8\u3002\"\"\"\n ARROW_SE: Image\n \"\"\"\u300c\u5357\u6771\u3092\u6307\u3059\u77e2\u5370\u300d\u30a4\u30e1\u30fc\u30b8\u3002\"\"\"\n ARROW_S: Image\n \"\"\"\u300c\u5357\u3092\u6307\u3059\u77e2\u5370\u300d\u30a4\u30e1\u30fc\u30b8\u3002\"\"\"\n ARROW_SW: Image\n \"\"\"\u300c\u5357\u897f\u3092\u6307\u3059\u77e2\u5370\u300d\u30a4\u30e1\u30fc\u30b8\u3002\"\"\"\n ARROW_W: Image\n \"\"\"\u300c\u897f\u3092\u6307\u3059\u77e2\u5370\u300d\u30a4\u30e1\u30fc\u30b8\u3002\"\"\"\n ARROW_NW: Image\n \"\"\"\u300c\u5317\u897f\u3092\u6307\u3059\u77e2\u5370\u300d\u30a4\u30e1\u30fc\u30b8\u3002\"\"\"\n TRIANGLE: Image\n \"\"\"\u300c\u4e0a\u5411\u304d\u306e\u4e09\u89d2\u5f62\u300d\u30a4\u30e1\u30fc\u30b8\"\"\"\n TRIANGLE_LEFT: Image\n \"\"\"\u300c\u5de6\u5411\u304d\u4e09\u89d2\u300d\u30a4\u30e1\u30fc\u30b8\u3002\"\"\"\n CHESSBOARD: Image\n \"\"\"\u30c1\u30a7\u30b9\u76e4\u30d1\u30bf\u30fc\u30f3\u3067\u4ea4\u4e92\u306b\u70b9\u706f\u3059\u308bLED\u3002\"\"\"\n DIAMOND: Image\n \"\"\"\u300c\u30c0\u30a4\u30e4\u30e2\u30f3\u30c9\u300d\u30a4\u30e1\u30fc\u30b8\u3002\"\"\"\n DIAMOND_SMALL: Image\n \"\"\"\u300c\u5c0f\u3055\u3044\u30c0\u30a4\u30e4\u30e2\u30f3\u30c9\u300d\u30a4\u30e1\u30fc\u30b8\u3002\"\"\"\n SQUARE: Image\n \"\"\"\u300c\u56db\u89d2\u300d\u30a4\u30e1\u30fc\u30b8\u3002\"\"\"\n SQUARE_SMALL: Image\n \"\"\"\u300c\u5c0f\u3055\u3044\u56db\u89d2\u300d\u30a4\u30e1\u30fc\u30b8\u3002\"\"\"\n RABBIT: Image\n \"\"\"\u300c\u3046\u3055\u304e\u300d\u30a4\u30e1\u30fc\u30b8\u3002\"\"\"\n COW: Image\n \"\"\"\u300c\u3046\u3057\u300d\u30a4\u30e1\u30fc\u30b8\u3002\"\"\"\n MUSIC_CROTCHET: Image\n \"\"\"\u300c\uff14\u5206\u97f3\u7b26\u300d\u30a4\u30e1\u30fc\u30b8\u3002\"\"\"\n MUSIC_QUAVER: Image\n \"\"\"\u300c\uff18\u5206\u97f3\u7b26\u300d\u30a4\u30e1\u30fc\u30b8\u3002\"\"\"\n MUSIC_QUAVERS: Image\n \"\"\"\u300c\u9023\u7d50\u3057\u305f\uff18\u5206\u97f3\u7b26\u300d\u30a4\u30e1\u30fc\u30b8\u3002\"\"\"\n PITCHFORK: Image\n \"\"\"\u300c\u304f\u307e\u3067\u300d\u30a4\u30e1\u30fc\u30b8\u3002\"\"\"\n XMAS: Image\n \"\"\"\u300c\u30af\u30ea\u30b9\u30de\u30b9\u30c4\u30ea\u30fc\u300d\u30a4\u30e1\u30fc\u30b8\u3002\"\"\"\n PACMAN: Image\n \"\"\"\u300c\u30d1\u30c3\u30af\u30de\u30f3\u300d\u30a4\u30e1\u30fc\u30b8\u3002\"\"\"\n TARGET: Image\n \"\"\"\u300c\u307e\u3068\u300d\u30a4\u30e1\u30fc\u30b8\u3002\"\"\"\n TSHIRT: Image\n \"\"\"\u300cT\u30b7\u30e3\u30c4\u300d\u30a4\u30e1\u30fc\u30b8\u3002\"\"\"\n ROLLERSKATE: Image\n \"\"\"\u300c\u30ed\u30fc\u30e9\u30fc\u30b9\u30b1\u30fc\u30c8\u300d\u30a4\u30e1\u30fc\u30b8\u3002\"\"\"\n DUCK: Image\n \"\"\"\u300c\u3042\u3072\u308b\u300d\u30a4\u30e1\u30fc\u30b8\u3002\"\"\"\n HOUSE: Image\n \"\"\"\u300c\u5bb6\u300d\u30a4\u30e1\u30fc\u30b8\u3002\"\"\"\n TORTOISE: Image\n \"\"\"\u300c\u304b\u3081\u300d\u30a4\u30e1\u30fc\u30b8\u3002\"\"\"\n BUTTERFLY: Image\n \"\"\"\u300c\u3061\u3087\u3046\u3061\u3087\u300d\u30a4\u30e1\u30fc\u30b8\u3002\"\"\"\n STICKFIGURE: Image\n \"\"\"\u300c\u68d2\u4eba\u9593\u300d\u30a4\u30e1\u30fc\u30b8\u3002\"\"\"\n GHOST: Image\n \"\"\"\u300c\u304a\u3070\u3051\u300d\u30a4\u30e1\u30fc\u30b8\u3002\"\"\"\n SWORD: Image\n \"\"\"\u300c\u5263\u300d\u30a4\u30e1\u30fc\u30b8\u3002\"\"\"\n GIRAFFE: Image\n \"\"\"\u300c\u304d\u308a\u3093\u300d\u30a4\u30e1\u30fc\u30b8\u3002\"\"\"\n SKULL: Image\n \"\"\"\u300c\u304c\u3044\u3053\u3064\u300d\u30a4\u30e1\u30fc\u30b8\u3002\"\"\"\n UMBRELLA: Image\n \"\"\"\u300c\u304b\u3055\u300d\u30a4\u30e1\u30fc\u30b8\u3002\"\"\"\n SNAKE: Image\n \"\"\"\u300c\u3078\u3073\u300d\u30a4\u30e1\u30fc\u30b8\u3002\"\"\"\n SCISSORS: Image\n \"\"\"\u300c\u306f\u3055\u307f\u300d\u30a4\u30e1\u30fc\u30b8\u3002\"\"\"\n ALL_CLOCKS: List[Image]\n \"\"\"\u3059\u3079\u3066\u306e CLOCK_ \u30a4\u30e1\u30fc\u30b8\u3092\u9806\u756a\u306b\u4e26\u3079\u305f\u30ea\u30b9\u30c8\u3002\"\"\"\n ALL_ARROWS: List[Image]\n \"\"\"\u3059\u3079\u3066\u306e ARROW_ \u30a4\u30e1\u30fc\u30b8\u3092\u9806\u756a\u306b\u4e26\u3079\u305f\u30ea\u30b9\u30c8\u3002\"\"\"\n\n @overload\n def __init__(self, string: str) -> None:\n \"\"\"LED\u306e\u70b9\u706f\u30d1\u30bf\u30fc\u30f3\u3092\u793a\u3059\u6587\u5b57\u5217\u304b\u3089\u30a4\u30e1\u30fc\u30b8\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002\n\n``string`` has to consist of digits 0-9 arranged into lines,\ndescribing the image, for example::\n\n image = Image(\"90009:\"\n \"09090:\"\n \"00900:\"\n \"09090:\"\n \"90009\")\n\nwill create a 5\u00d75 image of an X. The end of a line is indicated by a\ncolon. It's also possible to use newlines (\\\\n) insead of the colons.\n\n:param string: \u30a4\u30e1\u30fc\u30b8\u306b\u3064\u3044\u3066\u8a18\u8ff0\u3059\u308b\u6587\u5b57\u5217\u3002\"\"\"\n ...\n\n @overload\n def __init__(self, width: int=5, height: int=5, buffer: ReadableBuffer=None) -> None:\n \"\"\"``width`` \u5217\u3068 ``height`` \u884c\u304b\u3089\u306a\u308b\u7a7a\u306e\u30a4\u30e1\u30fc\u30b8\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002\n\n:param width: \u30a4\u30e1\u30fc\u30b8\u306e\u5e45\u3092\u6307\u5b9a\u3059\u308b\u30aa\u30d7\u30b7\u30e7\u30f3\n:param height: \u30a4\u30e1\u30fc\u30b8\u306e\u9ad8\u3055\u3092\u6307\u5b9a\u3059\u308b\u30aa\u30d7\u30b7\u30e7\u30f3\n:param buffer: \u30a4\u30e1\u30fc\u30b8\u3092\u521d\u671f\u5316\u3059\u308b\u305f\u3081\u306b\u3001\u6574\u6570\u5024\uff080\uff5e9\uff09\u3092 ``width``\u00d7``height`` \u500b\u4e26\u3079\u305f\u914d\u5217\u307e\u305f\u306f\u30d0\u30a4\u30c8\u5217\u3092\u6307\u5b9a\u3057\u307e\u3059\n\nExamples::\n\n Image(2, 2, b'\\x08\\x08\\x08\\x08')\n Image(2, 2, bytearray([9,9,9,9]))\n\nThese create 2 x 2 pixel images at full brightness.\"\"\"\n ...\n\n def width(self) -> int:\n \"\"\"\u5217\u6570\u3092\u53d6\u5f97\u3057\u307e\u3059\u3002\n\n:return: The number of columns in the image\"\"\"\n ...\n\n def height(self) -> int:\n \"\"\"\u884c\u6570\u3092\u53d6\u5f97\u3057\u307e\u3059\u3002\n\n:return: The number of rows in the image\"\"\"\n ...\n\n def set_pixel(self, x: int, y: int, value: int) -> None:\n \"\"\"1\u30d4\u30af\u30bb\u30eb\u306e\u660e\u308b\u3055\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002\n\nExample: ``my_image.set_pixel(0, 0, 9)``\n\n:param x: \u5217\u6570\n:param y: \u884c\u6570\n:param value: \u660e\u308b\u3055\u3092 0\uff08\u6697\u3044\uff09\u304b\u3089 9\uff08\u660e\u308b\u3044\uff09\u307e\u3067\u306e\u6574\u6570\u5024\u3067\u6307\u5b9a\u3057\u307e\u3059\n\nThis method will raise an exception when called on any of the built-in\nread-only images, like ``Image.HEART``.\"\"\"\n ...\n\n def get_pixel(self, x: int, y: int) -> int:\n \"\"\"1\u30d4\u30af\u30bb\u30eb\u306e\u660e\u308b\u3055\u3092\u53d6\u5f97\u3057\u307e\u3059\u3002\n\nExample: ``my_image.get_pixel(0, 0)``\n\n:param x: \u5217\u6570\n:param y: \u884c\u6570\n:return: The brightness as an integer between 0 and 9.\"\"\"\n ...\n\n def shift_left(self, n: int) -> Image:\n \"\"\"\u753b\u50cf\u3092\u5de6\u306b\u30b7\u30d5\u30c8\u3057\u305f\u65b0\u3057\u3044\u30a4\u30e1\u30fc\u30b8\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002\n\nExample: ``Image.HEART_SMALL.shift_left(1)``\n\n:param n: \u30b7\u30d5\u30c8\u3059\u308b\u5217\u6570\n:return: The shifted image\"\"\"\n ...\n\n def shift_right(self, n: int) -> Image:\n \"\"\"\u753b\u50cf\u3092\u53f3\u306b\u30b7\u30d5\u30c8\u3057\u305f\u65b0\u3057\u3044\u30a4\u30e1\u30fc\u30b8\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002\n\nExample: ``Image.HEART_SMALL.shift_right(1)``\n\n:param n: \u30b7\u30d5\u30c8\u3059\u308b\u5217\u6570\n:return: The shifted image\"\"\"\n ...\n\n def shift_up(self, n: int) -> Image:\n \"\"\"\u753b\u50cf\u3092\u4e0a\u306b\u30b7\u30d5\u30c8\u3057\u305f\u65b0\u3057\u3044\u30a4\u30e1\u30fc\u30b8\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002\n\nExample: ``Image.HEART_SMALL.shift_up(1)``\n\n:param n: \u30b7\u30d5\u30c8\u3059\u308b\u884c\u6570\n:return: The shifted image\"\"\"\n ...\n\n def shift_down(self, n: int) -> Image:\n \"\"\"\u753b\u50cf\u3092\u4e0b\u306b\u30b7\u30d5\u30c8\u3057\u305f\u65b0\u3057\u3044\u30a4\u30e1\u30fc\u30b8\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002\n\nExample: ``Image.HEART_SMALL.shift_down(1)``\n\n:param n: \u30b7\u30d5\u30c8\u3059\u308b\u884c\u6570\n:return: The shifted image\"\"\"\n ...\n\n def crop(self, x: int, y: int, w: int, h: int) -> Image:\n \"\"\"\u753b\u50cf\u3092\u30c8\u30ea\u30df\u30f3\u30b0\u3057\u305f\u65b0\u3057\u3044\u30a4\u30e1\u30fc\u30b8\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002\n\nExample: ``Image.HEART.crop(1, 1, 3, 3)``\n\n:param x: \u30c8\u30ea\u30df\u30f3\u30b0\u3059\u308b\u30aa\u30d5\u30bb\u30c3\u30c8\u5217\n:param y: \u30c8\u30ea\u30df\u30f3\u30b0\u3059\u308b\u30aa\u30d5\u30bb\u30c3\u30c8\u884c\n:param w: \u30c8\u30ea\u30df\u30f3\u30b0\u3059\u308b\u5e45\n:param h: \u30c8\u30ea\u30df\u30f3\u30b0\u3059\u308b\u9ad8\u3055\n:return: The new image\"\"\"\n ...\n\n def copy(self) -> Image:\n \"\"\"\u30a4\u30e1\u30fc\u30b8\u5168\u4f53\u306e\u30b3\u30d4\u30fc\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002\n\nExample: ``Image.HEART.copy()``\n\n:return: The new image\"\"\"\n ...\n\n def invert(self) -> Image:\n \"\"\"\u5143\u30a4\u30e1\u30fc\u30b8\u306e\u30d4\u30af\u30bb\u30eb\u306e\u660e\u308b\u3055\u3092\u53cd\u8ee2\u3057\u305f\u65b0\u3057\u3044\u30a4\u30e1\u30fc\u30b8\u4f5c\u6210\u3057\u307e\u3059\u3002\n\nExample: ``Image.SMALL_HEART.invert()``\n\n:return: The new image.\"\"\"\n ...\n\n def fill(self, value: int) -> None:\n \"\"\"\u30a4\u30e1\u30fc\u30b8\u306e\u3059\u3079\u3066\u306e\u30d4\u30af\u30bb\u30eb\u306e\u660e\u308b\u3055\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002\n\nExample: ``my_image.fill(5)``\n\n:param value: 0\uff08\u6697\u3044\uff09\u304b\u3089 9\uff08\u660e\u308b\u3044\uff09\u307e\u3067\u306e\u6570\u5024\u3067\u65b0\u3057\u3044\u660e\u308b\u3055\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002\n\nThis method will raise an exception when called on any of the built-in\nread-only images, like ``Image.HEART``.\"\"\"\n ...\n\n def blit(self, src: Image, x: int, y: int, w: int, h: int, xdest: int=0, ydest: int=0) -> None:\n \"\"\"\u3053\u306e\u30a4\u30e1\u30fc\u30b8\u306b\u5225\u306e\u30a4\u30e1\u30fc\u30b8\u304b\u3089\u9818\u57df\u3092\u30b3\u30d4\u30fc\u3057\u307e\u3059\u3002\n\nExample: ``my_image.blit(Image.HEART, 1, 1, 3, 3, 1, 1)``\n\n:param src: \u5143\u30a4\u30e1\u30fc\u30b8\n:param x: \u5143\u30a4\u30e1\u30fc\u30b8\u306e\u958b\u59cb\u5217\u30aa\u30d5\u30bb\u30c3\u30c8\n:param y: \u5143\u30a4\u30e1\u30fc\u30b8\u306e\u958b\u59cb\u884c\u30aa\u30d5\u30bb\u30c3\u30c8\n:param w: \u30b3\u30d4\u30fc\u3059\u308b\u5217\u6570\n:param h: \u30b3\u30d4\u30fc\u3059\u308b\u884c\u6570\n:param xdest: \u3053\u306e\u30a4\u30e1\u30fc\u30b8\u3067\u5909\u66f4\u3059\u308b\u5217\u30aa\u30d5\u30bb\u30c3\u30c8\n:param ydest: \u3053\u306e\u30a4\u30e1\u30fc\u30b8\u3067\u5909\u66f4\u3059\u308b\u884c\u30aa\u30d5\u30bb\u30c3\u30c8\n\nPixels outside the source image are treated as having a brightness of 0.\n\n``shift_left()``, ``shift_right()``, ``shift_up()``, ``shift_down()``\nand ``crop()`` can are all implemented by using ``blit()``.\n\nFor example, img.crop(x, y, w, h) can be implemented as::\n\n def crop(self, x, y, w, h):\n res = Image(w, h)\n res.blit(self, x, y, w, h)\n return res\"\"\"\n ...\n\n def __repr__(self) -> str:\n \"\"\"\u30a4\u30e1\u30fc\u30b8\u306e\u30b3\u30f3\u30d1\u30af\u30c8\u306a\u6587\u5b57\u5217\u8868\u73fe\u3092\u53d6\u5f97\u3057\u307e\u3059\u3002\"\"\"\n ...\n\n def __str__(self) -> str:\n \"\"\"\u30a4\u30e1\u30fc\u30b8\u306e\u5224\u8aad\u53ef\u80fd\u306a\u6587\u5b57\u5217\u8868\u73fe\u3092\u53d6\u5f97\u3057\u307e\u3059\u3002\"\"\"\n ...\n\n def __add__(self, other: Image) -> Image:\n \"\"\"\uff12\u3064\u306e\u30a4\u30e1\u30fc\u30b8\u306e\u5404\u30d4\u30af\u30bb\u30eb\u306e\u660e\u308b\u3055\u3092\u8db3\u3057\u305f\u65b0\u3057\u3044\u30a4\u30e1\u30fc\u30b8\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002\n\nExample: ``Image.HEART + Image.HAPPY``\n\n:param other: \u52a0\u7b97\u3059\u308b\u30a4\u30e1\u30fc\u30b8\u3002\"\"\"\n ...\n\n def __sub__(self, other: Image) -> Image:\n \"\"\"\u3053\u306e\u30a4\u30e1\u30fc\u30b8\u304b\u3089\u4ed6\u306e\u30a4\u30e1\u30fc\u30b8\u306e\u660e\u308b\u3055\u306e\u5024\u3092\u5f15\u3044\u305f\u65b0\u3057\u3044\u30a4\u30e1\u30fc\u30b8\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002\n\nExample: ``Image.HEART - Image.HEART_SMALL``\n\n:param other: \u6e1b\u7b97\u3059\u308b\u30a4\u30e1\u30fc\u30b8\u3002\"\"\"\n ...\n\n def __mul__(self, n: float) -> Image:\n \"\"\"\u5404\u30d4\u30af\u30bb\u30eb\u306e\u660e\u308b\u3055\u3092 ``n`` \u500d\u3057\u305f\u65b0\u3057\u3044\u30a4\u30e1\u30fc\u30b8\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002\n\nExample: ``Image.HEART * 0.5``\n\n:param n: \u4e57\u7b97\u3059\u308b\u5024\u3002\"\"\"\n ...\n\n def __truediv__(self, n: float) -> Image:\n \"\"\"\u5404\u30d4\u30af\u30bb\u30eb\u306e\u660e\u308b\u3055\u3092 ``n`` \u3067\u5272\u3063\u305f\u65b0\u3057\u3044\u30a4\u30e1\u30fc\u30b8\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002\n\nExample: ``Image.HEART / 2``\n\n:param n: \u9664\u7b97\u3059\u308b\u5024\u3002\"\"\"\n ...\n\nclass SoundEvent:\n LOUD: SoundEvent\n \"\"\"\u62cd\u624b\u3084\u53eb\u3073\u58f0\u306a\u3069\u3067 ``quiet`` \u304b\u3089 ``loud`` \u3078\u306e\u30b5\u30a6\u30f3\u30c9\u30a4\u30d9\u30f3\u30c8\u306e\u5909\u5316\u3092\u8868\u3057\u307e\u3059\u3002\"\"\"\n QUIET: SoundEvent\n \"\"\"\u767a\u8a71\u3084BGM\u306a\u3069\u3067 ``loud`` \u304b\u3089 ``quiet`` \u3078\u306e\u30b5\u30a6\u30f3\u30c9\u30a4\u30d9\u30f3\u30c8\u306e\u5909\u5316\u3092\u8868\u3057\u307e\u3059\u3002\"\"\"\n\nclass Sound:\n \"\"\"\u5185\u8535\u306e\u30b5\u30a6\u30f3\u30c9\u306f ``audio.play(Sound.NAME)`` \u3067\u547c\u3073\u51fa\u3059\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\"\"\"\n GIGGLE: Sound\n \"\"\"\u300c\u304f\u3059\u304f\u3059\u7b11\u3046\u300d\u30b5\u30a6\u30f3\u30c9\u3002\"\"\"\n HAPPY: Sound\n \"\"\"\u300c\u30cf\u30c3\u30d4\u30fc\u300d\u30b5\u30a6\u30f3\u30c9\u3002\"\"\"\n HELLO: Sound\n \"\"\"\u300c\u30cf\u30ed\u30fc\u300d\u30b5\u30a6\u30f3\u30c9\"\"\"\n MYSTERIOUS: Sound\n \"\"\"\u300c\u30df\u30b9\u30c6\u30ea\u30a2\u30b9\u300d\u30b5\u30a6\u30f3\u30c9\u3002\"\"\"\n SAD: Sound\n \"\"\"\u300c\u60b2\u3057\u3044\u300d\u30b5\u30a6\u30f3\u30c9\u3002\"\"\"\n SLIDE: Sound\n \"\"\"\u300c\u3059\u308b\u3059\u308b\u52d5\u304f\u300d\u30b5\u30a6\u30f3\u30c9\u3002\"\"\"\n SOARING: Sound\n \"\"\"\u300c\u821e\u3044\u4e0a\u304c\u308b\u300d\u30b5\u30a6\u30f3\u30c9\u3002\"\"\"\n SPRING: Sound\n \"\"\"\u300c\u30d0\u30cd\u300d\u30b5\u30a6\u30f3\u30c9\u3002\"\"\"\n TWINKLE: Sound\n \"\"\"\u300c\u30ad\u30e9\u30ad\u30e9\u300d\u30b5\u30a6\u30f3\u30c9\u3002\"\"\"\n YAWN: Sound\n \"\"\"\u300c\u3042\u304f\u3073\u300d\u30b5\u30a6\u30f3\u30c9\u3002\"\"\"", "/typeshed/stdlib/microbit/accelerometer.pyi": "\"\"\"micro:bit\u306e\u52a0\u901f\u5ea6\u6e2c\u5b9a\u3068\u30b8\u30a7\u30b9\u30c1\u30e3\u30fc\u8a8d\u8b58\u3092\u3057\u307e\u3059\u3002\"\"\"\nfrom typing import Tuple\n\ndef get_x() -> int:\n \"\"\"``x`` \u8ef8\u306e\u52a0\u901f\u5ea6\u6e2c\u5b9a\u5024\u3092\u30df\u30eag\u5358\u4f4d\u3067\u53d6\u5f97\u3057\u307e\u3059\u3002\n\nExample: ``accelerometer.get_x()``\n\n:return: A positive or negative integer depending on direction in the range +/- 2000mg.\"\"\"\n ...\n\ndef get_y() -> int:\n \"\"\"``y`` \u8ef8\u306e\u52a0\u901f\u5ea6\u6e2c\u5b9a\u5024\u3092\u30df\u30eag\u5358\u4f4d\u3067\u53d6\u5f97\u3057\u307e\u3059\u3002\n\nExample: ``accelerometer.get_y()``\n\n:return: A positive or negative integer depending on direction in the range +/- 2000mg.\"\"\"\n ...\n\ndef get_z() -> int:\n \"\"\"``z`` \u8ef8\u306e\u52a0\u901f\u5ea6\u6e2c\u5b9a\u5024\u3092\u30df\u30eag\u5358\u4f4d\u3067\u53d6\u5f97\u3057\u307e\u3059\u3002\n\nExample: ``accelerometer.get_z()``\n\n:return: A positive or negative integer depending on direction in the range +/- 2000mg.\"\"\"\n ...\n\ndef get_values() -> Tuple[int, int, int]:\n \"\"\"\u3059\u3079\u3066\u306e\u8ef8\u306e\u52a0\u901f\u5ea6\u6e2c\u5b9a\u5024\u3092\u30bf\u30d7\u30eb\u3068\u3057\u3066\u4e00\u5ea6\u306b\u53d6\u5f97\u3057\u307e\u3059\u3002\n\nExample: ``x, y, z = accelerometer.get_values()``\n\n:return: a three-element tuple of integers ordered as X, Y, Z, each value a positive or negative integer depending on direction in the range +/- 2000mg\"\"\"\n ...\n\ndef get_strength() -> int:\n \"\"\"\u3059\u3079\u3066\u306e\u8ef8\u3092\u5408\u6210\u3057\u305f\u52a0\u901f\u5ea6\u6e2c\u5b9a\u5024\u3092\u6b63\u306e\u6574\u6570\u5024\u3067\u5f97\u307e\u3059\u3002\u3053\u308c\u306f X\u8ef8\u3001Y\u8ef8\u3001Z\u8ef8\u306e\u30d4\u30bf\u30b4\u30e9\u30b9\u548c\u306b\u306a\u308a\u307e\u3059\u3002\n\nExample: ``accelerometer.get_strength()``\n\n:return: The combined acceleration strength of all the axes, in milli-g.\"\"\"\n ...\n\ndef current_gesture() -> str:\n \"\"\"\u73fe\u5728\u306e\u30b8\u30a7\u30b9\u30c1\u30e3\u30fc\u306e\u540d\u524d\u3092\u53d6\u5f97\u3057\u307e\u3059\u3002\n\nExample: ``accelerometer.current_gesture()``\n\nMicroPython understands the following gesture names: ``\"up\"``, ``\"down\"``,\n``\"left\"``, ``\"right\"``, ``\"face up\"``, ``\"face down\"``, ``\"freefall\"``,\n``\"3g\"``, ``\"6g\"``, ``\"8g\"``, ``\"shake\"``. Gestures are always\nrepresented as strings.\n\n:return: The current gesture\"\"\"\n ...\n\ndef is_gesture(name: str) -> bool:\n \"\"\"\u6307\u5b9a\u3057\u305f\u540d\u524d\u306e\u30b8\u30a7\u30b9\u30c1\u30e3\u30fc\u304c\u73fe\u5728\u30a2\u30af\u30c6\u30a3\u30d6\u3067\u3042\u308b\u304b\u3069\u3046\u304b\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002\n\nExample: ``accelerometer.is_gesture('shake')``\n\nMicroPython understands the following gesture names: ``\"up\"``, ``\"down\"``,\n``\"left\"``, ``\"right\"``, ``\"face up\"``, ``\"face down\"``, ``\"freefall\"``,\n``\"3g\"``, ``\"6g\"``, ``\"8g\"``, ``\"shake\"``. Gestures are always\nrepresented as strings.\n\n:param name: \u30b8\u30a7\u30b9\u30c1\u30e3\u30fc\u540d\u3002\n:return: ``True`` if the gesture is active, ``False`` otherwise.\"\"\"\n ...\n\ndef was_gesture(name: str) -> bool:\n \"\"\"\u76f4\u524d\u306e\u547c\u3073\u51fa\u3057\u4ee5\u964d\u306b\u3001\u6307\u5b9a\u3057\u305f\u540d\u524d\u306e\u30b8\u30a7\u30b9\u30c1\u30e3\u30fc\u304c\u30a2\u30af\u30c6\u30a3\u30d6\u306b\u306a\u3063\u305f\u304b\u3069\u3046\u304b\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002\n\nExample: ``accelerometer.was_gesture('shake')``\n\nMicroPython understands the following gesture names: ``\"up\"``, ``\"down\"``,\n``\"left\"``, ``\"right\"``, ``\"face up\"``, ``\"face down\"``, ``\"freefall\"``,\n``\"3g\"``, ``\"6g\"``, ``\"8g\"``, ``\"shake\"``. Gestures are always\nrepresented as strings.\n\n:param name: \u30b8\u30a7\u30b9\u30c1\u30e3\u30fc\u540d\u3002\n:return: ``True`` if the gesture was active since the last call, ``False`` otherwise.\"\"\"\n\ndef get_gestures() -> Tuple[str, ...]:\n \"\"\"\u30b8\u30a7\u30b9\u30c1\u30e3\u30fc\u5c65\u6b74\u306e\u30bf\u30d7\u30eb\u3092\u8fd4\u3057\u307e\u3059\u3002\n\nExample: ``accelerometer.get_gestures()``\n\nClears the gesture history before returning.\n\nGestures are not updated in the background so there needs to be constant\ncalls to some accelerometer method to do the gesture detection. Usually\ngestures can be detected using a loop with a small :func:`microbit.sleep` delay.\n\n:return: The history as a tuple, most recent last.\"\"\"\n ...\n\ndef set_range(value: int) -> None:\n \"\"\"\u52a0\u901f\u5ea6\u30bb\u30f3\u30b5\u30fc\u306e\u611f\u5ea6\u7bc4\u56f2\u3092 g (\u6a19\u6e96\u91cd\u529b)\u3067\u8a2d\u5b9a\u3057\u307e\u3059\u3002\u8a2d\u5b9a\u5024\u306f\u3001\u30cf\u30fc\u30c9\u30a6\u30a7\u30a2\u304c\u30b5\u30dd\u30fc\u30c8\u3059\u308b\u6700\u3082\u8fd1\u3044\u5024\u3001\u3059\u306a\u308f\u3061 ``2``\u3001``4``\u3001``8`` g \u306e\u3044\u305a\u308c\u304b\u306b\u4e38\u3081\u3089\u308c\u307e\u3059\u3002\n\nExample: ``accelerometer.set_range(8)``\n\n:param value: \u52a0\u901f\u5ea6\u30bb\u30f3\u30b5\u30fc\u306e\u65b0\u3057\u3044\u611f\u5ea6\u7bc4\u56f2\u3002``g`` \u5358\u4f4d\u306e\u6574\u6570\u5024\u3067\u6307\u5b9a\u3057\u307e\u3059\u3002\"\"\"", "/typeshed/stdlib/microbit/audio.pyi": "\"\"\"micro:bit\u3067\u30b5\u30a6\u30f3\u30c9\u3092\u518d\u751f\u3057\u307e\u3059\uff08V1\u3068\u306e\u4e92\u63db\u306e\u305f\u3081\u306b ``audio`` \u3092\u30a4\u30f3\u30dd\u30fc\u30c8\u3057\u3066\u304f\u3060\u3055\u3044\uff09\u3002\"\"\"\nfrom ..microbit import MicroBitDigitalPin, Sound, pin0\nfrom typing import ClassVar, Iterable, Union\n\ndef play(source: Union[Iterable[AudioFrame], Sound, SoundEffect], wait: bool=True, pin: MicroBitDigitalPin=pin0, return_pin: Union[MicroBitDigitalPin, None]=None) -> None:\n \"\"\"\u5185\u8535\u30b5\u30a6\u30f3\u30c9\u3001\u30b5\u30a6\u30f3\u30c9\u52b9\u679c\u3001\u30ab\u30b9\u30bf\u30e0\u5316\u3057\u305f\u30aa\u30fc\u30c7\u30a3\u30aa\u30d5\u30ec\u30fc\u30e0\u306e\u3044\u305a\u308c\u304b\u3092\u518d\u751f\u3057\u307e\u3059\u3002\n\nExample: ``audio.play(Sound.GIGGLE)``\n\n:param source: ``Sound.GIGGLE`` \u306a\u3069\u306e\u5185\u8535\u306e``Sound``\u3001``SoundEffect``\u3001``AudioFrame`` \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u30a4\u30c6\u30e9\u30d6\u30eb\u3067\u3042\u308b\u30b5\u30f3\u30d7\u30eb\u30c7\u30fc\u30bf\u306e\u3044\u305a\u308c\u304b\u3002\n:param wait: ``wait`` \u304c ``True`` \u306e\u5834\u5408\u3001\u30b5\u30a6\u30f3\u30c9\u306e\u518d\u751f\u304c\u7d42\u308f\u308b\u307e\u3067\u3053\u306e\u95a2\u6570\u304c\u30d6\u30ed\u30c3\u30af\u3057\u307e\u3059\u3002\n:param pin: (\u30d4\u30f3) \u51fa\u529b\u7aef\u5b50\u3092\u30c7\u30d5\u30a9\u30eb\u30c8\u306e ``pin0`` \u304b\u3089\u5909\u3048\u308b\u305f\u3081\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u5f15\u6570\u3067\u3059\u3002\u97f3\u3092\u9cf4\u3089\u3057\u305f\u304f\u306a\u3044\u5834\u5408\u306f ``pin=None`` \u3092\u6307\u5b9a\u3057\u307e\u3059\u3002\n:param return_pin: \u30b0\u30e9\u30f3\u30c9\u3067\u306f\u306a\u304f\u5916\u90e8\u30b9\u30d4\u30fc\u30ab\u30fc\u306b\u63a5\u7d9a\u3059\u308b\u5dee\u52d5\u30a8\u30c3\u30b8\u30b3\u30cd\u30af\u30bf\u306e\u7aef\u5b50\n\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002**V2** \u3067\u306f\u3053\u306e\u6307\u5b9a\u3092\u7121\u8996\u3057\u307e\u3059\u3002\"\"\"\n\ndef is_playing() -> bool:\n \"\"\"\u30aa\u30fc\u30c7\u30a3\u30aa\u304c\u518d\u751f\u4e2d\u3067\u3042\u308b\u304b\u3069\u3046\u304b\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002\n\nExample: ``audio.is_playing()``\n\n:return: ``True`` if audio is playing, otherwise ``False``.\"\"\"\n ...\n\ndef stop() -> None:\n \"\"\"\u3059\u3079\u3066\u306e\u30aa\u30fc\u30c7\u30a3\u30aa\u518d\u751f\u3092\u505c\u6b62\u3057\u307e\u3059\u3002\n\nExample: ``audio.stop()``\"\"\"\n ...\n\nclass SoundEffect:\n \"\"\"\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u3084\u5c5e\u6027\u3067\u8a2d\u5b9a\u3057\u305f\u30d1\u30e9\u30e1\u30fc\u30bf\u306e\u30bb\u30c3\u30c8\u3067\u69cb\u6210\u3055\u308c\u308b\u30b5\u30a6\u30f3\u30c9\u52b9\u679c\u3002\"\"\"\n WAVEFORM_SINE: ClassVar[int]\n \"\"\"``waveform`` \u30d1\u30e9\u30e1\u30fc\u30bf\u306b\u6307\u5b9a\u3067\u304d\u308b\u300c\u30b5\u30a4\u30f3\u6ce2\u300d\u30aa\u30d7\u30b7\u30e7\u30f3\u3002\"\"\"\n WAVEFORM_SAWTOOTH: ClassVar[int]\n \"\"\"``waveform`` \u30d1\u30e9\u30e1\u30fc\u30bf\u306b\u6307\u5b9a\u3067\u304d\u308b\u300c\u306e\u3053\u304e\u308a\u6ce2\u300d\u30aa\u30d7\u30b7\u30e7\u30f3\u3002\"\"\"\n WAVEFORM_TRIANGLE: ClassVar[int]\n \"\"\"``waveform`` \u30d1\u30e9\u30e1\u30fc\u30bf\u306b\u6307\u5b9a\u3067\u304d\u308b\u300c\u4e09\u89d2\u6ce2\u300d\u30aa\u30d7\u30b7\u30e7\u30f3\u3002\"\"\"\n WAVEFORM_SQUARE: ClassVar[int]\n \"\"\"``waveform`` \u30d1\u30e9\u30e1\u30fc\u30bf\u306b\u6307\u5b9a\u3067\u304d\u308b\u300c\u65b9\u5f62\u6ce2\u300d\u30aa\u30d7\u30b7\u30e7\u30f3\u3002\"\"\"\n WAVEFORM_NOISE: ClassVar[int]\n \"\"\"``waveform`` \u30d1\u30e9\u30e1\u30fc\u30bf\u306b\u6307\u5b9a\u3067\u304d\u308b\u300c\u30ce\u30a4\u30ba\u300d\u30aa\u30d7\u30b7\u30e7\u30f3\u3002\"\"\"\n SHAPE_LINEAR: ClassVar[int]\n \"\"\"``shape`` \u30d1\u30e9\u30e1\u30fc\u30bf\u306b\u6307\u5b9a\u3067\u304d\u308b\u300c\u30ea\u30cb\u30a2\u88dc\u9593\u300d\u30aa\u30d7\u30b7\u30e7\u30f3\u3002\"\"\"\n SHAPE_CURVE: ClassVar[int]\n \"\"\"``shape`` \u30d1\u30e9\u30e1\u30fc\u30bf\u306b\u6307\u5b9a\u3067\u304d\u308b\u300c\u30ab\u30fc\u30d6\u88dc\u9593\u300d\u30aa\u30d7\u30b7\u30e7\u30f3\u3002\"\"\"\n SHAPE_LOG: ClassVar[int]\n \"\"\"``shape`` \u30d1\u30e9\u30e1\u30fc\u30bf\u306b\u6307\u5b9a\u3067\u304d\u308b\u300c\u5bfe\u6570\u88dc\u9593\u300d\u30aa\u30d7\u30b7\u30e7\u30f3\u3002\"\"\"\n FX_NONE: ClassVar[int]\n \"\"\"``fx`` \u30d1\u30e9\u30e1\u30fc\u30bf\u306b\u6307\u5b9a\u3067\u304d\u308b\u300c\u52b9\u679c\u306a\u3057\u300d\u30aa\u30d7\u30b7\u30e7\u30f3\u3002\"\"\"\n FX_TREMOLO: ClassVar[int]\n \"\"\"``fx`` \u30d1\u30e9\u30e1\u30fc\u30bf\u306b\u6307\u5b9a\u3067\u304d\u308b\u300c\u30c8\u30ec\u30e2\u30ed\u52b9\u679c\u300d\u30aa\u30d7\u30b7\u30e7\u30f3\u3002\"\"\"\n FX_VIBRATO: ClassVar[int]\n \"\"\"``fx`` \u30d1\u30e9\u30e1\u30fc\u30bf\u306b\u6307\u5b9a\u3067\u304d\u308b\u300c\u30d3\u30d6\u30e9\u30fc\u30c8\u52b9\u679c\u300d\u30aa\u30d7\u30b7\u30e7\u30f3\u3002\"\"\"\n FX_WARBLE: ClassVar[int]\n \"\"\"``fx`` \u30d1\u30e9\u30e1\u30fc\u30bf\u306b\u6307\u5b9a\u3067\u304d\u308b\u300c\u3055\u3048\u305a\u308a\u52b9\u679c\u300d\u30aa\u30d7\u30b7\u30e7\u30f3\u3002\"\"\"\n freq_start: int\n \"\"\"\u958b\u59cb\u5468\u6ce2\u6570\u3002\u5358\u4f4d\u306f\u30d8\u30eb\u30c4(Hz)\u3067\u3001``0``\u304b\u3089``9999``\u306e\u7bc4\u56f2\u306e\u6570\u5024\u3067\u3059\u3002\"\"\"\n freq_end: int\n \"\"\"\u7d42\u4e86\u5468\u6ce2\u6570\u3002\u5358\u4f4d\u306f\u30d8\u30eb\u30c4(Hz)\u3067\u3001``0``\u304b\u3089``9999``\u306e\u7bc4\u56f2\u306e\u6570\u5024\u3067\u3059\u3002\"\"\"\n duration: int\n \"\"\"\u30b5\u30a6\u30f3\u30c9\u306e\u9577\u3055\u3002``0`` \u304b\u3089``9999``\u306e\u7bc4\u56f2\u306e\u6570\u5024\u3067\u3059\u3002\"\"\"\n vol_start: int\n \"\"\"\u958b\u59cb\u97f3\u91cf\u3002``0``\u304b\u3089``255``\u306e\u7bc4\u56f2\u306e\u6570\u5024\u3067\u3059\u3002\"\"\"\n vol_end: int\n \"\"\"\u7d42\u4e86\u97f3\u91cf\u3002``0``\u304b\u3089``255``\u306e\u7bc4\u56f2\u306e\u6570\u5024\u3067\u3059\u3002\"\"\"\n waveform: int\n \"\"\"\u6ce2\u5f62\u306e\u7a2e\u985e\u3002\u6b21\u306e\u5024\u306e\u3044\u305a\u308c\u304b: ``WAVEFORM_SINE``\u3001 ``WAVEFORM_SAWTOOTH``\u3001``WAVEFORM_TRIANGLE``\u3001 ``WAVEFORM_SQUARE``\u3001``WAVEFORM_NOISE`` (\u30e9\u30f3\u30c0\u30e0\u306b\u751f\u6210\u3057\u305f\u30ce\u30a4\u30ba)\"\"\"\n fx: int\n \"\"\"\u30b5\u30a6\u30f3\u30c9\u306b\u8ffd\u52a0\u3059\u308b\u52b9\u679c\u3002\u6b21\u306e\u5024\u306e\u3044\u305a\u308c\u304b: ``FX_TREMOLO``\u3001``FX_VIBRATO``\u3001``FX_WARBLE``\u3001``FX_NONE``\"\"\"\n shape: int\n \"\"\"\u958b\u59cb\u5468\u6ce2\u6570\u3068\u7d42\u4e86\u5468\u6ce2\u6570\u306e\u88dc\u9593\u66f2\u7dda\u306e\u7a2e\u985e\u3067\u3001\u6ce2\u5f62\u306e\u9055\u3044\u306b\u3088\u308a\u5468\u6ce2\u6570\u306e\u5909\u5316\u7387\u304c\u7570\u306a\u308a\u307e\u3059\u3002\u6b21\u306e\u5024\u306e\u3046\u3061\u306e\u3044\u305a\u308c\u304b: ``SHAPE_LINEAR``\u3001``SHAPE_CURVE``\u3001``SHAPE_LOG``\"\"\"\n\n def __init__(self, freq_start: int=500, freq_end: int=2500, duration: int=500, vol_start: int=255, vol_end: int=0, waveform: int=WAVEFORM_SQUARE, fx: int=FX_NONE, shape: int=SHAPE_LOG):\n \"\"\"\u65b0\u3057\u3044\u30b5\u30a6\u30f3\u30c9\u52b9\u679c\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002\n\nExample: ``my_effect = SoundEffect(duration=1000)``\n\nAll the parameters are optional, with default values as shown above, and\nthey can all be modified via attributes of the same name. For example, we\ncan first create an effect ``my_effect = SoundEffect(duration=1000)``,\nand then change its attributes ``my_effect.duration = 500``.\n\n:param freq_start: \u958b\u59cb\u5468\u6ce2\u6570\u3002\u5358\u4f4d\u306f\u30d8\u30eb\u30c4(Hz)\u3067\u3001``0``\u304b\u3089``9999``\u306e\u7bc4\u56f2\u306e\u6570\u5024\u3067\u3059\u3002\n:param freq_end: \u7d42\u4e86\u5468\u6ce2\u6570\u3002\u5358\u4f4d\u306f\u30d8\u30eb\u30c4(Hz)\u3067\u3001``0``\u304b\u3089``9999``\u306e\u7bc4\u56f2\u306e\u6570\u5024\u3067\u3059\u3002\n:param duration: \u30b5\u30a6\u30f3\u30c9\u306e\u9577\u3055\u3002\u5358\u4f4d\u306f\u30df\u30ea\u79d2\u3067\u3001``0`` \u304b\u3089``9999``\u306e\u7bc4\u56f2\u306e\u6570\u5024\u3067\u3059\u3002\n:param vol_start: \u958b\u59cb\u97f3\u91cf\u3002``0``\u304b\u3089``255``\u306e\u7bc4\u56f2\u306e\u6570\u5024\u3067\u3059\u3002\n:param vol_end: \u7d42\u4e86\u97f3\u91cf\u3002``0``\u304b\u3089``255``\u306e\u7bc4\u56f2\u306e\u6570\u5024\u3067\u3059\u3002\n:param waveform: \u6ce2\u5f62\u306e\u7a2e\u985e\u3002\u6b21\u306e\u5024\u306e\u3044\u305a\u308c\u304b: ``WAVEFORM_SINE``\u3001 ``WAVEFORM_SAWTOOTH``\u3001``WAVEFORM_TRIANGLE``\u3001 ``WAVEFORM_SQUARE``\u3001``WAVEFORM_NOISE`` (\u30e9\u30f3\u30c0\u30e0\u306b\u751f\u6210\u3057\u305f\u30ce\u30a4\u30ba)\u3002\n:param fx: \u30b5\u30a6\u30f3\u30c9\u306b\u8ffd\u52a0\u3059\u308b\u52b9\u679c\u3002\u6b21\u306e\u5024\u306e\u3044\u305a\u308c\u304b: ``FX_TREMOLO``\u3001``FX_VIBRATO``\u3001``FX_WARBLE``\u3001``FX_NONE``\n:param shape: \u958b\u59cb\u5468\u6ce2\u6570\u3068\u7d42\u4e86\u5468\u6ce2\u6570\u306e\u88dc\u9593\u66f2\u7dda\u306e\u7a2e\u985e\u3067\u3001\u6ce2\u5f62\u306e\u9055\u3044\u306b\u3088\u308a\u5468\u6ce2\u6570\u306e\u5909\u5316\u7387\u304c\u7570\u306a\u308a\u307e\u3059\u3002\u6b21\u306e\u5024\u306e\u3046\u3061\u306e\u3044\u305a\u308c\u304b: ``SHAPE_LINEAR``\u3001``SHAPE_CURVE``\u3001``SHAPE_LOG``\"\"\"\n\n def copy(self) -> SoundEffect:\n \"\"\"\u3053\u306e ``SoundEffect`` \u306e\u30b3\u30d4\u30fc\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002\n\nExample: ``sound_2 = sound_1.copy()``\n\n:return: A copy of the SoundEffect.\"\"\"\n\nclass AudioFrame:\n \"\"\"``AudioFrame`` \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306f32\u500b\u306e\u30b5\u30f3\u30d7\u30eb\u304b\u3089\u306a\u308b\u30ea\u30b9\u30c8\u3067\u3059\u3002\u305d\u308c\u305e\u306e\u30b5\u30f3\u30d7\u30eb\u306f\u7b26\u53f7\u306a\u3057\u30d0\u30a4\u30c8\uff080\u301c255\u306e\u6574\u6570\uff09\u3067\u3059\u3002\n\nIt takes just over 4 ms to play a single frame.\n\nExample::\n\n frame = AudioFrame()\n for i in range(len(frame)):\n frame[i] = 252 - i * 8\"\"\"\n\n def copyfrom(self, other: AudioFrame) -> None:\n \"\"\"\u3053\u306e ``AudioFrame`` \u306e\u30c7\u30fc\u30bf\u3092\u3001\u5225\u306e ``AudioFrame`` \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u30c7\u30fc\u30bf\u3067\u4e0a\u66f8\u304d\u3057\u307e\u3059\u3002\n\nExample: ``my_frame.copyfrom(source_frame)``\n\n:param other: \u30b3\u30d4\u30fc\u3059\u308b\u30c7\u30fc\u30bf\u3092\u6301\u3064 ``AudioFrame`` \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3002\"\"\"\n\n def __len__(self) -> int:\n ...\n\n def __setitem__(self, key: int, value: int) -> None:\n ...\n\n def __getitem__(self, key: int) -> int:\n ...", @@ -46,6 +45,7 @@ "/typeshed/stdlib/microbit/speaker.pyi": "\"\"\"\u5185\u8535\u30b9\u30d4\u30fc\u30ab\u30fc\u3092\u5236\u5fa1\u3057\u307e\u3059\uff08V2\u306e\u307f\uff09\u3002\"\"\"\n\ndef off() -> None:\n \"\"\"\u30b9\u30d4\u30fc\u30ab\u30fc\u3092\u30aa\u30d5\u306b\u3057\u307e\u3059\u3002\n\nExample: ``speaker.off()``\n\nThis does not disable sound output to an edge connector pin.\"\"\"\n ...\n\ndef on() -> None:\n \"\"\"\u30b9\u30d4\u30fc\u30ab\u30fc\u3092\u30aa\u30f3\u306b\u3057\u307e\u3059\u3002\n\nExample: ``speaker.on()``\"\"\"\n ...", "/typeshed/stdlib/microbit/spi.pyi": "\"\"\"\u30b7\u30ea\u30a2\u30eb\u30da\u30ea\u30d5\u30a7\u30e9\u30eb\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30a4\u30b9\uff08SPI\uff09\u30d0\u30b9\u3092\u4f7f\u3063\u3066\u30c7\u30d0\u30a4\u30b9\u3068\u901a\u4fe1\u3057\u307e\u3059\u3002\"\"\"\nfrom _typeshed import ReadableBuffer, WriteableBuffer\nfrom ..microbit import pin13, pin14, pin15, MicroBitDigitalPin\n\ndef init(baudrate: int=1000000, bits: int=8, mode: int=0, sclk: MicroBitDigitalPin=pin13, mosi: MicroBitDigitalPin=pin15, miso: MicroBitDigitalPin=pin14) -> None:\n \"\"\"SPI\u901a\u4fe1\u3092\u521d\u671f\u5316\u3057\u307e\u3059\u3002\n\nExample: ``spi.init()``\n\nFor correct communication, the parameters have to be the same on both communicating devices.\n\n:param baudrate: \u901a\u4fe1\u901f\u5ea6\u3002\n:param bits: \u9001\u4fe1\u6642\u306e\u30d3\u30c3\u30c8\u5e45\u3002\u73fe\u5728\u306e\u3068\u3053\u308d\u306f ``bits=8`` \u3060\u3051\u3092\u30b5\u30dd\u30fc\u30c8\u3002\u3057\u304b\u3057\u3001\u3053\u308c\u306f\u5c06\u6765\u7684\u306b\u5909\u66f4\u3059\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002\n:param mode: \u30af\u30ed\u30c3\u30af\u306e\u6975\u6027\u3068\u4f4d\u76f8\u306e\u7d44\u307f\u5408\u308f\u305b\u3092\u6c7a\u5b9a\u3057\u307e\u3059 - `\u30aa\u30f3\u30e9\u30a4\u30f3\u306e\u8868\u3092\u53c2\u7167 `_ \u3002\n:param sclk: sclk \u7aef\u5b50\uff08\u30c7\u30d5\u30a9\u30eb\u30c8\u306f 13\uff09\n:param mosi: mosi \u7aef\u5b50\uff08\u30c7\u30d5\u30a9\u30eb\u30c8\u306f 15\uff09\n:param miso: miso \u7aef\u5b50\uff08\u30c7\u30d5\u30a9\u30eb\u30c8\u306f 14\uff09\"\"\"\n ...\n\ndef read(nbytes: int) -> bytes:\n \"\"\"\u30d0\u30a4\u30c8\u5217\u3092\u8aad\u307f\u53d6\u308a\u307e\u3059\u3002\n\nExample: ``spi.read(64)``\n\n:param nbytes: \u8aad\u307f\u53d6\u308b\u6700\u5927\u30d0\u30a4\u30c8\u6570\u3002\n:return: The bytes read.\"\"\"\n ...\n\ndef write(buffer: ReadableBuffer) -> None:\n \"\"\"\u30c7\u30d0\u30a4\u30b9\u306b\u30d0\u30a4\u30c8\u5217\u3092\u66f8\u304d\u8fbc\u307f\u307e\u3059\u3002\n\nExample: ``spi.write(bytes([1, 2, 3]))``\n\n:param buffer: \u30c7\u30fc\u30bf\u306e\u8aad\u307f\u53d6\u308a\u5143\u306e\u30d0\u30c3\u30d5\u30a1\u3002\"\"\"\n ...\n\ndef write_readinto(out: WriteableBuffer, in_: ReadableBuffer) -> None:\n \"\"\"``out`` \u30d0\u30c3\u30d5\u30a1\u3092\u30d0\u30b9\u306b\u66f8\u304d\u8fbc\u307f\u3001\u4efb\u610f\u306e\u30ec\u30b9\u30dd\u30f3\u30b9\u3092 ``in_`` \u30d0\u30c3\u30d5\u30a1\u306b\u8aad\u307f\u53d6\u308a\u307e\u3059\u3002\n\nExample: ``spi.write_readinto(out_buffer, in_buffer)``\n\nThe length of the buffers should be the same. The buffers can be the same object.\n\n:param out: \u30ec\u30b9\u30dd\u30f3\u30b9\u306e\u66f8\u304d\u8fbc\u307f\u30d0\u30c3\u30d5\u30a1\u3002\n:param in_: \u30c7\u30fc\u30bf\u306e\u8aad\u307f\u53d6\u308a\u5143\u306e\u30d0\u30c3\u30d5\u30a1\u3002\"\"\"\n ...", "/typeshed/stdlib/microbit/uart.pyi": "\"\"\"\u30b7\u30ea\u30a2\u30eb\u30a4\u30f3\u30bf\u30d5\u30a7\u30fc\u30b9\u3092\u4f7f\u3063\u3066\u30c7\u30d0\u30a4\u30b9\u3068\u901a\u4fe1\u3057\u307e\u3059\u3002\"\"\"\nfrom _typeshed import WriteableBuffer\nfrom ..microbit import MicroBitDigitalPin\nfrom typing import Optional, Union\nODD: int\n\"\"\"\u5947\u6570\u30d1\u30ea\u30c6\u30a3\"\"\"\nEVEN: int\n\"\"\"\u5076\u6570\u30d1\u30ea\u30c6\u30a3\"\"\"\n\ndef init(baudrate: int=9600, bits: int=8, parity: Optional[int]=None, stop: int=1, tx: Optional[MicroBitDigitalPin]=None, rx: Optional[MicroBitDigitalPin]=None) -> None:\n \"\"\"\u30b7\u30ea\u30a2\u30eb\u901a\u4fe1\u3092\u521d\u671f\u5316\u3057\u307e\u3059\u3002\n\nExample: ``uart.init(115200, tx=pin0, rx=pin1)``\n\n:param baudrate: \u901a\u4fe1\u901f\u5ea6\u3002\n:param bits: \u9001\u4fe1\u3059\u308b\u30d3\u30c3\u30c8\u5e45\u3002micro:bit\u306f8\u3060\u3051\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u3044\u307e\u3059\u3002\n:param parity: \u30d1\u30ea\u30c6\u30a3\u306e\u30c1\u30a7\u30c3\u30af\u65b9\u6cd5\u3002``None``\u3001``uart.ODD``\u3001``uart.EVEN`` \u306e\u3044\u305a\u308c\u304b\u3092\u6307\u5b9a\u3067\u304d\u307e\u3059\u3002\n:param stop: \u30b9\u30c8\u30c3\u30d7\u30d3\u30c3\u30c8\u306e\u6570\u306fmicro:bit\u3067\u306f1\u306b\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\n:param tx: \u9001\u4fe1\u7aef\u5b50\u3002\n:param rx: \u53d7\u4fe1\u7aef\u5b50\u3002\n\nInitializing the UART on external pins will cause the Python console on\nUSB to become unaccessible, as it uses the same hardware. To bring the\nconsole back you must reinitialize the UART without passing anything for\n``tx`` or ``rx`` (or passing ``None`` to these arguments). This means\nthat calling ``uart.init(115200)`` is enough to restore the Python console.\n\nFor more details see `the online documentation `_.\"\"\"\n ...\n\ndef any() -> bool:\n \"\"\"\u53d7\u4fe1\u5f85\u3061\u306e\u30c7\u30fc\u30bf\u304c\u3042\u308b\u304b\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002\n\nExample: ``uart.any()``\n\n:return: ``True`` if any data is waiting, else ``False``.\"\"\"\n ...\n\ndef read(nbytes: Optional[int]=None) -> Optional[bytes]:\n \"\"\"\u30d0\u30a4\u30c8\u5217\u3092\u8aad\u307f\u53d6\u308a\u307e\u3059\u3002\n\nExample: ``uart.read()``\n\n:param nbytes: ``nbytes`` \u304c\u6307\u5b9a\u3055\u308c\u3066\u3044\u308c\u3070\u3001\u305d\u306e\u30d0\u30a4\u30c8\u6570\u307e\u3067\u8aad\u307f\u8fbc\u307f\u307e\u3059\u3002\u6307\u5b9a\u3055\u308c\u3066\u3044\u306a\u3051\u308c\u3070\u3001\u3067\u304d\u308b\u3060\u3051\u591a\u304f\u8aad\u307f\u53d6\u308a\u307e\u3059\n:return: A bytes object or ``None`` on timeout\"\"\"\n ...\n\ndef readinto(buf: WriteableBuffer, nbytes: Optional[int]=None) -> Optional[int]:\n \"\"\"``buf`` \u306b\u30d0\u30a4\u30c8\u5217\u3092\u8aad\u307f\u53d6\u308a\u307e\u3059\u3002\n\nExample: ``uart.readinto(input_buffer)``\n\n:param buf: \u66f8\u304d\u8fbc\u307f\u30d0\u30c3\u30d5\u30a1\u3002\n:param nbytes: ``nbytes`` \u304c\u6307\u5b9a\u3055\u308c\u3066\u3044\u308c\u3070\u3001\u305d\u306e\u30d0\u30a4\u30c8\u6570\u307e\u3067\u8aad\u307f\u8fbc\u307f\u307e\u3059\u3002\u6307\u5b9a\u3055\u308c\u3066\u3044\u306a\u3051\u308c\u3070\u3001``len(buf)`` \u3092\u8aad\u307f\u53d6\u308a\u307e\u3059\u3002\n:return: number of bytes read and stored into ``buf`` or ``None`` on timeout.\"\"\"\n ...\n\ndef readline() -> Optional[bytes]:\n \"\"\"\u6539\u884c\u6587\u5b57\u3067\u7d42\u308f\u308b\u884c\u3092\u8aad\u307f\u307e\u3059\u3002\n\nExample: ``uart.readline()``\n\n:return: The line read or ``None`` on timeout. The newline character is included in the returned bytes.\"\"\"\n ...\n\ndef write(buf: Union[bytes, str]) -> Optional[int]:\n \"\"\"\u30d0\u30b9\u306b\u30d0\u30c3\u30d5\u30a1\u3092\u66f8\u304d\u8fbc\u307f\u307e\u3059\u3002\n\nExample: ``uart.write('hello world')``\n\n:param buf: \u30d0\u30a4\u30c8\u5217\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u307e\u305f\u306f\u6587\u5b57\u5217\u3002\n:return: The number of bytes written, or ``None`` on timeout.\n\nExamples::\n\n uart.write('hello world')\n uart.write(b'hello world')\n uart.write(bytes([1, 2, 3]))\"\"\"\n ...", + "/typeshed/stdlib/collections/__init__.pyi": "import sys\nfrom typing import (\n Any,\n Dict,\n Generic,\n ItemsView,\n Iterable,\n Iterator,\n KeysView,\n Optional,\n Reversible,\n Tuple,\n Type,\n TypeVar,\n Union,\n ValuesView,\n)\n\n_S = TypeVar(\"_S\")\n_T = TypeVar(\"_T\")\n_KT = TypeVar(\"_KT\")\n_VT = TypeVar(\"_VT\")\n\nif sys.version_info >= (3, 7):\n def namedtuple(\n typename: str,\n field_names: Union[str, Iterable[str]],\n *,\n rename: bool = ...,\n module: Optional[str] = ...,\n defaults: Optional[Iterable[Any]] = ...,\n ) -> Type[Tuple[Any, ...]]: ...\n\nelse:\n def namedtuple(\n typename: str,\n field_names: Union[str, Iterable[str]],\n *,\n verbose: bool = ...,\n rename: bool = ...,\n module: Optional[str] = ...,\n ) -> Type[Tuple[Any, ...]]: ...\n\nclass _OrderedDictKeysView(KeysView[_KT], Reversible[_KT]):\n def __reversed__(self) -> Iterator[_KT]: ...\n\nclass _OrderedDictItemsView(ItemsView[_KT, _VT], Reversible[Tuple[_KT, _VT]]):\n def __reversed__(self) -> Iterator[Tuple[_KT, _VT]]: ...\n\nclass _OrderedDictValuesView(ValuesView[_VT], Reversible[_VT]):\n def __reversed__(self) -> Iterator[_VT]: ...\n\nclass OrderedDict(Dict[_KT, _VT], Reversible[_KT], Generic[_KT, _VT]):\n def popitem(self, last: bool = ...) -> Tuple[_KT, _VT]: ...\n def move_to_end(self, key: _KT, last: bool = ...) -> None: ...\n def copy(self: _S) -> _S: ...\n def __reversed__(self) -> Iterator[_KT]: ...\n def keys(self) -> _OrderedDictKeysView[_KT]: ...\n def items(self) -> _OrderedDictItemsView[_KT, _VT]: ...\n def values(self) -> _OrderedDictValuesView[_VT]: ...\n", "/src/pyrightconfig.json": "{ \n \"pythonVersion\": \"3.6\",\n \"pythonPlatform\": \"Linux\",\n \"typeCheckingMode\": \"basic\",\n \"typeshedPath\": \"/typeshed/\",\n \"reportMissingModuleSource\": false,\n \"reportWildcardImportFromLibrary\": false,\n \"verboseOutput\": true\n }\n" } } \ No newline at end of file diff --git a/src/micropython/main/typeshed.ko.json b/src/micropython/main/typeshed.ko.json index c0267a0ec..ba05ad0fb 100644 --- a/src/micropython/main/typeshed.ko.json +++ b/src/micropython/main/typeshed.ko.json @@ -35,7 +35,6 @@ "/typeshed/stdlib/usys.pyi": "from sys import *\n", "/typeshed/stdlib/utime.pyi": "from time import *\n", "/typeshed/stdlib/_typeshed/__init__.pyi": "# Utility types for typeshed\n#\n# See the README.md file in this directory for more information.\n\nimport array\nimport sys\nfrom os import PathLike\nfrom typing import AbstractSet, Any, Container, Iterable, Protocol, Tuple, TypeVar, Union\nfrom typing_extensions import Literal, final\n\n_KT = TypeVar(\"_KT\")\n_KT_co = TypeVar(\"_KT_co\", covariant=True)\n_KT_contra = TypeVar(\"_KT_contra\", contravariant=True)\n_VT = TypeVar(\"_VT\")\n_VT_co = TypeVar(\"_VT_co\", covariant=True)\n_T = TypeVar(\"_T\")\n_T_co = TypeVar(\"_T_co\", covariant=True)\n_T_contra = TypeVar(\"_T_contra\", contravariant=True)\n\n# Use for \"self\" annotations:\n# def __enter__(self: Self) -> Self: ...\nSelf = TypeVar(\"Self\") # noqa Y001\n\n# stable\nclass IdentityFunction(Protocol):\n def __call__(self, __x: _T) -> _T: ...\n\nclass SupportsLessThan(Protocol):\n def __lt__(self, __other: Any) -> bool: ...\n\nSupportsLessThanT = TypeVar(\"SupportsLessThanT\", bound=SupportsLessThan) # noqa: Y001\n\nclass SupportsDivMod(Protocol[_T_contra, _T_co]):\n def __divmod__(self, __other: _T_contra) -> _T_co: ...\n\nclass SupportsRDivMod(Protocol[_T_contra, _T_co]):\n def __rdivmod__(self, __other: _T_contra) -> _T_co: ...\n\nclass SupportsLenAndGetItem(Protocol[_T_co]):\n def __len__(self) -> int: ...\n def __getitem__(self, __k: int) -> _T_co: ...\n\n# Mapping-like protocols\n\n# stable\nclass SupportsItems(Protocol[_KT_co, _VT_co]):\n def items(self) -> AbstractSet[Tuple[_KT_co, _VT_co]]: ...\n\n# stable\nclass SupportsKeysAndGetItem(Protocol[_KT, _VT_co]):\n def keys(self) -> Iterable[_KT]: ...\n def __getitem__(self, __k: _KT) -> _VT_co: ...\n\n# stable\nclass SupportsGetItem(Container[_KT_contra], Protocol[_KT_contra, _VT_co]):\n def __getitem__(self, __k: _KT_contra) -> _VT_co: ...\n\n# stable\nclass SupportsItemAccess(SupportsGetItem[_KT_contra, _VT], Protocol[_KT_contra, _VT]):\n def __setitem__(self, __k: _KT_contra, __v: _VT) -> None: ...\n def __delitem__(self, __v: _KT_contra) -> None: ...\n\n# These aliases are simple strings in Python 2.\nStrPath = Union[str, PathLike[str]] # stable\nBytesPath = Union[bytes, PathLike[bytes]] # stable\nStrOrBytesPath = Union[str, bytes, PathLike[str], PathLike[bytes]] # stable\n\nOpenTextModeUpdating = Literal[\n \"r+\",\n \"+r\",\n \"rt+\",\n \"r+t\",\n \"+rt\",\n \"tr+\",\n \"t+r\",\n \"+tr\",\n \"w+\",\n \"+w\",\n \"wt+\",\n \"w+t\",\n \"+wt\",\n \"tw+\",\n \"t+w\",\n \"+tw\",\n \"a+\",\n \"+a\",\n \"at+\",\n \"a+t\",\n \"+at\",\n \"ta+\",\n \"t+a\",\n \"+ta\",\n \"x+\",\n \"+x\",\n \"xt+\",\n \"x+t\",\n \"+xt\",\n \"tx+\",\n \"t+x\",\n \"+tx\",\n]\nOpenTextModeWriting = Literal[\"w\", \"wt\", \"tw\", \"a\", \"at\", \"ta\", \"x\", \"xt\", \"tx\"]\nOpenTextModeReading = Literal[\"r\", \"rt\", \"tr\", \"U\", \"rU\", \"Ur\", \"rtU\", \"rUt\", \"Urt\", \"trU\", \"tUr\", \"Utr\"]\nOpenTextMode = Union[OpenTextModeUpdating, OpenTextModeWriting, OpenTextModeReading]\nOpenBinaryModeUpdating = Literal[\n \"rb+\",\n \"r+b\",\n \"+rb\",\n \"br+\",\n \"b+r\",\n \"+br\",\n \"wb+\",\n \"w+b\",\n \"+wb\",\n \"bw+\",\n \"b+w\",\n \"+bw\",\n \"ab+\",\n \"a+b\",\n \"+ab\",\n \"ba+\",\n \"b+a\",\n \"+ba\",\n \"xb+\",\n \"x+b\",\n \"+xb\",\n \"bx+\",\n \"b+x\",\n \"+bx\",\n]\nOpenBinaryModeWriting = Literal[\"wb\", \"bw\", \"ab\", \"ba\", \"xb\", \"bx\"]\nOpenBinaryModeReading = Literal[\"rb\", \"br\", \"rbU\", \"rUb\", \"Urb\", \"brU\", \"bUr\", \"Ubr\"]\nOpenBinaryMode = Union[OpenBinaryModeUpdating, OpenBinaryModeReading, OpenBinaryModeWriting]\n\n# stable\nclass HasFileno(Protocol):\n def fileno(self) -> int: ...\n\nFileDescriptor = int # stable\nFileDescriptorLike = Union[int, HasFileno] # stable\n\n# stable\nclass SupportsRead(Protocol[_T_co]):\n def read(self, __length: int = ...) -> _T_co: ...\n\n# stable\nclass SupportsReadline(Protocol[_T_co]):\n def readline(self, __length: int = ...) -> _T_co: ...\n\n# stable\nclass SupportsNoArgReadline(Protocol[_T_co]):\n def readline(self) -> _T_co: ...\n\n# stable\nclass SupportsWrite(Protocol[_T_contra]):\n def write(self, __s: _T_contra) -> Any: ...\n\nReadableBuffer = Union[bytes, bytearray, memoryview, array.array[Any]] # stable\nWriteableBuffer = Union[bytearray, memoryview, array.array[Any]] # stable\n\n# stable\nif sys.version_info >= (3, 10):\n from types import NoneType as NoneType\nelse:\n # Used by type checkers for checks involving None (does not exist at runtime)\n @final\n class NoneType:\n def __bool__(self) -> Literal[False]: ...\n", - "/typeshed/stdlib/collections/__init__.pyi": "import sys\nfrom typing import (\n Any,\n Dict,\n Generic,\n ItemsView,\n Iterable,\n Iterator,\n KeysView,\n Optional,\n Reversible,\n Tuple,\n Type,\n TypeVar,\n Union,\n ValuesView,\n)\n\n_S = TypeVar(\"_S\")\n_T = TypeVar(\"_T\")\n_KT = TypeVar(\"_KT\")\n_VT = TypeVar(\"_VT\")\n\nif sys.version_info >= (3, 7):\n def namedtuple(\n typename: str,\n field_names: Union[str, Iterable[str]],\n *,\n rename: bool = ...,\n module: Optional[str] = ...,\n defaults: Optional[Iterable[Any]] = ...,\n ) -> Type[Tuple[Any, ...]]: ...\n\nelse:\n def namedtuple(\n typename: str,\n field_names: Union[str, Iterable[str]],\n *,\n verbose: bool = ...,\n rename: bool = ...,\n module: Optional[str] = ...,\n ) -> Type[Tuple[Any, ...]]: ...\n\nclass _OrderedDictKeysView(KeysView[_KT], Reversible[_KT]):\n def __reversed__(self) -> Iterator[_KT]: ...\n\nclass _OrderedDictItemsView(ItemsView[_KT, _VT], Reversible[Tuple[_KT, _VT]]):\n def __reversed__(self) -> Iterator[Tuple[_KT, _VT]]: ...\n\nclass _OrderedDictValuesView(ValuesView[_VT], Reversible[_VT]):\n def __reversed__(self) -> Iterator[_VT]: ...\n\nclass OrderedDict(Dict[_KT, _VT], Reversible[_KT], Generic[_KT, _VT]):\n def popitem(self, last: bool = ...) -> Tuple[_KT, _VT]: ...\n def move_to_end(self, key: _KT, last: bool = ...) -> None: ...\n def copy(self: _S) -> _S: ...\n def __reversed__(self) -> Iterator[_KT]: ...\n def keys(self) -> _OrderedDictKeysView[_KT]: ...\n def items(self) -> _OrderedDictItemsView[_KT, _VT]: ...\n def values(self) -> _OrderedDictValuesView[_VT]: ...\n", "/typeshed/stdlib/microbit/__init__.pyi": "\"\"\"\ud540, \uc774\ubbf8\uc9c0, \uc18c\ub9ac, \uc628\ub3c4 \ubc0f \uc74c\ub7c9\uc785\ub2c8\ub2e4.\"\"\"\nfrom typing import Any, Callable, List, Optional, Tuple, Union, overload\nfrom _typeshed import ReadableBuffer\nfrom . import accelerometer as accelerometer\nfrom . import audio as audio\nfrom . import compass as compass\nfrom . import display as display\nfrom . import i2c as i2c\nfrom . import microphone as microphone\nfrom . import speaker as speaker\nfrom . import spi as spi\nfrom . import uart as uart\n\ndef run_every(callback: Optional[Callable[[], None]]=None, days: int=0, h: int=0, min: int=0, s: int=0, ms: int=0) -> Callable[[Callable[[], None]], Callable[[], None]]:\n \"\"\"Schedule to run a function at the interval specified by the time arguments **V2 only**.\n\nExample: ``run_every(my_logging, min=5)``\n\n``run_every`` can be used in two ways:\n\nAs a Decorator - placed on top of the function to schedule. For example::\n\n @run_every(h=1, min=20, s=30, ms=50)\n def my_function():\n # Do something here\n\nAs a Function - passing the callback as a positional argument. For example::\n\n def my_function():\n # Do something here\n run_every(my_function, s=30)\n\nEach argument corresponds to a different time unit and they are additive.\nSo ``run_every(min=1, s=30)`` schedules the callback every minute and a half.\n\nWhen an exception is thrown inside the callback function it deschedules the\nfunction. To avoid this you can catch exceptions with ``try/except``.\n\n:param callback: Function to call at the provided interval. Omit when using as a decorator.\n:param days: Sets the day mark for the scheduling.\n:param h: Sets the hour mark for the scheduling.\n:param min: Sets the minute mark for the scheduling.\n:param s: Sets the second mark for the scheduling.\n:param ms: Sets the millisecond mark for the scheduling.\"\"\"\n\ndef panic(n: int) -> None:\n \"\"\"\ud328\ub2c9 \ubaa8\ub4dc\ub97c \ud65c\uc131\ud654\ud569\ub2c8\ub2e4.\n\nExample: ``panic(127)``\n\n:param n: <= 255\uc758 \uc784\uc758 \uc815\uc218\ub85c \uc0c1\ud0dc\ub97c \ud45c\uc2dc\ud569\ub2c8\ub2e4.\n\nRequires restart.\"\"\"\n\ndef reset() -> None:\n \"\"\"\ubcf4\ub4dc\ub97c \uc7ac\uc2dc\uc791\ud569\ub2c8\ub2e4.\"\"\"\n\n@overload\ndef scale(value: float, from_: Tuple[float, float], to: Tuple[int, int]) -> int:\n \"\"\"Converts a value from a range to an integer range.\n\nExample: ``volume = scale(accelerometer.get_x(), from_=(-2000, 2000), to=(0, 255))``\n\nFor example, to convert an accelerometer X value to a speaker volume.\n\nIf one of the numbers in the ``to`` parameter is a floating point\n(i.e a decimal number like ``10.0``), this function will return a\nfloating point number.\n\n temp_fahrenheit = scale(30, from_=(0.0, 100.0), to=(32.0, 212.0))\n\n:param value: A number to convert.\n:param from_: A tuple to define the range to convert from.\n:param to: A tuple to define the range to convert to.\n:return: The ``value`` converted to the ``to`` range.\"\"\"\n\n@overload\ndef scale(value: float, from_: Tuple[float, float], to: Tuple[float, float]) -> float:\n \"\"\"Converts a value from a range to a floating point range.\n\nExample: ``temp_fahrenheit = scale(30, from_=(0.0, 100.0), to=(32.0, 212.0))``\n\nFor example, to convert temperature from a Celsius scale to Fahrenheit.\n\nIf one of the numbers in the ``to`` parameter is a floating point\n(i.e a decimal number like ``10.0``), this function will return a\nfloating point number.\nIf they are both integers (i.e ``10``), it will return an integer::\n\n returns_int = scale(accelerometer.get_x(), from_=(-2000, 2000), to=(0, 255))\n\n:param value: A number to convert.\n:param from_: A tuple to define the range to convert from.\n:param to: A tuple to define the range to convert to.\n:return: The ``value`` converted to the ``to`` range.\"\"\"\n\ndef sleep(n: float) -> None:\n \"\"\"``n``\ubc00\ub9ac\ucd08 \ub3d9\uc548 \ub300\uae30\ud569\ub2c8\ub2e4.\n\nExample: ``sleep(1000)``\n\n:param n: \ub300\uae30\ud560 \ubc00\ub9ac\ucd08 \uc218\n\nOne second is 1000 milliseconds, so::\n\n microbit.sleep(1000)\n\nwill pause the execution for one second.\"\"\"\n\ndef running_time() -> int:\n \"\"\"\ubcf4\ub4dc\uc758 \uc2e4\ud589 \uc2dc\uac04\uc744 \ubd88\ub7ec\uc635\ub2c8\ub2e4.\n\n:return: The number of milliseconds since the board was switched on or restarted.\"\"\"\n\ndef temperature() -> int:\n \"\"\"\uc12d\uc528\ub85c micro:bit\uc758 \uc628\ub3c4\ub97c \ubd88\ub7ec\uc635\ub2c8\ub2e4. (\uc628\ub3c4)\"\"\"\n\ndef set_volume(v: int) -> None:\n \"\"\"\uc74c\ub7c9\uc744 \uc124\uc815\ud569\ub2c8\ub2e4.\n\nExample: ``set_volume(127)``\n\n:param v: 0(\ub0ae\uc74c) \ubc0f 255(\ub192\uc74c) \uc0ac\uc774\uc758 \uac12\uc785\ub2c8\ub2e4.\n\nOut of range values will be clamped to 0 or 255.\n\n**V2** only.\"\"\"\n ...\n\nclass Button:\n \"\"\"``button_a`` \ubc0f ``button_b`` \ubc84\ud2bc \ud074\ub798\uc2a4\uc785\ub2c8\ub2e4.\"\"\"\n\n def is_pressed(self) -> bool:\n \"\"\"\ud574\ub2f9 \ubc84\ud2bc\uc774 \ub20c\ub838\ub294\uc9c0 \ud655\uc778\ud569\ub2c8\ub2e4.\n\n:return: ``True`` if the specified button ``button`` is pressed, and ``False`` otherwise.\"\"\"\n ...\n\n def was_pressed(self) -> bool:\n \"\"\"\uc7a5\uce58\uac00 \uc2dc\uc791\ud55c \ud6c4 \ub610\ub294 \uc774 \uba54\uc11c\ub4dc\uac00 \ud638\ucd9c\ub41c \ud6c4 \ud574\ub2f9 \ubc84\ud2bc\uc774 \ub20c\ub838\ub294\uc9c0 \ud655\uc778\ud569\ub2c8\ub2e4.\n\nCalling this method will clear the press state so\nthat the button must be pressed again before this method will return\n``True`` again.\n\n:return: ``True`` if the specified button ``button`` was pressed, and ``False`` otherwise\"\"\"\n ...\n\n def get_presses(self) -> int:\n \"\"\"\ubc84\ud2bc\uc774 \ub20c\ub9b0 \ucd1d \ud69f\uc218\ub97c \ubd88\ub7ec\uc624\uace0, \ucd1d\uac12\uc744 \ubc18\ud658\ud558\uae30 \uc804 \ucd08\uae30\ud654\ud569\ub2c8\ub2e4.\n\n:return: The number of presses since the device started or the last time this method was called\"\"\"\n ...\nbutton_a: Button\n\"\"\"\uc67c\ucabd \ubc84\ud2bc ``Button`` \uac1c\uccb4\uc785\ub2c8\ub2e4.\"\"\"\nbutton_b: Button\n\"\"\"\uc624\ub978\ucabd \ubc84\ud2bc ``Button`` \uac1c\uccb4\uc785\ub2c8\ub2e4.\"\"\"\n\nclass MicroBitDigitalPin:\n \"\"\"\ub514\uc9c0\ud138 \ud540\uc785\ub2c8\ub2e4.\n\nSome pins support analog and touch features using the ``MicroBitAnalogDigitalPin`` and ``MicroBitTouchPin`` subclasses.\"\"\"\n NO_PULL: int\n PULL_UP: int\n PULL_DOWN: int\n\n def read_digital(self) -> int:\n \"\"\"\ud540\uc758 \ub514\uc9c0\ud138 \uac12\uc744 \ubd88\ub7ec\uc635\ub2c8\ub2e4.\n\nExample: ``value = pin0.read_digital()``\n\n:return: 1 if the pin is high, and 0 if it's low.\"\"\"\n ...\n\n def write_digital(self, value: int) -> None:\n \"\"\"\ud540\uc758 \ub514\uc9c0\ud138 \uac12\uc744 \uc124\uc815\ud569\ub2c8\ub2e4.\n\nExample: ``pin0.write_digital(1)``\n\n:param value: \ud540\uc744 \ud558\uc774\ub85c \uc124\uc815\ud558\ub824\uba74 1, \ub85c\uc6b0\ub85c \uc124\uc815\ud558\ub824\uba74 0\"\"\"\n ...\n\n def set_pull(self, value: int) -> None:\n \"\"\"\ub2e4\uc74c \uc911 \ud558\ub098\uc758 \uac12\uc73c\ub85c \ud480 \uc0c1\ud0dc\ub97c \uc124\uc815: ``PULL_UP``, ``PULL_DOWN`` \ub610\ub294 ``NO_PULL``\n\nExample: ``pin0.set_pull(pin0.PULL_UP)``\n\n:param value: \uad00\ub828 \ud540\uc758 \ud480 \uc0c1\ud0dc\uc785\ub2c8\ub2e4. (\uc608: ``pin0.PULL_UP``)\"\"\"\n ...\n\n def get_pull(self) -> int:\n \"\"\"\ud540\uc758 \ud480 \uc0c1\ud0dc\ub97c \ubd88\ub7ec\uc635\ub2c8\ub2e4.\n\nExample: ``pin0.get_pull()``\n\n:return: ``NO_PULL``, ``PULL_DOWN``, or ``PULL_UP``\n\nThese are set using the ``set_pull()`` method or automatically configured\nwhen a pin mode requires it.\"\"\"\n ...\n\n def get_mode(self) -> str:\n \"\"\"\ud540 \ubaa8\ub4dc\ub97c \ubc18\ud658\ud569\ub2c8\ub2e4.\n\nExample: ``pin0.get_mode()``\n\nWhen a pin is used for a specific function, like\nwriting a digital value, or reading an analog value, the pin mode\nchanges.\n\n:return: ``\"unused\"``, ``\"analog\"``, ``\"read_digital\"``, ``\"write_digital\"``, ``\"display\"``, ``\"button\"``, ``\"music\"``, ``\"audio\"``, ``\"touch\"``, ``\"i2c\"``, or ``\"spi\"``\"\"\"\n ...\n\n def write_analog(self, value: int) -> None:\n \"\"\"\ud540\uc758 PWM \uc2e0\ud638\ub97c \ucd9c\ub825\ud558\uace0 ``value``\uc640(\uacfc) \ube44\ub840\ud574 \ub4c0\ud2f0 \uc0ac\uc774\ud074\uc744 \uc124\uc815\ud569\ub2c8\ub2e4.\n\nExample: ``pin0.write_analog(254)``\n\n:param value: 0(0% \ub4c0\ud2f0 \uc0ac\uc774\ud074) \ubc0f 1023(100% \ub4c0\ud2f0) \uc0ac\uc774\uc758 \uc815\uc218 \ub610\ub294 \ubd80\ub3d9 \uc18c\uc218\uc810 \uc218\uc785\ub2c8\ub2e4.\"\"\"\n\n def set_analog_period(self, period: int) -> None:\n \"\"\"PWM \uc2e0\ud638\uac00 \ucd9c\ub825\ub418\ub294 \uc8fc\uae30\ub97c ``period``\ubc00\ub9ac\ucd08\ub85c \uc124\uc815\ud569\ub2c8\ub2e4.\n\nExample: ``pin0.set_analog_period(10)``\n\n:param period: \uc720\ud6a8\ud55c \ucd5c\uc18c\uac12\uc774 1ms\uc778 \ubc00\ub9ac\ucd08 \uc8fc\uae30\uc785\ub2c8\ub2e4.\"\"\"\n\n def set_analog_period_microseconds(self, period: int) -> None:\n \"\"\"PWM \uc2e0\ud638\uac00 \ucd9c\ub825\ub418\ub294 \uc8fc\uae30\ub97c ``period``\ub9c8\uc774\ud06c\ub85c\ucd08\ub85c \uc124\uc815\ud569\ub2c8\ub2e4.\n\nExample: ``pin0.set_analog_period_microseconds(512)``\n\n:param period: \uc720\ud6a8\ud55c \ucd5c\uc18c\uac12\uc774 256\u00b5s\uc778 \ub9c8\uc774\ud06c\ub85c\ucd08 \uc8fc\uae30\uc785\ub2c8\ub2e4.\"\"\"\n\nclass MicroBitAnalogDigitalPin(MicroBitDigitalPin):\n \"\"\"\uc544\ub0a0\ub85c\uadf8 \ubc0f \ub514\uc9c0\ud138 \uae30\ub2a5\uc774 \uc788\ub294 \ud540\uc785\ub2c8\ub2e4.\"\"\"\n\n def read_analog(self) -> int:\n \"\"\"\ud540\uc5d0 \uc801\uc6a9\ub41c \uc804\uc555\uc744 \uc77d\uc2b5\ub2c8\ub2e4.\n\nExample: ``pin0.read_analog()``\n\n:return: An integer between 0 (meaning 0V) and 1023 (meaning 3.3V).\"\"\"\n\nclass MicroBitTouchPin(MicroBitAnalogDigitalPin):\n \"\"\"\uc544\ub0a0\ub85c\uadf8, \ub514\uc9c0\ud138, \ud130\uce58 \uae30\ub2a5\uc774 \uc788\ub294 \ud540\uc785\ub2c8\ub2e4.\"\"\"\n CAPACITIVE: int\n RESISTIVE: int\n\n def is_touched(self) -> bool:\n \"\"\"\ud540\uc774 \uc811\ucd09 \uc0c1\ud0dc\uc778\uc9c0 \ud655\uc778\ud569\ub2c8\ub2e4.\n\nExample: ``pin0.is_touched()``\n\nThe default touch mode for the pins on the edge connector is ``resistive``.\nThe default for the logo pin **V2** is ``capacitive``.\n\n**Resistive touch**\nThis test is done by measuring how much resistance there is between the\npin and ground. A low resistance gives a reading of ``True``. To get\na reliable reading using a finger you may need to touch the ground pin\nwith another part of your body, for example your other hand.\n\n**Capacitive touch**\nThis test is done by interacting with the electric field of a capacitor\nusing a finger as a conductor. `Capacitive touch\n`_\ndoes not require you to make a ground connection as part of a circuit.\n\n:return: ``True`` if the pin is being touched with a finger, otherwise return ``False``.\"\"\"\n ...\n\n def set_touch_mode(self, value: int) -> None:\n \"\"\"\ud540\uc758 \ud130\uce58 \ubaa8\ub4dc\ub97c \uc124\uc815\ud569\ub2c8\ub2e4.\n\nExample: ``pin0.set_touch_mode(pin0.CAPACITIVE)``\n\nThe default touch mode for the pins on the edge connector is\n``resistive``. The default for the logo pin **V2** is ``capacitive``.\n\n:param value: \uad00\ub828 \ud540\uc758 ``CAPACITIVE`` \ub610\ub294 ``RESISTIVE``\uc785\ub2c8\ub2e4.\"\"\"\n ...\npin0: MicroBitTouchPin\n\"\"\"\ub514\uc9c0\ud138 \ubc0f \uc544\ub0a0\ub85c\uadf8, \ud130\uce58 \uae30\ub2a5\uc774 \uc788\ub294 \ud540\uc785\ub2c8\ub2e4.\"\"\"\npin1: MicroBitTouchPin\n\"\"\"\ub514\uc9c0\ud138 \ubc0f \uc544\ub0a0\ub85c\uadf8, \ud130\uce58 \uae30\ub2a5\uc774 \uc788\ub294 \ud540\uc785\ub2c8\ub2e4.\"\"\"\npin2: MicroBitTouchPin\n\"\"\"\ub514\uc9c0\ud138 \ubc0f \uc544\ub0a0\ub85c\uadf8, \ud130\uce58 \uae30\ub2a5\uc774 \uc788\ub294 \ud540\uc785\ub2c8\ub2e4.\"\"\"\npin3: MicroBitAnalogDigitalPin\n\"\"\"\ub514\uc9c0\ud138 \ubc0f \uc544\ub0a0\ub85c\uadf8 \uae30\ub2a5\uc774 \uc788\ub294 \ud540\uc785\ub2c8\ub2e4.\"\"\"\npin4: MicroBitAnalogDigitalPin\n\"\"\"\ub514\uc9c0\ud138 \ubc0f \uc544\ub0a0\ub85c\uadf8 \uae30\ub2a5\uc774 \uc788\ub294 \ud540\uc785\ub2c8\ub2e4.\"\"\"\npin5: MicroBitDigitalPin\n\"\"\"\ub514\uc9c0\ud138 \uae30\ub2a5\uc774 \uc788\ub294 \ud540\uc785\ub2c8\ub2e4. (pin speaker)\"\"\"\npin6: MicroBitDigitalPin\n\"\"\"\ub514\uc9c0\ud138 \uae30\ub2a5\uc774 \uc788\ub294 \ud540\uc785\ub2c8\ub2e4.\"\"\"\npin7: MicroBitDigitalPin\n\"\"\"\ub514\uc9c0\ud138 \uae30\ub2a5\uc774 \uc788\ub294 \ud540\uc785\ub2c8\ub2e4.\"\"\"\npin8: MicroBitDigitalPin\n\"\"\"\ub514\uc9c0\ud138 \uae30\ub2a5\uc774 \uc788\ub294 \ud540\uc785\ub2c8\ub2e4.\"\"\"\npin9: MicroBitDigitalPin\n\"\"\"\ub514\uc9c0\ud138 \uae30\ub2a5\uc774 \uc788\ub294 \ud540\uc785\ub2c8\ub2e4.\"\"\"\npin10: MicroBitAnalogDigitalPin\n\"\"\"\ub514\uc9c0\ud138 \ubc0f \uc544\ub0a0\ub85c\uadf8 \uae30\ub2a5\uc774 \uc788\ub294 \ud540\uc785\ub2c8\ub2e4.\"\"\"\npin11: MicroBitDigitalPin\n\"\"\"\ub514\uc9c0\ud138 \uae30\ub2a5\uc774 \uc788\ub294 \ud540\uc785\ub2c8\ub2e4.\"\"\"\npin12: MicroBitDigitalPin\n\"\"\"\ub514\uc9c0\ud138 \uae30\ub2a5\uc774 \uc788\ub294 \ud540\uc785\ub2c8\ub2e4.\"\"\"\npin13: MicroBitDigitalPin\n\"\"\"\ub514\uc9c0\ud138 \uae30\ub2a5\uc774 \uc788\ub294 \ud540\uc785\ub2c8\ub2e4.\"\"\"\npin14: MicroBitDigitalPin\n\"\"\"\ub514\uc9c0\ud138 \uae30\ub2a5\uc774 \uc788\ub294 \ud540\uc785\ub2c8\ub2e4.\"\"\"\npin15: MicroBitDigitalPin\n\"\"\"\ub514\uc9c0\ud138 \uae30\ub2a5\uc774 \uc788\ub294 \ud540\uc785\ub2c8\ub2e4.\"\"\"\npin16: MicroBitDigitalPin\n\"\"\"\ub514\uc9c0\ud138 \uae30\ub2a5\uc774 \uc788\ub294 \ud540\uc785\ub2c8\ub2e4.\"\"\"\npin19: MicroBitDigitalPin\n\"\"\"\ub514\uc9c0\ud138 \uae30\ub2a5\uc774 \uc788\ub294 \ud540\uc785\ub2c8\ub2e4.\"\"\"\npin20: MicroBitDigitalPin\n\"\"\"\ub514\uc9c0\ud138 \uae30\ub2a5\uc774 \uc788\ub294 \ud540\uc785\ub2c8\ub2e4.\"\"\"\npin_logo: MicroBitTouchPin\n\"\"\"micro:bit \uc804\uba74\uc758 \ud130\uce58 \uac10\uc9c0 \ub85c\uace0 \ud540\uc73c\ub85c, \uae30\ubcf8\uac12\uc740 \uc815\uc804\uc2dd \ud130\uce58 \ubaa8\ub4dc\uc785\ub2c8\ub2e4. (\ud540 \ub85c\uace0)\"\"\"\npin_speaker: MicroBitAnalogDigitalPin\n\"\"\"micro:bit \uc2a4\ud53c\ucee4\ub97c \ucc98\ub9ac\ud558\ub294 \ud540\uc785\ub2c8\ub2e4. (\ud540 \uc2a4\ud53c\ucee4)\n\nThis API is intended only for use in Pulse-Width Modulation pin operations e.g. pin_speaker.write_analog(128).\n\"\"\"\n\nclass Image:\n \"\"\"micro:bit LED \ub514\uc2a4\ud50c\ub808\uc774\uc5d0 \ud45c\uc2dc\ud560 \uc774\ubbf8\uc9c0\uc785\ub2c8\ub2e4.\n\nGiven an image object it's possible to display it via the ``display`` API::\n\n display.show(Image.HAPPY)\"\"\"\n HEART: Image\n \"\"\"\ud558\ud2b8 \uc774\ubbf8\uc9c0\uc785\ub2c8\ub2e4.\"\"\"\n HEART_SMALL: Image\n \"\"\"\uc791\uc740 \ud558\ud2b8 \uc774\ubbf8\uc9c0\uc785\ub2c8\ub2e4.\"\"\"\n HAPPY: Image\n \"\"\"\ud589\ubcf5\ud55c \uc5bc\uad74 \uc774\ubbf8\uc9c0\uc785\ub2c8\ub2e4.\"\"\"\n SMILE: Image\n \"\"\"\ubbf8\uc18c \uc9d3\ub294 \uc5bc\uad74 \uc774\ubbf8\uc9c0\uc785\ub2c8\ub2e4.\"\"\"\n SAD: Image\n \"\"\"\uc2ac\ud508 \uc5bc\uad74 \uc774\ubbf8\uc9c0\uc785\ub2c8\ub2e4.\"\"\"\n CONFUSED: Image\n \"\"\"\ud63c\ub780\uc2a4\ub7ec\uc6b4 \uc5bc\uad74 \uc774\ubbf8\uc9c0\uc785\ub2c8\ub2e4.\"\"\"\n ANGRY: Image\n \"\"\"\ud654\ub09c \uc5bc\uad74 \uc774\ubbf8\uc9c0\uc785\ub2c8\ub2e4.\"\"\"\n ASLEEP: Image\n \"\"\"\uc790\ub294 \uc5bc\uad74 \uc774\ubbf8\uc9c0\uc785\ub2c8\ub2e4.\"\"\"\n SURPRISED: Image\n \"\"\"\ub180\ub780 \uc5bc\uad74 \uc774\ubbf8\uc9c0\uc785\ub2c8\ub2e4.\"\"\"\n SILLY: Image\n \"\"\"\uc6b0\uc2a4\uaf5d\uc2a4\ub7ec\uc6b4 \uc5bc\uad74 \uc774\ubbf8\uc9c0\uc785\ub2c8\ub2e4.\"\"\"\n FABULOUS: Image\n \"\"\"\uc120\uae00\ub77c\uc2a4\ub97c \uc4f4 \uc5bc\uad74 \uc774\ubbf8\uc9c0\uc785\ub2c8\ub2e4.\"\"\"\n MEH: Image\n \"\"\"\uc9c0\ub8e8\ud55c \uc5bc\uad74 \uc774\ubbf8\uc9c0\uc785\ub2c8\ub2e4.\"\"\"\n YES: Image\n \"\"\"\uccb4\ud06c \ud45c\uc2dc \uc774\ubbf8\uc9c0\uc785\ub2c8\ub2e4.\"\"\"\n NO: Image\n \"\"\"\uc5d1\uc2a4 \ud45c\uc2dc \uc774\ubbf8\uc9c0\uc785\ub2c8\ub2e4.\"\"\"\n CLOCK12: Image\n \"\"\"12\uc2dc \uc815\uac01\uc744 \uac00\ub9ac\ud0a4\ub294 \uc774\ubbf8\uc9c0\uc785\ub2c8\ub2e4.\"\"\"\n CLOCK11: Image\n \"\"\"11\uc2dc \uc815\uac01\uc744 \uac00\ub9ac\ud0a4\ub294 \uc774\ubbf8\uc9c0\uc785\ub2c8\ub2e4.\"\"\"\n CLOCK10: Image\n \"\"\"10\uc2dc \uc815\uac01\uc744 \uac00\ub9ac\ud0a4\ub294 \uc774\ubbf8\uc9c0\uc785\ub2c8\ub2e4.\"\"\"\n CLOCK9: Image\n \"\"\"9\uc2dc \uc815\uac01\uc744 \uac00\ub9ac\ud0a4\ub294 \uc774\ubbf8\uc9c0\uc785\ub2c8\ub2e4.\"\"\"\n CLOCK8: Image\n \"\"\"8\uc2dc \uc815\uac01\uc744 \uac00\ub9ac\ud0a4\ub294 \uc774\ubbf8\uc9c0\uc785\ub2c8\ub2e4.\"\"\"\n CLOCK7: Image\n \"\"\"7\uc2dc \uc815\uac01\uc744 \uac00\ub9ac\ud0a4\ub294 \uc774\ubbf8\uc9c0\uc785\ub2c8\ub2e4.\"\"\"\n CLOCK6: Image\n \"\"\"6\uc2dc \uc815\uac01\uc744 \uac00\ub9ac\ud0a4\ub294 \uc774\ubbf8\uc9c0\uc785\ub2c8\ub2e4.\"\"\"\n CLOCK5: Image\n \"\"\"5\uc2dc \uc815\uac01\uc744 \uac00\ub9ac\ud0a4\ub294 \uc774\ubbf8\uc9c0\uc785\ub2c8\ub2e4.\"\"\"\n CLOCK4: Image\n \"\"\"4\uc2dc \uc815\uac01\uc744 \uac00\ub9ac\ud0a4\ub294 \uc774\ubbf8\uc9c0\uc785\ub2c8\ub2e4.\"\"\"\n CLOCK3: Image\n \"\"\"3\uc2dc \uc815\uac01\uc744 \uac00\ub9ac\ud0a4\ub294 \uc774\ubbf8\uc9c0\uc785\ub2c8\ub2e4.\"\"\"\n CLOCK2: Image\n \"\"\"2\uc2dc \uc815\uac01\uc744 \uac00\ub9ac\ud0a4\ub294 \uc774\ubbf8\uc9c0\uc785\ub2c8\ub2e4.\"\"\"\n CLOCK1: Image\n \"\"\"1\uc2dc \uc815\uac01\uc744 \uac00\ub9ac\ud0a4\ub294 \uc774\ubbf8\uc9c0\uc785\ub2c8\ub2e4.\"\"\"\n ARROW_N: Image\n \"\"\"\ubd81\ucabd\uc744 \uac00\ub9ac\ud0a4\ub294 \ud654\uc0b4\ud45c \uc774\ubbf8\uc9c0\uc785\ub2c8\ub2e4.\"\"\"\n ARROW_NE: Image\n \"\"\"\ubd81\ub3d9\ucabd\uc744 \uac00\ub9ac\ud0a4\ub294 \ud654\uc0b4\ud45c \uc774\ubbf8\uc9c0\uc785\ub2c8\ub2e4.\"\"\"\n ARROW_E: Image\n \"\"\"\ub3d9\ucabd\uc744 \uac00\ub9ac\ud0a4\ub294 \ud654\uc0b4\ud45c \uc774\ubbf8\uc9c0\uc785\ub2c8\ub2e4.\"\"\"\n ARROW_SE: Image\n \"\"\"\ub0a8\ub3d9\ucabd\uc744 \uac00\ub9ac\ud0a4\ub294 \ud654\uc0b4\ud45c \uc774\ubbf8\uc9c0\uc785\ub2c8\ub2e4.\"\"\"\n ARROW_S: Image\n \"\"\"\ub0a8\ucabd\uc744 \uac00\ub9ac\ud0a4\ub294 \ud654\uc0b4\ud45c \uc774\ubbf8\uc9c0\uc785\ub2c8\ub2e4.\"\"\"\n ARROW_SW: Image\n \"\"\"\ub0a8\uc11c\ucabd\uc744 \uac00\ub9ac\ud0a4\ub294 \ud654\uc0b4\ud45c \uc774\ubbf8\uc9c0\uc785\ub2c8\ub2e4.\"\"\"\n ARROW_W: Image\n \"\"\"\uc11c\ucabd\uc744 \uac00\ub9ac\ud0a4\ub294 \ud654\uc0b4\ud45c \uc774\ubbf8\uc9c0\uc785\ub2c8\ub2e4.\"\"\"\n ARROW_NW: Image\n \"\"\"\ubd81\uc11c\ucabd\uc744 \uac00\ub9ac\ud0a4\ub294 \ud654\uc0b4\ud45c \uc774\ubbf8\uc9c0\uc785\ub2c8\ub2e4.\"\"\"\n TRIANGLE: Image\n \"\"\"\uc704\ucabd\uc744 \uac00\ub9ac\ud0a4\ub294 \uc0bc\uac01\ud615 \uc774\ubbf8\uc9c0\uc785\ub2c8\ub2e4.\"\"\"\n TRIANGLE_LEFT: Image\n \"\"\"\uc67c\ucabd \uad6c\uc11d\uc758 \uc0bc\uac01\ud615 \uc774\ubbf8\uc9c0\uc785\ub2c8\ub2e4.\"\"\"\n CHESSBOARD: Image\n \"\"\"\uccb4\uc2a4\ud310 \ud328\ud134\uc73c\ub85c \uae5c\ube61\uc774\ub294 LED \ubd88\ube5b\uc785\ub2c8\ub2e4.\"\"\"\n DIAMOND: Image\n \"\"\"\ub2e4\uc774\uc544\ubaac\ub4dc \uc774\ubbf8\uc9c0\uc785\ub2c8\ub2e4.\"\"\"\n DIAMOND_SMALL: Image\n \"\"\"\uc791\uc740 \ub2e4\uc774\uc544\ubaac\ub4dc \uc774\ubbf8\uc9c0\uc785\ub2c8\ub2e4.\"\"\"\n SQUARE: Image\n \"\"\"\uc0ac\uac01\ud615 \uc774\ubbf8\uc9c0\uc785\ub2c8\ub2e4.\"\"\"\n SQUARE_SMALL: Image\n \"\"\"\uc791\uc740 \uc0ac\uac01\ud615 \uc774\ubbf8\uc9c0\uc785\ub2c8\ub2e4.\"\"\"\n RABBIT: Image\n \"\"\"\ud1a0\ub07c \uc774\ubbf8\uc9c0\uc785\ub2c8\ub2e4.\"\"\"\n COW: Image\n \"\"\"\uc18c \uc774\ubbf8\uc9c0\uc785\ub2c8\ub2e4.\"\"\"\n MUSIC_CROTCHET: Image\n \"\"\"\uc0ac\ubd84\uc74c\ud45c \uc774\ubbf8\uc9c0\uc785\ub2c8\ub2e4.\"\"\"\n MUSIC_QUAVER: Image\n \"\"\"\ud314\ubd84\uc74c\ud45c \uc774\ubbf8\uc9c0\uc785\ub2c8\ub2e4.\"\"\"\n MUSIC_QUAVERS: Image\n \"\"\"\ub450 \uac1c\uc758 \ud314\ubd84\uc74c\ud45c \uc774\ubbf8\uc9c0\uc785\ub2c8\ub2e4.\"\"\"\n PITCHFORK: Image\n \"\"\"\uc1e0\uc2a4\ub791 \uc774\ubbf8\uc9c0\uc785\ub2c8\ub2e4.\"\"\"\n XMAS: Image\n \"\"\"\ud06c\ub9ac\uc2a4\ub9c8\uc2a4 \ub098\ubb34 \uc774\ubbf8\uc9c0\uc785\ub2c8\ub2e4.\"\"\"\n PACMAN: Image\n \"\"\"\uc624\ub77d\uc2e4 \uce90\ub9ad\ud130 Pac-Man \uc774\ubbf8\uc9c0\uc785\ub2c8\ub2e4.\"\"\"\n TARGET: Image\n \"\"\"\ud45c\uc801 \uc774\ubbf8\uc9c0\uc785\ub2c8\ub2e4.\"\"\"\n TSHIRT: Image\n \"\"\"\ud2f0\uc154\uce20 \uc774\ubbf8\uc9c0\uc785\ub2c8\ub2e4.\"\"\"\n ROLLERSKATE: Image\n \"\"\"\ub864\ub7ec\uc2a4\ucf00\uc774\ud2b8 \uc774\ubbf8\uc9c0\uc785\ub2c8\ub2e4.\"\"\"\n DUCK: Image\n \"\"\"\uc624\ub9ac \uc774\ubbf8\uc9c0\uc785\ub2c8\ub2e4.\"\"\"\n HOUSE: Image\n \"\"\"\uc9d1 \uc774\ubbf8\uc9c0\uc785\ub2c8\ub2e4.\"\"\"\n TORTOISE: Image\n \"\"\"\uac70\ubd81\uc774 \uc774\ubbf8\uc9c0\uc785\ub2c8\ub2e4.\"\"\"\n BUTTERFLY: Image\n \"\"\"\ub098\ube44 \uc774\ubbf8\uc9c0\uc785\ub2c8\ub2e4.\"\"\"\n STICKFIGURE: Image\n \"\"\"\ub9c9\ub300\uc778\uac04 \uc774\ubbf8\uc9c0\uc785\ub2c8\ub2e4.\"\"\"\n GHOST: Image\n \"\"\"\uc720\ub839 \uc774\ubbf8\uc9c0\uc785\ub2c8\ub2e4.\"\"\"\n SWORD: Image\n \"\"\"\uce7c \uc774\ubbf8\uc9c0\uc785\ub2c8\ub2e4.\"\"\"\n GIRAFFE: Image\n \"\"\"\uae30\ub9b0 \uc774\ubbf8\uc9c0\uc785\ub2c8\ub2e4.\"\"\"\n SKULL: Image\n \"\"\"\ud574\uace8 \uc774\ubbf8\uc9c0\uc785\ub2c8\ub2e4.\"\"\"\n UMBRELLA: Image\n \"\"\"\uc6b0\uc0b0 \uc774\ubbf8\uc9c0\uc785\ub2c8\ub2e4.\"\"\"\n SNAKE: Image\n \"\"\"\ubc40 \uc774\ubbf8\uc9c0\uc785\ub2c8\ub2e4.\"\"\"\n SCISSORS: Image\n \"\"\"Scissors image.\"\"\"\n ALL_CLOCKS: List[Image]\n \"\"\"\ubaa8\ub4e0 CLOCK_ \uc774\ubbf8\uc9c0\ub97c \uc21c\uc11c\ub300\ub85c \ub098\uc5f4\ud55c \ub9ac\uc2a4\ud2b8\uc785\ub2c8\ub2e4.\"\"\"\n ALL_ARROWS: List[Image]\n \"\"\"\ubaa8\ub4e0 ARROW_ \uc774\ubbf8\uc9c0\ub97c \uc21c\uc11c\ub300\ub85c \ub098\uc5f4\ud55c \ub9ac\uc2a4\ud2b8\uc785\ub2c8\ub2e4.\"\"\"\n\n @overload\n def __init__(self, string: str) -> None:\n \"\"\"\uc5b4\ub5a4 LED\uac00 \ucf1c\uc838\uc788\ub294\uc9c0 \uc124\uba85\ud558\ub294 \ubb38\uc790\uc5f4\ub85c\ubd80\ud130 \uc774\ubbf8\uc9c0\ub97c \uc0dd\uc131\ud569\ub2c8\ub2e4. (string)\n\n``string`` has to consist of digits 0-9 arranged into lines,\ndescribing the image, for example::\n\n image = Image(\"90009:\"\n \"09090:\"\n \"00900:\"\n \"09090:\"\n \"90009\")\n\nwill create a 5\u00d75 image of an X. The end of a line is indicated by a\ncolon. It's also possible to use newlines (\\\\n) insead of the colons.\n\n:param string: \uc774\ubbf8\uc9c0\ub97c \uc124\uba85\ud558\ub294 \ubb38\uc790\uc5f4\uc785\ub2c8\ub2e4.\"\"\"\n ...\n\n @overload\n def __init__(self, width: int=5, height: int=5, buffer: ReadableBuffer=None) -> None:\n \"\"\"``width`` \uc5f4\uacfc ``height`` \ud589\uc758 \ube44\uc5b4\uc788\ub294 \uc774\ubbf8\uc9c0\ub97c \uc0dd\uc131\ud569\ub2c8\ub2e4.\n\n:param width: \uc774\ubbf8\uc9c0 \ub108\ube44(\uc120\ud0dd \uc0ac\ud56d)\n:param height: \uc774\ubbf8\uc9c0 \ub192\uc774(\uc120\ud0dd \uc0ac\ud56d)\n:param buffer: 0~9\uc758 \ubc94\uc704\uc5d0 \uc18d\ud558\ub294 \uc815\uc218\ub85c \uad6c\uc131\ub41c ``width``x``height`` \ubc30\uc5f4 \ub610\ub294 \ubc14\uc774\ud2b8(\uc120\ud0dd \uc0ac\ud56d)\n\nExamples::\n\n Image(2, 2, b'\\x08\\x08\\x08\\x08')\n Image(2, 2, bytearray([9,9,9,9]))\n\nThese create 2 x 2 pixel images at full brightness.\"\"\"\n ...\n\n def width(self) -> int:\n \"\"\"\uc5f4\uc758 \uc218\ub97c \ubd88\ub7ec\uc635\ub2c8\ub2e4.\n\n:return: The number of columns in the image\"\"\"\n ...\n\n def height(self) -> int:\n \"\"\"\ud589\uc758 \uc218\ub97c \ubd88\ub7ec\uc635\ub2c8\ub2e4.\n\n:return: The number of rows in the image\"\"\"\n ...\n\n def set_pixel(self, x: int, y: int, value: int) -> None:\n \"\"\"\ud53d\uc140\uc758 \ubc1d\uae30\ub97c \uc124\uc815\ud569\ub2c8\ub2e4.\n\nExample: ``my_image.set_pixel(0, 0, 9)``\n\n:param x: \uc5f4 \ubc88\ud638\n:param y: \ud589 \ubc88\ud638\n:param value: 0(\uc5b4\ub450\uc6c0)\uacfc 9(\ubc1d\uc74c) \uc0ac\uc774\uc758 \uc815\uc218\ub85c \ubc1d\uae30\ub97c \uc124\uc815\ud569\ub2c8\ub2e4.\n\nThis method will raise an exception when called on any of the built-in\nread-only images, like ``Image.HEART``.\"\"\"\n ...\n\n def get_pixel(self, x: int, y: int) -> int:\n \"\"\"\ud53d\uc140\uc758 \ubc1d\uae30\ub97c \ubd88\ub7ec\uc635\ub2c8\ub2e4.\n\nExample: ``my_image.get_pixel(0, 0)``\n\n:param x: \uc5f4 \ubc88\ud638\n:param y: \ud589 \ubc88\ud638\n:return: The brightness as an integer between 0 and 9.\"\"\"\n ...\n\n def shift_left(self, n: int) -> Image:\n \"\"\"\uc0ac\uc9c4\uc744 \uc67c\ucabd\uc73c\ub85c \uc62e\uaca8 \uc0c8\ub85c\uc6b4 \uc774\ubbf8\uc9c0\ub97c \uc0dd\uc131\ud569\ub2c8\ub2e4.\n\nExample: ``Image.HEART_SMALL.shift_left(1)``\n\n:param n: \uc62e\uae38 \uc5f4\uc758 \uc218\n:return: The shifted image\"\"\"\n ...\n\n def shift_right(self, n: int) -> Image:\n \"\"\"\uc0ac\uc9c4\uc744 \uc624\ub978\ucabd\uc73c\ub85c \uc62e\uaca8 \uc0c8\ub85c\uc6b4 \uc774\ubbf8\uc9c0\ub97c \uc0dd\uc131\ud569\ub2c8\ub2e4.\n\nExample: ``Image.HEART_SMALL.shift_right(1)``\n\n:param n: \uc62e\uae38 \uc5f4\uc758 \uc218\n:return: The shifted image\"\"\"\n ...\n\n def shift_up(self, n: int) -> Image:\n \"\"\"\uc0ac\uc9c4\uc744 \uc704\ub85c \uc62e\uaca8 \uc0c8\ub85c\uc6b4 \uc774\ubbf8\uc9c0\ub97c \uc0dd\uc131\ud569\ub2c8\ub2e4.\n\nExample: ``Image.HEART_SMALL.shift_up(1)``\n\n:param n: \uc62e\uae38 \ud589\uc758 \uc218\n:return: The shifted image\"\"\"\n ...\n\n def shift_down(self, n: int) -> Image:\n \"\"\"\uc0ac\uc9c4\uc744 \uc544\ub798\ub85c \uc62e\uaca8 \uc0c8\ub85c\uc6b4 \uc774\ubbf8\uc9c0\ub97c \uc0dd\uc131\ud569\ub2c8\ub2e4.\n\nExample: ``Image.HEART_SMALL.shift_down(1)``\n\n:param n: \uc62e\uae38 \ud589\uc758 \uc218\n:return: The shifted image\"\"\"\n ...\n\n def crop(self, x: int, y: int, w: int, h: int) -> Image:\n \"\"\"\uc0ac\uc9c4\uc744 \uc798\ub77c \ub0b4 \uc0c8\ub85c\uc6b4 \uc774\ubbf8\uc9c0\ub97c \uc0dd\uc131\ud569\ub2c8\ub2e4.\n\nExample: ``Image.HEART.crop(1, 1, 3, 3)``\n\n:param x: \uc790\ub974\uae30 \uc624\ud504\uc14b \uc5f4\n:param y: \uc790\ub974\uae30 \uc624\ud504\uc14b \ud589\n:param w: \uc790\ub974\uae30 \ub108\ube44\n:param h: \uc790\ub974\uae30 \ub192\uc774\n:return: The new image\"\"\"\n ...\n\n def copy(self) -> Image:\n \"\"\"\uc774\ubbf8\uc9c0\uc640 \ub3d9\uc77c\ud55c \uc0ac\ubcf8\uc744 \uc0dd\uc131\ud569\ub2c8\ub2e4.\n\nExample: ``Image.HEART.copy()``\n\n:return: The new image\"\"\"\n ...\n\n def invert(self) -> Image:\n \"\"\"\uc18c\uc2a4 \uc774\ubbf8\uc9c0\uc5d0 \uc788\ub294 \ud53d\uc140\uc744 \ubc1d\uae30\ub97c \ubc18\uc804\ud574 \uc0c8\ub85c\uc6b4 \uc774\ubbf8\uc9c0\ub97c \uc0dd\uc131\ud569\ub2c8\ub2e4.\n\nExample: ``Image.SMALL_HEART.invert()``\n\n:return: The new image.\"\"\"\n ...\n\n def fill(self, value: int) -> None:\n \"\"\"\uc774\ubbf8\uc9c0\uc758 \ubaa8\ub4e0 \ud53d\uc140\uc758 \ubc1d\uae30\ub97c \uc124\uc815\ud569\ub2c8\ub2e4.\n\nExample: ``my_image.fill(5)``\n\n:param value: \uc0c8\ub85c\uc6b4 \ubc1d\uae30\ub97c 0(\uc5b4\ub450\uc6c0)\uacfc 9(\ubc1d\uae30) \uc0ac\uc774\ub85c \uc124\uc815\ud569\ub2c8\ub2e4.\n\nThis method will raise an exception when called on any of the built-in\nread-only images, like ``Image.HEART``.\"\"\"\n ...\n\n def blit(self, src: Image, x: int, y: int, w: int, h: int, xdest: int=0, ydest: int=0) -> None:\n \"\"\"\ub2e4\ub978 \uc774\ubbf8\uc9c0\ub85c\ubd80\ud130 \uc601\uc5ed\uc744 \ubcf5\uc0ac\ud574 \uc774 \uc774\ubbf8\uc9c0\ub85c \uac00\uc838\uc635\ub2c8\ub2e4.\n\nExample: ``my_image.blit(Image.HEART, 1, 1, 3, 3, 1, 1)``\n\n:param src: \uc18c\uc2a4 \uc774\ubbf8\uc9c0\n:param x: \uc18c\uc2a4 \uc774\ubbf8\uc9c0 \ub0b4 \uc2dc\uc791 \uc5f4 \uc624\ud504\uc14b\n:param y: \uc18c\uc2a4 \uc774\ubbf8\uc9c0 \ub0b4 \uc2dc\uc791 \ud589 \uc624\ud504\uc14b\n:param w: \ubcf5\uc0ac\ud560 \uc5f4\uc758 \uc218\n:param h: \ubcf5\uc0ac\ud560 \ud589 \ubc88\ud638\n:param xdest: \uc774 \uc774\ubbf8\uc9c0\uc5d0\uc11c \uc218\uc815\ud560 \uc5f4\uc758 \uc624\ud504\uc14b\n:param ydest: \uc774 \uc774\ubbf8\uc9c0\uc5d0\uc11c \uc218\uc815\ud560 \ud589\uc758 \uc624\ud504\uc14b\n\nPixels outside the source image are treated as having a brightness of 0.\n\n``shift_left()``, ``shift_right()``, ``shift_up()``, ``shift_down()``\nand ``crop()`` can are all implemented by using ``blit()``.\n\nFor example, img.crop(x, y, w, h) can be implemented as::\n\n def crop(self, x, y, w, h):\n res = Image(w, h)\n res.blit(self, x, y, w, h)\n return res\"\"\"\n ...\n\n def __repr__(self) -> str:\n \"\"\"\uc774\ubbf8\uc9c0\uc5d0 \ud574\ub2f9\ud558\ub294 \ucef4\ud329\ud2b8 \uc2a4\ud2b8\ub9c1\uc744 \ubd88\ub7ec\uc635\ub2c8\ub2e4.\"\"\"\n ...\n\n def __str__(self) -> str:\n \"\"\"\uc774\ubbf8\uc9c0\uc5d0 \ud574\ub2f9\ud558\ub294 \uc77d\uae30 \uac00\ub2a5 \ubb38\uc790\uc5f4\uc744 \ubd88\ub7ec\uc635\ub2c8\ub2e4.\"\"\"\n ...\n\n def __add__(self, other: Image) -> Image:\n \"\"\"\ub450 \uc774\ubbf8\uc9c0\uc758 \uac01 \ud53d\uc140\uc758 \ubc1d\uae30 \uac12\uc744 \ub354\ud574 \uc0c8\ub85c\uc6b4 \uc774\ubbf8\uc9c0\ub97c \uc0dd\uc131\ud569\ub2c8\ub2e4.\n\nExample: ``Image.HEART + Image.HAPPY``\n\n:param other: \ub354\ud560 \uc774\ubbf8\uc9c0\uc785\ub2c8\ub2e4.\"\"\"\n ...\n\n def __sub__(self, other: Image) -> Image:\n \"\"\"\ub450 \uc774\ubbf8\uc9c0\uc758 \uac01 \ud53d\uc140\uc758 \ubc1d\uae30 \uac12\uc744 \ube7c \uc0c8\ub85c\uc6b4 \uc774\ubbf8\uc9c0\ub97c \uc0dd\uc131\ud569\ub2c8\ub2e4.\n\nExample: ``Image.HEART - Image.HEART_SMALL``\n\n:param other: \ube84 \uc774\ubbf8\uc9c0\uc785\ub2c8\ub2e4.\"\"\"\n ...\n\n def __mul__(self, n: float) -> Image:\n \"\"\"\uac01 \ud53d\uc140\uc758 \ubc1d\uae30 \uac12\uc744 ``n``\ub9cc\ud07c \uacf1\ud574 \uc0c8\ub85c\uc6b4 \uc774\ubbf8\uc9c0\ub97c \uc0dd\uc131\ud569\ub2c8\ub2e4.\n\nExample: ``Image.HEART * 0.5``\n\n:param n: \uacf1\ud560 \uac12\uc785\ub2c8\ub2e4.\"\"\"\n ...\n\n def __truediv__(self, n: float) -> Image:\n \"\"\"\uac01 \ud53d\uc140\uc758 \ubc1d\uae30 \uac12\uc744 ``n``\ub9cc\ud07c \ub098\ub204\uc5b4 \uc0c8\ub85c\uc6b4 \uc774\ubbf8\uc9c0\ub97c \uc0dd\uc131\ud569\ub2c8\ub2e4.\n\nExample: ``Image.HEART / 2``\n\n:param n: \ub098\ub20c \uac12\uc785\ub2c8\ub2e4.\"\"\"\n ...\n\nclass SoundEvent:\n LOUD: SoundEvent\n \"\"\"``quiet``\uc5d0\uc11c \ubc15\uc218 \ub610\ub294 \ud568\uc131 \ub4f1 ``loud``\ub85c \uc18c\ub9ac \uc774\ubca4\ud2b8\uc758 \ubcc0\ud654\ub97c \ub098\ud0c0\ub0c5\ub2c8\ub2e4.\"\"\"\n QUIET: SoundEvent\n \"\"\"``loud``\uc5d0\uc11c \ub9d0\uc18c\ub9ac \ub610\ub294 \ubc30\uacbd \uc74c\uc545 \ub4f1 ``quiet``\ub85c \uc18c\ub9ac \uc774\ubca4\ud2b8\uc758 \ubcc0\ud654\ub97c \ub098\ud0c0\ub0c5\ub2c8\ub2e4.\"\"\"\n\nclass Sound:\n \"\"\"``audio.play(Sound.NAME)``\uc744 \uc0ac\uc6a9\ud574 \ub0b4\uc7a5\ub41c \uc18c\ub9ac\ub97c \ud638\ucd9c\ud569\ub2c8\ub2e4.\"\"\"\n GIGGLE: Sound\n \"\"\"\uc6c3\ub294 \uc18c\ub9ac\uc785\ub2c8\ub2e4.\"\"\"\n HAPPY: Sound\n \"\"\"\ud589\ubcf5\ud574\ud558\ub294 \uc18c\ub9ac\uc785\ub2c8\ub2e4.\"\"\"\n HELLO: Sound\n \"\"\"\uc778\uc0ac \uc18c\ub9ac\uc785\ub2c8\ub2e4.\"\"\"\n MYSTERIOUS: Sound\n \"\"\"\uc2e0\ube44\ud55c \uc18c\ub9ac\uc785\ub2c8\ub2e4.\"\"\"\n SAD: Sound\n \"\"\"\uc2ac\ud37c\ud558\ub294 \uc18c\ub9ac\uc785\ub2c8\ub2e4.\"\"\"\n SLIDE: Sound\n \"\"\"\uc2ac\ub77c\uc774\ub4dc \uc18c\ub9ac\uc785\ub2c8\ub2e4.\"\"\"\n SOARING: Sound\n \"\"\"\uc19f\uc544\uc624\ub974\ub294 \uc18c\ub9ac\uc785\ub2c8\ub2e4.\"\"\"\n SPRING: Sound\n \"\"\"\uc2a4\ud504\ub9c1 \uc18c\ub9ac\uc785\ub2c8\ub2e4.\"\"\"\n TWINKLE: Sound\n \"\"\"\ubc18\uc9dd\uc774\ub294 \uc18c\ub9ac\uc785\ub2c8\ub2e4.\"\"\"\n YAWN: Sound\n \"\"\"\ud558\ud488 \uc18c\ub9ac\uc785\ub2c8\ub2e4.\"\"\"", "/typeshed/stdlib/microbit/accelerometer.pyi": "\"\"\"micro:bit\uc758 \uac00\uc18d\ub3c4\ub97c \uce21\uc815\ud558\uace0 \uc81c\uc2a4\uccd0\ub97c \uc778\uc2dd\ud569\ub2c8\ub2e4.\"\"\"\nfrom typing import Tuple\n\ndef get_x() -> int:\n \"\"\"``x`` \ucd95\uc758 \uac00\uc18d\ub3c4 \uce21\uc815\uac12\uc744 milli-g\ub85c \ubd88\ub7ec\uc635\ub2c8\ub2e4.\n\nExample: ``accelerometer.get_x()``\n\n:return: A positive or negative integer depending on direction in the range +/- 2000mg.\"\"\"\n ...\n\ndef get_y() -> int:\n \"\"\"``y`` \ucd95\uc758 \uac00\uc18d\ub3c4 \uce21\uc815\uac12\uc744 milli-g\ub85c \ubd88\ub7ec\uc635\ub2c8\ub2e4.\n\nExample: ``accelerometer.get_y()``\n\n:return: A positive or negative integer depending on direction in the range +/- 2000mg.\"\"\"\n ...\n\ndef get_z() -> int:\n \"\"\"``z`` \ucd95\uc758 \uac00\uc18d\ub3c4 \uce21\uc815\uac12\uc744 milli-g\ub85c \ubd88\ub7ec\uc635\ub2c8\ub2e4.\n\nExample: ``accelerometer.get_z()``\n\n:return: A positive or negative integer depending on direction in the range +/- 2000mg.\"\"\"\n ...\n\ndef get_values() -> Tuple[int, int, int]:\n \"\"\"\ud55c \ubc88\uc5d0 \ubaa8\ub4e0 \ucd95\uc758 \uac00\uc18d\ub3c4 \uce21\uc815\uac12\uc744 \ud29c\ud50c\ub85c \ubd88\ub7ec\uc635\ub2c8\ub2e4.\n\nExample: ``x, y, z = accelerometer.get_values()``\n\n:return: a three-element tuple of integers ordered as X, Y, Z, each value a positive or negative integer depending on direction in the range +/- 2000mg\"\"\"\n ...\n\ndef get_strength() -> int:\n \"\"\"Get the acceleration measurement of all axes combined, as a positive integer. This is the Pythagorean sum of the X, Y and Z axes.\n\nExample: ``accelerometer.get_strength()``\n\n:return: The combined acceleration strength of all the axes, in milli-g.\"\"\"\n ...\n\ndef current_gesture() -> str:\n \"\"\"\ud604\uc7ac \uc81c\uc2a4\ucc98\uc758 \uc774\ub984\uc744 \ubd88\ub7ec\uc635\ub2c8\ub2e4.\n\nExample: ``accelerometer.current_gesture()``\n\nMicroPython understands the following gesture names: ``\"up\"``, ``\"down\"``,\n``\"left\"``, ``\"right\"``, ``\"face up\"``, ``\"face down\"``, ``\"freefall\"``,\n``\"3g\"``, ``\"6g\"``, ``\"8g\"``, ``\"shake\"``. Gestures are always\nrepresented as strings.\n\n:return: The current gesture\"\"\"\n ...\n\ndef is_gesture(name: str) -> bool:\n \"\"\"\ud574\ub2f9 \uc774\ub984\uc758 \uc81c\uc2a4\ucc98\uac00 \ud604\uc7ac \ud65c\uc131\ud654 \uc0c1\ud0dc\uc778\uc9c0 \ud655\uc778\ud569\ub2c8\ub2e4.\n\nExample: ``accelerometer.is_gesture('shake')``\n\nMicroPython understands the following gesture names: ``\"up\"``, ``\"down\"``,\n``\"left\"``, ``\"right\"``, ``\"face up\"``, ``\"face down\"``, ``\"freefall\"``,\n``\"3g\"``, ``\"6g\"``, ``\"8g\"``, ``\"shake\"``. Gestures are always\nrepresented as strings.\n\n:param name: \uc81c\uc2a4\uccd0 \uc774\ub984.\n:return: ``True`` if the gesture is active, ``False`` otherwise.\"\"\"\n ...\n\ndef was_gesture(name: str) -> bool:\n \"\"\"\ud574\ub2f9 \uc774\ub984\uc758 \uc81c\uc2a4\ucc98\uac00 \ub9c8\uc9c0\ub9c9 \ud638\ucd9c \uc774\ud6c4\ub85c \ud65c\uc131\ud654\ub41c \uc801\uc774 \uc788\ub294\uc9c0 \ud655\uc778\ud569\ub2c8\ub2e4.\n\nExample: ``accelerometer.was_gesture('shake')``\n\nMicroPython understands the following gesture names: ``\"up\"``, ``\"down\"``,\n``\"left\"``, ``\"right\"``, ``\"face up\"``, ``\"face down\"``, ``\"freefall\"``,\n``\"3g\"``, ``\"6g\"``, ``\"8g\"``, ``\"shake\"``. Gestures are always\nrepresented as strings.\n\n:param name: \uc81c\uc2a4\ucc98 \uc774\ub984\uc785\ub2c8\ub2e4.\n:return: ``True`` if the gesture was active since the last call, ``False`` otherwise.\"\"\"\n\ndef get_gestures() -> Tuple[str, ...]:\n \"\"\"\uc81c\uc2a4\ucc98 \uae30\ub85d\uc758 \ud29c\ud50c\uc744 \ubc18\ud658\ud569\ub2c8\ub2e4.\n\nExample: ``accelerometer.get_gestures()``\n\nClears the gesture history before returning.\n\nGestures are not updated in the background so there needs to be constant\ncalls to some accelerometer method to do the gesture detection. Usually\ngestures can be detected using a loop with a small :func:`microbit.sleep` delay.\n\n:return: The history as a tuple, most recent last.\"\"\"\n ...\n\ndef set_range(value: int) -> None:\n \"\"\"Set the accelerometer sensitivity range, in g (standard gravity), to the closest values supported by the hardware, so it rounds to either ``2``, ``4``, or ``8`` g.\n\nExample: ``accelerometer.set_range(8)``\n\n:param value: New range for the accelerometer, an integer in ``g``.\"\"\"", "/typeshed/stdlib/microbit/audio.pyi": "\"\"\"micro:bit\uc744 \ud65c\uc6a9\ud574 \uc18c\ub9ac\ub97c \uc7ac\uc0dd\ud569\ub2c8\ub2e4(V1 \ud638\ud658\uc744 \uc704\ud574\uc11c\ub294 ``audio``\ub97c \uac00\uc838\uc624\uc138\uc694).\"\"\"\nfrom ..microbit import MicroBitDigitalPin, Sound, pin0\nfrom typing import ClassVar, Iterable, Union\n\ndef play(source: Union[Iterable[AudioFrame], Sound, SoundEffect], wait: bool=True, pin: MicroBitDigitalPin=pin0, return_pin: Union[MicroBitDigitalPin, None]=None) -> None:\n \"\"\"Play a built-in sound, sound effect or custom audio frames.\n\nExample: ``audio.play(Sound.GIGGLE)``\n\n:param source: A built-in ``Sound`` such as ``Sound.GIGGLE``, a ``SoundEffect`` or sample data as an iterable of ``AudioFrame`` objects.\n:param wait: ``wait``\uc774 ``True``\uc778 \uacbd\uc6b0 \uc0ac\uc6b4\ub4dc \uc7ac\uc0dd\uc774 \uc644\ub8cc\ub420 \ub54c\uae4c\uc9c0 \uc774 \ud568\uc218\uac00 \ucc28\ub2e8\ub429\ub2c8\ub2e4.\n:param pin: (\ud540) ``pin0``\uc758 \uae30\ubcf8\uac12\uc744 \ub36e\uc5b4\uc4f0\ub294 \ub370 \uc0ac\uc6a9\ud560 \ucd9c\ub825 \ud540\uc744 \ud2b9\uc815\ud558\ub294 \uc778\uc790\uc785\ub2c8\ub2e4(\uc120\ud0dd \uc0ac\ud56d). \uc0ac\uc6b4\ub4dc\ub97c \uc7ac\uc0dd\ud558\uace0 \uc2f6\uc9c0 \uc54a\ub2e4\uba74 ``pin=None``\uc744 \uc0ac\uc6a9\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.\n:param return_pin: \uc811\uc9c0 \ub300\uc2e0 \uc678\ubd80 \uc2a4\ud53c\ucee4\uc5d0 \uc5f0\uacb0\ud560 \ucc28\ub3d9 \uc5e3\uc9c0 \ucee4\ub125\ud130 \ud540\uc744 \ud2b9\uc815\ud569\ub2c8\ub2e4. **V2** \uc218\uc815 \ubc84\uc804\uc5d0\uc11c\ub294 \ubb34\uc2dc\ud569\ub2c8\ub2e4.\"\"\"\n\ndef is_playing() -> bool:\n \"\"\"\uc18c\ub9ac\uac00 \uc7ac\uc0dd \uc911\uc778\uc9c0 \uccb4\ud06c\ud569\ub2c8\ub2e4.\n\nExample: ``audio.is_playing()``\n\n:return: ``True`` if audio is playing, otherwise ``False``.\"\"\"\n ...\n\ndef stop() -> None:\n \"\"\"\ubaa8\ub4e0 \uc624\ub514\uc624 \ud50c\ub808\uc774\ubc31\uc744 \uc911\uc9c0\ud569\ub2c8\ub2e4.\n\nExample: ``audio.stop()``\"\"\"\n ...\n\nclass SoundEffect:\n \"\"\"A sound effect, composed by a set of parameters configured via the constructor or attributes.\"\"\"\n WAVEFORM_SINE: ClassVar[int]\n \"\"\"Sine wave option used for the ``waveform`` parameter.\"\"\"\n WAVEFORM_SAWTOOTH: ClassVar[int]\n \"\"\"Sawtooth wave option used for the ``waveform`` parameter.\"\"\"\n WAVEFORM_TRIANGLE: ClassVar[int]\n \"\"\"Triangle wave option used for the ``waveform`` parameter.\"\"\"\n WAVEFORM_SQUARE: ClassVar[int]\n \"\"\"Square wave option used for the ``waveform`` parameter.\"\"\"\n WAVEFORM_NOISE: ClassVar[int]\n \"\"\"Noise option used for the ``waveform`` parameter.\"\"\"\n SHAPE_LINEAR: ClassVar[int]\n \"\"\"Linear interpolation option used for the ``shape`` parameter.\"\"\"\n SHAPE_CURVE: ClassVar[int]\n \"\"\"Curve interpolation option used for the ``shape`` parameter.\"\"\"\n SHAPE_LOG: ClassVar[int]\n \"\"\"Logarithmic interpolation option used for the ``shape`` parameter.\"\"\"\n FX_NONE: ClassVar[int]\n \"\"\"No effect option used for the ``fx`` parameter.\"\"\"\n FX_TREMOLO: ClassVar[int]\n \"\"\"Tremelo effect option used for the ``fx`` parameter.\"\"\"\n FX_VIBRATO: ClassVar[int]\n \"\"\"Vibrato effect option used for the ``fx`` parameter.\"\"\"\n FX_WARBLE: ClassVar[int]\n \"\"\"Warble effect option used for the ``fx`` parameter.\"\"\"\n freq_start: int\n \"\"\"Start frequency in Hertz (Hz), a number between ``0`` and ``9999``\"\"\"\n freq_end: int\n \"\"\"End frequency in Hertz (Hz), a number between ``0`` and ``9999``\"\"\"\n duration: int\n \"\"\"Duration of the sound in milliseconds, a number between ``0`` and ``9999``\"\"\"\n vol_start: int\n \"\"\"Start volume value, a number between ``0`` and ``255``\"\"\"\n vol_end: int\n \"\"\"End volume value, a number between ``0`` and ``255``\"\"\"\n waveform: int\n \"\"\"Type of waveform shape, one of these values: ``WAVEFORM_SINE``, ``WAVEFORM_SAWTOOTH``, ``WAVEFORM_TRIANGLE``, ``WAVEFORM_SQUARE``, ``WAVEFORM_NOISE`` (randomly generated noise)\"\"\"\n fx: int\n \"\"\"Effect to add on the sound, one of the following values: ``FX_TREMOLO``, ``FX_VIBRATO``, ``FX_WARBLE``, or ``FX_NONE``\"\"\"\n shape: int\n \"\"\"The type of the interpolation curve between the start and end frequencies, different wave shapes have different rates of change in frequency. One of the following values: ``SHAPE_LINEAR``, ``SHAPE_CURVE``, ``SHAPE_LOG``\"\"\"\n\n def __init__(self, freq_start: int=500, freq_end: int=2500, duration: int=500, vol_start: int=255, vol_end: int=0, waveform: int=WAVEFORM_SQUARE, fx: int=FX_NONE, shape: int=SHAPE_LOG):\n \"\"\"Create a new sound effect. (string)\n\nExample: ``my_effect = SoundEffect(duration=1000)``\n\nAll the parameters are optional, with default values as shown above, and\nthey can all be modified via attributes of the same name. For example, we\ncan first create an effect ``my_effect = SoundEffect(duration=1000)``,\nand then change its attributes ``my_effect.duration = 500``.\n\n:param freq_start: Start frequency in Hertz (Hz), a number between ``0`` and ``9999``.\n:param freq_end: End frequency in Hertz (Hz), a number between ``0`` and ``9999``.\n:param duration: Duration of the sound in milliseconds, a number between ``0`` and ``9999``.\n:param vol_start: Start volume value, a number between ``0`` and ``255``.\n:param vol_end: End volume value, a number between ``0`` and ``255``.\n:param waveform: Type of waveform shape, one of these values: ``WAVEFORM_SINE``, ``WAVEFORM_SAWTOOTH``, ``WAVEFORM_TRIANGLE``, ``WAVEFORM_SQUARE``, ``WAVEFORM_NOISE`` (randomly generated noise).\n:param fx: Effect to add on the sound, one of the following values: ``FX_TREMOLO``, ``FX_VIBRATO``, ``FX_WARBLE``, or ``FX_NONE``.\n:param shape: The type of the interpolation curve between the start and end frequencies, different wave shapes have different rates of change in frequency. One of the following values: ``SHAPE_LINEAR``, ``SHAPE_CURVE``, ``SHAPE_LOG``.\"\"\"\n\n def copy(self) -> SoundEffect:\n \"\"\"Create a copy of this ``SoundEffect``.\n\nExample: ``sound_2 = sound_1.copy()``\n\n:return: A copy of the SoundEffect.\"\"\"\n\nclass AudioFrame:\n \"\"\"``AudioFrame`` \uc624\ube0c\uc81d\ud2b8\ub294 \ubd80\ud638 \uc5c6\ub294 \ubc14\uc774\ud2b8 \uc0d8\ud50c 32\uac1c\uc758 \ub9ac\uc2a4\ud2b8\uc785\ub2c8\ub2e4(0\uc5d0\uc11c 255 \uc0ac\uc774\uc758 \ubaa8\ub4e0 \uc22b\uc790).\n\nIt takes just over 4 ms to play a single frame.\n\nExample::\n\n frame = AudioFrame()\n for i in range(len(frame)):\n frame[i] = 252 - i * 8\"\"\"\n\n def copyfrom(self, other: AudioFrame) -> None:\n \"\"\"Overwrite the data in this ``AudioFrame`` with the data from another ``AudioFrame`` instance.\n\nExample: ``my_frame.copyfrom(source_frame)``\n\n:param other: ``AudioFrame`` instance from which to copy the data.\"\"\"\n\n def __len__(self) -> int:\n ...\n\n def __setitem__(self, key: int, value: int) -> None:\n ...\n\n def __getitem__(self, key: int) -> int:\n ...", @@ -46,6 +45,7 @@ "/typeshed/stdlib/microbit/speaker.pyi": "\"\"\"\ub0b4\uc7a5 \uc2a4\ud53c\ucee4\ub97c \uc81c\uc5b4\ud569\ub2c8\ub2e4(V2 \uc804\uc6a9).\"\"\"\n\ndef off() -> None:\n \"\"\"\uc2a4\ud53c\ucee4\ub97c \ub055\ub2c8\ub2e4.\n\nExample: ``speaker.off()``\n\nThis does not disable sound output to an edge connector pin.\"\"\"\n ...\n\ndef on() -> None:\n \"\"\"\uc2a4\ud53c\ucee4\ub97c \ucf2d\ub2c8\ub2e4.\n\nExample: ``speaker.on()``\"\"\"\n ...", "/typeshed/stdlib/microbit/spi.pyi": "\"\"\"\uc9c1\ub82c \uc8fc\ubcc0 \uc7a5\uce58 \uc778\ud130\ud398\uc774\uc2a4(SPI) \ubc84\uc2a4\ub97c \uc0ac\uc6a9\ud574 \uc7a5\uce58\uc640 \ud1b5\uc2e0\ud569\ub2c8\ub2e4.\"\"\"\nfrom _typeshed import ReadableBuffer, WriteableBuffer\nfrom ..microbit import pin13, pin14, pin15, MicroBitDigitalPin\n\ndef init(baudrate: int=1000000, bits: int=8, mode: int=0, sclk: MicroBitDigitalPin=pin13, mosi: MicroBitDigitalPin=pin15, miso: MicroBitDigitalPin=pin14) -> None:\n \"\"\"SPI \ud1b5\uc2e0\uc744 \uc2dc\uc791\ud569\ub2c8\ub2e4. (string)\n\nExample: ``spi.init()``\n\nFor correct communication, the parameters have to be the same on both communicating devices.\n\n:param baudrate: \ud1b5\uc2e0 \uc18d\ub3c4\uc785\ub2c8\ub2e4.\n:param bits: \uac01 \uc804\uc1a1\uc758 \ube44\ud2b8\uc758 \ub108\ube44\uc785\ub2c8\ub2e4. \ud604\uc7ac ``bits=8``\ub9cc \uc9c0\uc6d0\ub418\ub098 \ud5a5\ud6c4 \ubcc0\uacbd\ub420 \uc218 \uc788\uc2b5\ub2c8\ub2e4.\n:param mode: \ud074\ub7ed \uadf9\uc131\uacfc \ud398\uc774\uc988\uc758 \uc870\ud569\uc744 \uacb0\uc815\ud569\ub2c8\ub2e4. \uc628\ub77c\uc778 \ud14c\uc774\ube14\uc744 \ucc38\uc870\ud558\uc138\uc694 `_.\n:param sclk: sclk \ud540(\uae30\ubcf8\uac12 13)\n:param mosi: mosi \ud540(\uae30\ubcf8\uac12 15)\n:param miso: miso \ud540(\uae30\ubcf8\uac12 14)\"\"\"\n ...\n\ndef read(nbytes: int) -> bytes:\n \"\"\"\ubc14\uc774\ud2b8\ub97c \uc77d\uc2b5\ub2c8\ub2e4.\n\nExample: ``spi.read(64)``\n\n:param nbytes: \uc77d\uc744 \ubc14\uc774\ud2b8\uc758 \ucd5c\ub300 \uc218\uc785\ub2c8\ub2e4.\n:return: The bytes read.\"\"\"\n ...\n\ndef write(buffer: ReadableBuffer) -> None:\n \"\"\"\ubc84\uc2a4\uc5d0 \ubc14\uc774\ud2b8\ub97c \uc791\uc131\ud569\ub2c8\ub2e4.\n\nExample: ``spi.write(bytes([1, 2, 3]))``\n\n:param buffer: \ub370\uc774\ud130\ub97c \uc77d\uc744 \ubc84\ud37c\uc785\ub2c8\ub2e4.\"\"\"\n ...\n\ndef write_readinto(out: WriteableBuffer, in_: ReadableBuffer) -> None:\n \"\"\"\ubc84\uc2a4\uc5d0 ``out`` \ubc84\ud37c\ub97c \uc791\uc131\ud558\uace0 \ubc1c\uc0dd\ud558\ub294 ``in_`` \ubc84\ud37c\uc758 \ubaa8\ub4e0 \uc751\ub2f5\uc744 \uc77d\uc2b5\ub2c8\ub2e4.\n\nExample: ``spi.write_readinto(out_buffer, in_buffer)``\n\nThe length of the buffers should be the same. The buffers can be the same object.\n\n:param out: \uc751\ub2f5\uc744 \uc791\uc131\ud560 \ubc84\ud37c\uc785\ub2c8\ub2e4.\n:param in_: \ub370\uc774\ud130\ub97c \uc77d\uc744 \ubc84\ud37c\uc785\ub2c8\ub2e4.\"\"\"\n ...", "/typeshed/stdlib/microbit/uart.pyi": "\"\"\"\uc9c1\ub82c \uc778\ud130\ud398\uc774\uc2a4\ub97c \uc0ac\uc6a9\ud574 \uc7a5\uce58\uc640 \ud1b5\uc2e0\ud569\ub2c8\ub2e4.\"\"\"\nfrom _typeshed import WriteableBuffer\nfrom ..microbit import MicroBitDigitalPin\nfrom typing import Optional, Union\nODD: int\n\"\"\"\ud640\uc218 \ud328\ub9ac\ud2f0\"\"\"\nEVEN: int\n\"\"\"\uc9dd\uc218 \ud328\ub9ac\ud2f0\"\"\"\n\ndef init(baudrate: int=9600, bits: int=8, parity: Optional[int]=None, stop: int=1, tx: Optional[MicroBitDigitalPin]=None, rx: Optional[MicroBitDigitalPin]=None) -> None:\n \"\"\"\uc9c1\ub82c \ud1b5\uc2e0\uc744 \uc2dc\uc791\ud569\ub2c8\ub2e4. (string)\n\nExample: ``uart.init(115200, tx=pin0, rx=pin1)``\n\n:param baudrate: \ud1b5\uc2e0 \uc18d\ub3c4\uc785\ub2c8\ub2e4.\n:param bits: \uc804\uc1a1\ub418\ub294 \ubc14\uc774\ud2b8\uc758 \ud06c\uae30\uc785\ub2c8\ub2e4. micro:bit\ub294 8\ubc14\uc774\ud2b8\ub9cc \uc9c0\uc6d0\ud569\ub2c8\ub2e4.\n:param parity: (\ud328\ub9ac\ud2f0) \ud328\ub9ac\ud2f0\uac00 \uccb4\ud06c\ub418\ub294 \ubc29\uc2dd\uc73c\ub85c ``None``, ``uart.ODD`` \ub610\ub294 ``uart.EVEN``\uc744 \uc0ac\uc6a9\ud569\ub2c8\ub2e4.\n:param stop: \uc2a4\ud1b1 \ube44\ud2b8\uc758 \ubc88\ud638\uc785\ub2c8\ub2e4. micro:bit\ub294 1\uc774\uc5b4\uc57c \ud569\ub2c8\ub2e4.\n:param tx: \uc804\uc1a1\ud558\ub294 \ud540\uc785\ub2c8\ub2e4.\n:param rx: \uc218\uc2e0\ud558\ub294 \ud540\uc785\ub2c8\ub2e4.\n\nInitializing the UART on external pins will cause the Python console on\nUSB to become unaccessible, as it uses the same hardware. To bring the\nconsole back you must reinitialize the UART without passing anything for\n``tx`` or ``rx`` (or passing ``None`` to these arguments). This means\nthat calling ``uart.init(115200)`` is enough to restore the Python console.\n\nFor more details see `the online documentation `_.\"\"\"\n ...\n\ndef any() -> bool:\n \"\"\"\ub300\uae30 \uc911\uc778 \ub370\uc774\ud130\uac00 \uc788\ub294\uc9c0 \ud655\uc778\ud569\ub2c8\ub2e4.\n\nExample: ``uart.any()``\n\n:return: ``True`` if any data is waiting, else ``False``.\"\"\"\n ...\n\ndef read(nbytes: Optional[int]=None) -> Optional[bytes]:\n \"\"\"\ubc14\uc774\ud2b8\ub97c \uc77d\uc2b5\ub2c8\ub2e4.\n\nExample: ``uart.read()``\n\n:param nbytes: ``nbytes``\uac00 \ud2b9\uc815\ub418\uc5b4 \uc788\ub2e4\uba74 \ud574\ub2f9 \ubc14\uc774\ud2b8 \uc218\ub9cc\ud07c \uc77d\uc2b5\ub2c8\ub2e4. \ud2b9\uc815\ub418\uc9c0 \uc54a\uc740 \uacbd\uc6b0 \ucd5c\ub300\ud55c \ub9ce\uc740 \ubc14\uc774\ud2b8\ub97c \uc77d\uc2b5\ub2c8\ub2e4.\n:return: A bytes object or ``None`` on timeout\"\"\"\n ...\n\ndef readinto(buf: WriteableBuffer, nbytes: Optional[int]=None) -> Optional[int]:\n \"\"\"``buf``\ub85c \ubc14\uc774\ud2b8\ub97c \uc77d\uc2b5\ub2c8\ub2e4.\n\nExample: ``uart.readinto(input_buffer)``\n\n:param buf: \ubc14\uc774\ud2b8\ub97c \uae30\ub85d\ud560 \ubc84\ud37c\uc785\ub2c8\ub2e4.\n:param nbytes: ``nbytes``\uac00 \ud2b9\uc815\ub418\uc5b4 \uc788\ub2e4\uba74 \ud574\ub2f9 \ubc14\uc774\ud2b8 \uc218\ub9cc\ud07c \uc77d\uc2b5\ub2c8\ub2e4. \ud2b9\uc815\ub418\uc9c0 \uc54a\uc740 \uacbd\uc6b0 ``len(buf)``\ubc14\uc774\ud2b8\ub97c \uc77d\uc2b5\ub2c8\ub2e4.\n:return: number of bytes read and stored into ``buf`` or ``None`` on timeout.\"\"\"\n ...\n\ndef readline() -> Optional[bytes]:\n \"\"\"\uc0c8\ub85c\uc6b4 \uc904 \ubb38\uc790\ub85c \ub05d\ub098\ub294 \uc904\uc744 \uc77d\uc2b5\ub2c8\ub2e4.\n\nExample: ``uart.readline()``\n\n:return: The line read or ``None`` on timeout. The newline character is included in the returned bytes.\"\"\"\n ...\n\ndef write(buf: Union[bytes, str]) -> Optional[int]:\n \"\"\"\ubc84\uc2a4\uc5d0 \ubc84\ud37c\ub97c \uae30\ub85d\ud569\ub2c8\ub2e4.\n\nExample: ``uart.write('hello world')``\n\n:param buf: \ubc14\uc774\ud2b8 \uc624\ube0c\uc81d\ud2b8 \ub610\ub294 \ubb38\uc790\uc5f4\uc785\ub2c8\ub2e4.\n:return: The number of bytes written, or ``None`` on timeout.\n\nExamples::\n\n uart.write('hello world')\n uart.write(b'hello world')\n uart.write(bytes([1, 2, 3]))\"\"\"\n ...", + "/typeshed/stdlib/collections/__init__.pyi": "import sys\nfrom typing import (\n Any,\n Dict,\n Generic,\n ItemsView,\n Iterable,\n Iterator,\n KeysView,\n Optional,\n Reversible,\n Tuple,\n Type,\n TypeVar,\n Union,\n ValuesView,\n)\n\n_S = TypeVar(\"_S\")\n_T = TypeVar(\"_T\")\n_KT = TypeVar(\"_KT\")\n_VT = TypeVar(\"_VT\")\n\nif sys.version_info >= (3, 7):\n def namedtuple(\n typename: str,\n field_names: Union[str, Iterable[str]],\n *,\n rename: bool = ...,\n module: Optional[str] = ...,\n defaults: Optional[Iterable[Any]] = ...,\n ) -> Type[Tuple[Any, ...]]: ...\n\nelse:\n def namedtuple(\n typename: str,\n field_names: Union[str, Iterable[str]],\n *,\n verbose: bool = ...,\n rename: bool = ...,\n module: Optional[str] = ...,\n ) -> Type[Tuple[Any, ...]]: ...\n\nclass _OrderedDictKeysView(KeysView[_KT], Reversible[_KT]):\n def __reversed__(self) -> Iterator[_KT]: ...\n\nclass _OrderedDictItemsView(ItemsView[_KT, _VT], Reversible[Tuple[_KT, _VT]]):\n def __reversed__(self) -> Iterator[Tuple[_KT, _VT]]: ...\n\nclass _OrderedDictValuesView(ValuesView[_VT], Reversible[_VT]):\n def __reversed__(self) -> Iterator[_VT]: ...\n\nclass OrderedDict(Dict[_KT, _VT], Reversible[_KT], Generic[_KT, _VT]):\n def popitem(self, last: bool = ...) -> Tuple[_KT, _VT]: ...\n def move_to_end(self, key: _KT, last: bool = ...) -> None: ...\n def copy(self: _S) -> _S: ...\n def __reversed__(self) -> Iterator[_KT]: ...\n def keys(self) -> _OrderedDictKeysView[_KT]: ...\n def items(self) -> _OrderedDictItemsView[_KT, _VT]: ...\n def values(self) -> _OrderedDictValuesView[_VT]: ...\n", "/src/pyrightconfig.json": "{ \n \"pythonVersion\": \"3.6\",\n \"pythonPlatform\": \"Linux\",\n \"typeCheckingMode\": \"basic\",\n \"typeshedPath\": \"/typeshed/\",\n \"reportMissingModuleSource\": false,\n \"reportWildcardImportFromLibrary\": false,\n \"verboseOutput\": true\n }\n" } } \ No newline at end of file diff --git a/src/micropython/main/typeshed.zh-cn.json b/src/micropython/main/typeshed.zh-cn.json index 1cef039a2..2767335d6 100644 --- a/src/micropython/main/typeshed.zh-cn.json +++ b/src/micropython/main/typeshed.zh-cn.json @@ -35,7 +35,6 @@ "/typeshed/stdlib/usys.pyi": "from sys import *\n", "/typeshed/stdlib/utime.pyi": "from time import *\n", "/typeshed/stdlib/_typeshed/__init__.pyi": "# Utility types for typeshed\n#\n# See the README.md file in this directory for more information.\n\nimport array\nimport sys\nfrom os import PathLike\nfrom typing import AbstractSet, Any, Container, Iterable, Protocol, Tuple, TypeVar, Union\nfrom typing_extensions import Literal, final\n\n_KT = TypeVar(\"_KT\")\n_KT_co = TypeVar(\"_KT_co\", covariant=True)\n_KT_contra = TypeVar(\"_KT_contra\", contravariant=True)\n_VT = TypeVar(\"_VT\")\n_VT_co = TypeVar(\"_VT_co\", covariant=True)\n_T = TypeVar(\"_T\")\n_T_co = TypeVar(\"_T_co\", covariant=True)\n_T_contra = TypeVar(\"_T_contra\", contravariant=True)\n\n# Use for \"self\" annotations:\n# def __enter__(self: Self) -> Self: ...\nSelf = TypeVar(\"Self\") # noqa Y001\n\n# stable\nclass IdentityFunction(Protocol):\n def __call__(self, __x: _T) -> _T: ...\n\nclass SupportsLessThan(Protocol):\n def __lt__(self, __other: Any) -> bool: ...\n\nSupportsLessThanT = TypeVar(\"SupportsLessThanT\", bound=SupportsLessThan) # noqa: Y001\n\nclass SupportsDivMod(Protocol[_T_contra, _T_co]):\n def __divmod__(self, __other: _T_contra) -> _T_co: ...\n\nclass SupportsRDivMod(Protocol[_T_contra, _T_co]):\n def __rdivmod__(self, __other: _T_contra) -> _T_co: ...\n\nclass SupportsLenAndGetItem(Protocol[_T_co]):\n def __len__(self) -> int: ...\n def __getitem__(self, __k: int) -> _T_co: ...\n\n# Mapping-like protocols\n\n# stable\nclass SupportsItems(Protocol[_KT_co, _VT_co]):\n def items(self) -> AbstractSet[Tuple[_KT_co, _VT_co]]: ...\n\n# stable\nclass SupportsKeysAndGetItem(Protocol[_KT, _VT_co]):\n def keys(self) -> Iterable[_KT]: ...\n def __getitem__(self, __k: _KT) -> _VT_co: ...\n\n# stable\nclass SupportsGetItem(Container[_KT_contra], Protocol[_KT_contra, _VT_co]):\n def __getitem__(self, __k: _KT_contra) -> _VT_co: ...\n\n# stable\nclass SupportsItemAccess(SupportsGetItem[_KT_contra, _VT], Protocol[_KT_contra, _VT]):\n def __setitem__(self, __k: _KT_contra, __v: _VT) -> None: ...\n def __delitem__(self, __v: _KT_contra) -> None: ...\n\n# These aliases are simple strings in Python 2.\nStrPath = Union[str, PathLike[str]] # stable\nBytesPath = Union[bytes, PathLike[bytes]] # stable\nStrOrBytesPath = Union[str, bytes, PathLike[str], PathLike[bytes]] # stable\n\nOpenTextModeUpdating = Literal[\n \"r+\",\n \"+r\",\n \"rt+\",\n \"r+t\",\n \"+rt\",\n \"tr+\",\n \"t+r\",\n \"+tr\",\n \"w+\",\n \"+w\",\n \"wt+\",\n \"w+t\",\n \"+wt\",\n \"tw+\",\n \"t+w\",\n \"+tw\",\n \"a+\",\n \"+a\",\n \"at+\",\n \"a+t\",\n \"+at\",\n \"ta+\",\n \"t+a\",\n \"+ta\",\n \"x+\",\n \"+x\",\n \"xt+\",\n \"x+t\",\n \"+xt\",\n \"tx+\",\n \"t+x\",\n \"+tx\",\n]\nOpenTextModeWriting = Literal[\"w\", \"wt\", \"tw\", \"a\", \"at\", \"ta\", \"x\", \"xt\", \"tx\"]\nOpenTextModeReading = Literal[\"r\", \"rt\", \"tr\", \"U\", \"rU\", \"Ur\", \"rtU\", \"rUt\", \"Urt\", \"trU\", \"tUr\", \"Utr\"]\nOpenTextMode = Union[OpenTextModeUpdating, OpenTextModeWriting, OpenTextModeReading]\nOpenBinaryModeUpdating = Literal[\n \"rb+\",\n \"r+b\",\n \"+rb\",\n \"br+\",\n \"b+r\",\n \"+br\",\n \"wb+\",\n \"w+b\",\n \"+wb\",\n \"bw+\",\n \"b+w\",\n \"+bw\",\n \"ab+\",\n \"a+b\",\n \"+ab\",\n \"ba+\",\n \"b+a\",\n \"+ba\",\n \"xb+\",\n \"x+b\",\n \"+xb\",\n \"bx+\",\n \"b+x\",\n \"+bx\",\n]\nOpenBinaryModeWriting = Literal[\"wb\", \"bw\", \"ab\", \"ba\", \"xb\", \"bx\"]\nOpenBinaryModeReading = Literal[\"rb\", \"br\", \"rbU\", \"rUb\", \"Urb\", \"brU\", \"bUr\", \"Ubr\"]\nOpenBinaryMode = Union[OpenBinaryModeUpdating, OpenBinaryModeReading, OpenBinaryModeWriting]\n\n# stable\nclass HasFileno(Protocol):\n def fileno(self) -> int: ...\n\nFileDescriptor = int # stable\nFileDescriptorLike = Union[int, HasFileno] # stable\n\n# stable\nclass SupportsRead(Protocol[_T_co]):\n def read(self, __length: int = ...) -> _T_co: ...\n\n# stable\nclass SupportsReadline(Protocol[_T_co]):\n def readline(self, __length: int = ...) -> _T_co: ...\n\n# stable\nclass SupportsNoArgReadline(Protocol[_T_co]):\n def readline(self) -> _T_co: ...\n\n# stable\nclass SupportsWrite(Protocol[_T_contra]):\n def write(self, __s: _T_contra) -> Any: ...\n\nReadableBuffer = Union[bytes, bytearray, memoryview, array.array[Any]] # stable\nWriteableBuffer = Union[bytearray, memoryview, array.array[Any]] # stable\n\n# stable\nif sys.version_info >= (3, 10):\n from types import NoneType as NoneType\nelse:\n # Used by type checkers for checks involving None (does not exist at runtime)\n @final\n class NoneType:\n def __bool__(self) -> Literal[False]: ...\n", - "/typeshed/stdlib/collections/__init__.pyi": "import sys\nfrom typing import (\n Any,\n Dict,\n Generic,\n ItemsView,\n Iterable,\n Iterator,\n KeysView,\n Optional,\n Reversible,\n Tuple,\n Type,\n TypeVar,\n Union,\n ValuesView,\n)\n\n_S = TypeVar(\"_S\")\n_T = TypeVar(\"_T\")\n_KT = TypeVar(\"_KT\")\n_VT = TypeVar(\"_VT\")\n\nif sys.version_info >= (3, 7):\n def namedtuple(\n typename: str,\n field_names: Union[str, Iterable[str]],\n *,\n rename: bool = ...,\n module: Optional[str] = ...,\n defaults: Optional[Iterable[Any]] = ...,\n ) -> Type[Tuple[Any, ...]]: ...\n\nelse:\n def namedtuple(\n typename: str,\n field_names: Union[str, Iterable[str]],\n *,\n verbose: bool = ...,\n rename: bool = ...,\n module: Optional[str] = ...,\n ) -> Type[Tuple[Any, ...]]: ...\n\nclass _OrderedDictKeysView(KeysView[_KT], Reversible[_KT]):\n def __reversed__(self) -> Iterator[_KT]: ...\n\nclass _OrderedDictItemsView(ItemsView[_KT, _VT], Reversible[Tuple[_KT, _VT]]):\n def __reversed__(self) -> Iterator[Tuple[_KT, _VT]]: ...\n\nclass _OrderedDictValuesView(ValuesView[_VT], Reversible[_VT]):\n def __reversed__(self) -> Iterator[_VT]: ...\n\nclass OrderedDict(Dict[_KT, _VT], Reversible[_KT], Generic[_KT, _VT]):\n def popitem(self, last: bool = ...) -> Tuple[_KT, _VT]: ...\n def move_to_end(self, key: _KT, last: bool = ...) -> None: ...\n def copy(self: _S) -> _S: ...\n def __reversed__(self) -> Iterator[_KT]: ...\n def keys(self) -> _OrderedDictKeysView[_KT]: ...\n def items(self) -> _OrderedDictItemsView[_KT, _VT]: ...\n def values(self) -> _OrderedDictValuesView[_VT]: ...\n", "/typeshed/stdlib/microbit/__init__.pyi": "\"\"\"\u5f15\u811a\u3001\u56fe\u50cf\u3001\u58f0\u97f3\u3001\u6e29\u5ea6\u548c\u97f3\u91cf\u3002 (Microbit)\"\"\"\nfrom typing import Any, Callable, List, Optional, Tuple, Union, overload\nfrom _typeshed import ReadableBuffer\nfrom . import accelerometer as accelerometer\nfrom . import audio as audio\nfrom . import compass as compass\nfrom . import display as display\nfrom . import i2c as i2c\nfrom . import microphone as microphone\nfrom . import speaker as speaker\nfrom . import spi as spi\nfrom . import uart as uart\n\ndef run_every(callback: Optional[Callable[[], None]]=None, days: int=0, h: int=0, min: int=0, s: int=0, ms: int=0) -> Callable[[Callable[[], None]], Callable[[], None]]:\n \"\"\"\u8ba1\u5212\u4ee5\u65f6\u95f4\u53c2\u6570\u6307\u5b9a\u7684\u65f6\u95f4\u95f4\u9694\u8fd0\u884c\u51fd\u6570**\u4ec5\u9650V2** \u3002 (\u5468\u671f\u6027\u8fd0\u884c)\n\nExample: ``run_every(my_logging, min=5)``\n\n``run_every`` can be used in two ways:\n\nAs a Decorator - placed on top of the function to schedule. For example::\n\n @run_every(h=1, min=20, s=30, ms=50)\n def my_function():\n # Do something here\n\nAs a Function - passing the callback as a positional argument. For example::\n\n def my_function():\n # Do something here\n run_every(my_function, s=30)\n\nEach argument corresponds to a different time unit and they are additive.\nSo ``run_every(min=1, s=30)`` schedules the callback every minute and a half.\n\nWhen an exception is thrown inside the callback function it deschedules the\nfunction. To avoid this you can catch exceptions with ``try/except``.\n\n:param callback: \u5728\u63d0\u4f9b\u7684\u65f6\u95f4\u95f4\u9694\u5185\u8c03\u7528\u7684\u51fd\u6570\u3002\u7528\u4f5c\u88c5\u9970\u5668\u65f6\u7701\u7565\u3002\n:param days: (\u5929) \u8bbe\u7f6e\u5b9a\u65f6\u8ba1\u5212\u7684\u65e5\u671f\u6807\u8bb0\u3002\n:param h: \u8bbe\u7f6e\u5b9a\u65f6\u8ba1\u5212\u7684\u5c0f\u65f6\u6807\u8bb0\u3002\n:param min: (\u5206\u949f) \u8bbe\u7f6e\u5b9a\u65f6\u8ba1\u5212\u7684\u5206\u949f\u6807\u8bb0\u3002\n:param s: (\u79d2) \u8bbe\u7f6e\u5b9a\u65f6\u8ba1\u5212\u7684\u79d2\u6807\u8bb0\u3002\n:param ms: (\u6beb\u79d2) \u8bbe\u7f6e\u5b9a\u65f6\u8ba1\u5212\u7684\u6beb\u79d2\u6807\u8bb0\u3002\"\"\"\n\ndef panic(n: int) -> None:\n \"\"\"\u8fdb\u5165 panic \uff08\u6050\u614c\uff09\u6a21\u5f0f\u3002 (\u6050\u614c)\n\nExample: ``panic(127)``\n\n:param n: \u4e00\u4e2a <= 255 \u7684\u4efb\u610f\u6574\u6570\uff0c\u4ee5\u8868\u793a\u4e00\u4e2a\u72b6\u6001\u3002\n\nRequires restart.\"\"\"\n\ndef reset() -> None:\n \"\"\"\u91cd\u542f\u4e3b\u677f\u3002\"\"\"\n\n@overload\ndef scale(value: float, from_: Tuple[float, float], to: Tuple[int, int]) -> int:\n \"\"\"\u5c06\u4e00\u4e2a\u6570\u503c\u4ece\u4e00\u4e2a\u8303\u56f4\u8f6c\u6362\u4e3a\u6574\u6570\u8303\u56f4\u3002 (\u8303\u56f4)\n\nExample: ``volume = scale(accelerometer.get_x(), from_=(-2000, 2000), to=(0, 255))``\n\nFor example, to convert an accelerometer X value to a speaker volume.\n\nIf one of the numbers in the ``to`` parameter is a floating point\n(i.e a decimal number like ``10.0``), this function will return a\nfloating point number.\n\n temp_fahrenheit = scale(30, from_=(0.0, 100.0), to=(32.0, 212.0))\n\n:param value: \u8981\u8f6c\u6362\u7684\u6570\u5b57\u3002\n:param from_: (\u4ece) \u4e00\u4e2a\u5143\u7ec4\uff0c\u7528\u4e8e\u5b9a\u4e49\u8981\u8f6c\u6362\u7684\u8303\u56f4\u3002\n:param to: (\u81f3) \u4e00\u4e2a\u5143\u7ec4\uff0c\u7528\u4e8e\u5b9a\u4e49\u8981\u8f6c\u6362\u5230\u7684\u8303\u56f4\u3002\n:return: The ``value`` converted to the ``to`` range.\"\"\"\n\n@overload\ndef scale(value: float, from_: Tuple[float, float], to: Tuple[float, float]) -> float:\n \"\"\"\u5c06\u4e00\u4e2a\u6570\u503c\u4ece\u4e00\u4e2a\u8303\u56f4\u8f6c\u6362\u4e3a\u6d6e\u70b9\u6570\u8303\u56f4\u3002 (\u8303\u56f4)\n\nExample: ``temp_fahrenheit = scale(30, from_=(0.0, 100.0), to=(32.0, 212.0))``\n\nFor example, to convert temperature from a Celsius scale to Fahrenheit.\n\nIf one of the numbers in the ``to`` parameter is a floating point\n(i.e a decimal number like ``10.0``), this function will return a\nfloating point number.\nIf they are both integers (i.e ``10``), it will return an integer::\n\n returns_int = scale(accelerometer.get_x(), from_=(-2000, 2000), to=(0, 255))\n\n:param value: \u8981\u8f6c\u6362\u7684\u6570\u5b57\u3002\n:param from_: (\u4ece) \u4e00\u4e2a\u5143\u7ec4\uff0c\u7528\u4e8e\u5b9a\u4e49\u8981\u8f6c\u6362\u7684\u8303\u56f4\u3002\n:param to: (\u81f3) \u4e00\u4e2a\u5143\u7ec4\uff0c\u7528\u4e8e\u5b9a\u4e49\u8981\u8f6c\u6362\u5230\u7684\u8303\u56f4\u3002\n:return: The ``value`` converted to the ``to`` range.\"\"\"\n\ndef sleep(n: float) -> None:\n \"\"\"\u7b49\u5f85 ``n`` \u6beb\u79d2\u3002 (\u4f11\u7720)\n\nExample: ``sleep(1000)``\n\n:param n: \u8981\u7b49\u5f85\u7684\u6beb\u79d2\u6570\n\nOne second is 1000 milliseconds, so::\n\n microbit.sleep(1000)\n\nwill pause the execution for one second.\"\"\"\n\ndef running_time() -> int:\n \"\"\"\u83b7\u53d6\u4e3b\u677f\u7684\u8fd0\u884c\u65f6\u95f4\u3002\n\n:return: The number of milliseconds since the board was switched on or restarted.\"\"\"\n\ndef temperature() -> int:\n \"\"\"\u4ee5\u6444\u6c0f\u5ea6\u4e3a\u5355\u4f4d\u83b7\u53d6 micro:bit \u7684\u6e29\u5ea6\u3002\"\"\"\n\ndef set_volume(v: int) -> None:\n \"\"\"\u8bbe\u7f6e\u97f3\u91cf\u3002\n\nExample: ``set_volume(127)``\n\n:param v: \u4e00\u4e2a\u4ecb\u4e8e 0 (\u4f4e) \u548c 255 (\u9ad8) \u4e4b\u95f4\u7684\u503c\u3002\n\nOut of range values will be clamped to 0 or 255.\n\n**V2** only.\"\"\"\n ...\n\nclass Button:\n \"\"\"\u6309\u94ae ``button_a`` \u548c ``button_b`` \u7684\u7c7b\u3002\"\"\"\n\n def is_pressed(self) -> bool:\n \"\"\"\u68c0\u67e5\u6309\u94ae\u662f\u5426\u88ab\u6309\u4e0b\u3002\n\n:return: ``True`` if the specified button ``button`` is pressed, and ``False`` otherwise.\"\"\"\n ...\n\n def was_pressed(self) -> bool:\n \"\"\"\u68c0\u67e5\u6309\u94ae\u81ea\u8bbe\u5907\u542f\u52a8\u4ee5\u6765\u6216\u8005\u4e0a\u6b21\u8c03\u7528\u6b64\u65b9\u6cd5\u4e4b\u540e\u662f\u5426\u88ab\u6309\u4e0b\u3002\n\nCalling this method will clear the press state so\nthat the button must be pressed again before this method will return\n``True`` again.\n\n:return: ``True`` if the specified button ``button`` was pressed, and ``False`` otherwise\"\"\"\n ...\n\n def get_presses(self) -> int:\n \"\"\"\u83b7\u5f97\u6309\u94ae\u88ab\u6309\u4e0b\u7684\u603b\u8ba1\u6b21\u6570\uff0c\u5e76\u5728\u8fd4\u56de\u4e4b\u524d\u5c06\u8be5\u603b\u8ba1\u6b21\u6570\u91cd\u7f6e\u4e3a 0\u3002\n\n:return: The number of presses since the device started or the last time this method was called\"\"\"\n ...\nbutton_a: Button\n\"\"\"\u5de6\u952e ``Button`` \u5bf9\u8c61\u3002 (\u6309\u94ae a)\"\"\"\nbutton_b: Button\n\"\"\"\u53f3\u952e ``Button`` \u5bf9\u8c61\u3002 (\u6309\u94ae b)\"\"\"\n\nclass MicroBitDigitalPin:\n \"\"\"\u6570\u5b57\u5f15\u811a\u3002 (Microbit \u6570\u5b57\u5f15\u811a)\n\nSome pins support analog and touch features using the ``MicroBitAnalogDigitalPin`` and ``MicroBitTouchPin`` subclasses.\"\"\"\n NO_PULL: int\n PULL_UP: int\n PULL_DOWN: int\n\n def read_digital(self) -> int:\n \"\"\"\u83b7\u53d6\u5f15\u811a\u7684\u6570\u5b57\u503c\u3002\n\nExample: ``value = pin0.read_digital()``\n\n:return: 1 if the pin is high, and 0 if it's low.\"\"\"\n ...\n\n def write_digital(self, value: int) -> None:\n \"\"\"\u8bbe\u7f6e\u5f15\u811a\u7684\u6570\u5b57\u503c\u3002\n\nExample: ``pin0.write_digital(1)``\n\n:param value: 1 \u5c06\u5f15\u811a\u8bbe\u7f6e\u4e3a\u9ad8\u7535\u5e73\uff0c\u6216 0 \u5c06\u5f15\u811a\u8bbe\u7f6e\u4e3a\u4f4e\u7535\u5e73\"\"\"\n ...\n\n def set_pull(self, value: int) -> None:\n \"\"\"\u5c06\u62c9\u53d6\u72b6\u6001\u8bbe\u7f6e\u4e3a\u4ee5\u4e0b\u4e09\u4e2a\u53ef\u80fd\u7684\u503c\u4e4b\u4e00\uff1a``PULL_UP``\u3001``PULL_DOWN`` \u6216 N``NO_PULL``\u3002\n\nExample: ``pin0.set_pull(pin0.PULL_UP)``\n\n:param value: \u76f8\u5173\u5f15\u811a\u7684\u62c9\u53d6\u72b6\u6001\uff0c\u4f8b\u5982\uff1a ``pin0.PULL_UP``\u3002\"\"\"\n ...\n\n def get_pull(self) -> int:\n \"\"\"\u83b7\u53d6\u5f15\u811a\u4e0a\u7684\u62c9\u53d6\u72b6\u6001\u3002\n\nExample: ``pin0.get_pull()``\n\n:return: ``NO_PULL``, ``PULL_DOWN``, or ``PULL_UP``\n\nThese are set using the ``set_pull()`` method or automatically configured\nwhen a pin mode requires it.\"\"\"\n ...\n\n def get_mode(self) -> str:\n \"\"\"\u8fd4\u56de\u5f15\u811a\u6a21\u5f0f\u3002\n\nExample: ``pin0.get_mode()``\n\nWhen a pin is used for a specific function, like\nwriting a digital value, or reading an analog value, the pin mode\nchanges.\n\n:return: ``\"unused\"``, ``\"analog\"``, ``\"read_digital\"``, ``\"write_digital\"``, ``\"display\"``, ``\"button\"``, ``\"music\"``, ``\"audio\"``, ``\"touch\"``, ``\"i2c\"``, or ``\"spi\"``\"\"\"\n ...\n\n def write_analog(self, value: int) -> None:\n \"\"\"\u5728\u5f15\u811a\u4e0a\u8f93\u51fa PWM \u4fe1\u53f7\uff0c\u5360\u7a7a\u6bd4\u4e3a ``value``\u3002\n\nExample: ``pin0.write_analog(254)``\n\n:param value: \u4ecb\u4e8e 0\uff080% \u5360\u7a7a\u6bd4\uff09\u548c 1023\uff08100% \u5360\u7a7a\u6bd4\uff09\u4e4b\u95f4\u7684\u6574\u6570\u6216\u6d6e\u70b9\u6570\u3002\"\"\"\n\n def set_analog_period(self, period: int) -> None:\n \"\"\"\u5c06\u8f93\u51fa\u7684 PWM \u4fe1\u53f7\u7684\u5468\u671f\u8bbe\u7f6e\u4e3a ``period``\uff08\u5355\u4f4d\uff1a\u6beb\u79d2\uff09\u3002\n\nExample: ``pin0.set_analog_period(10)``\n\n:param period: \u4ee5\u6beb\u79d2\u4e3a\u5355\u4f4d\u7684\u5468\u671f\uff0c\u6700\u5c0f\u6709\u6548\u503c\u4e3a 1 \u6beb\u79d2\u3002\"\"\"\n\n def set_analog_period_microseconds(self, period: int) -> None:\n \"\"\"\u5c06\u8f93\u51fa\u7684 PWM \u4fe1\u53f7\u7684\u5468\u671f\u8bbe\u7f6e\u4e3a ``period``\uff08\u5355\u4f4d\uff1a\u5fae\u79d2\uff09\u3002\n\nExample: ``pin0.set_analog_period_microseconds(512)``\n\n:param period: \u4ee5\u5fae\u79d2\u4e3a\u5355\u4f4d\u7684\u5468\u671f\uff0c\u6700\u5c0f\u6709\u6548\u503c\u4e3a 256 \u6beb\u79d2\u3002\"\"\"\n\nclass MicroBitAnalogDigitalPin(MicroBitDigitalPin):\n \"\"\"\u5e26\u6709\u6a21\u62df\u548c\u6570\u5b57\u529f\u80fd\u7684\u5f15\u811a\u3002\"\"\"\n\n def read_analog(self) -> int:\n \"\"\"\u8bfb\u53d6\u5e94\u7528\u4e8e\u5f15\u811a\u7684\u7535\u538b\u3002\n\nExample: ``pin0.read_analog()``\n\n:return: An integer between 0 (meaning 0V) and 1023 (meaning 3.3V).\"\"\"\n\nclass MicroBitTouchPin(MicroBitAnalogDigitalPin):\n \"\"\"\u5e26\u6709\u6a21\u62df\u3001\u6570\u5b57\u548c\u89e6\u6478\u529f\u80fd\u7684\u5f15\u811a\u3002\"\"\"\n CAPACITIVE: int\n RESISTIVE: int\n\n def is_touched(self) -> bool:\n \"\"\"\u68c0\u67e5\u5f15\u811a\u662f\u5426\u88ab\u89e6\u6478\u3002\n\nExample: ``pin0.is_touched()``\n\nThe default touch mode for the pins on the edge connector is ``resistive``.\nThe default for the logo pin **V2** is ``capacitive``.\n\n**Resistive touch**\nThis test is done by measuring how much resistance there is between the\npin and ground. A low resistance gives a reading of ``True``. To get\na reliable reading using a finger you may need to touch the ground pin\nwith another part of your body, for example your other hand.\n\n**Capacitive touch**\nThis test is done by interacting with the electric field of a capacitor\nusing a finger as a conductor. `Capacitive touch\n`_\ndoes not require you to make a ground connection as part of a circuit.\n\n:return: ``True`` if the pin is being touched with a finger, otherwise return ``False``.\"\"\"\n ...\n\n def set_touch_mode(self, value: int) -> None:\n \"\"\"\u8bbe\u7f6e\u5f15\u811a\u7684\u89e6\u6478\u6a21\u5f0f\u3002\n\nExample: ``pin0.set_touch_mode(pin0.CAPACITIVE)``\n\nThe default touch mode for the pins on the edge connector is\n``resistive``. The default for the logo pin **V2** is ``capacitive``.\n\n:param value: \u6765\u81ea\u76f8\u5173\u5f15\u811a\u7684 ``CAPACITIVE`` \u6216 ``RESISTIVE``\u3002\"\"\"\n ...\npin0: MicroBitTouchPin\n\"\"\"\u5177\u6709\u6570\u5b57\u3001\u6a21\u62df\u548c\u89e6\u6478\u529f\u80fd\u7684\u5f15\u811a\u3002 (\u5f15\u811a0)\"\"\"\npin1: MicroBitTouchPin\n\"\"\"\u5177\u6709\u6570\u5b57\u3001\u6a21\u62df\u548c\u89e6\u6478\u529f\u80fd\u7684\u5f15\u811a\u3002 (\u5f15\u811a1)\"\"\"\npin2: MicroBitTouchPin\n\"\"\"\u5177\u6709\u6570\u5b57\u3001\u6a21\u62df\u548c\u89e6\u6478\u529f\u80fd\u7684\u5f15\u811a\u3002 (\u5f15\u811a2)\"\"\"\npin3: MicroBitAnalogDigitalPin\n\"\"\"\u5177\u6709\u6570\u5b57\u548c\u6a21\u62df\u529f\u80fd\u7684\u5f15\u811a\u3002 (\u5f15\u811a3)\"\"\"\npin4: MicroBitAnalogDigitalPin\n\"\"\"\u5177\u6709\u6570\u5b57\u548c\u6a21\u62df\u529f\u80fd\u7684\u5f15\u811a\u3002 (\u5f15\u811a4)\"\"\"\npin5: MicroBitDigitalPin\n\"\"\"\u5177\u6709\u6570\u5b57\u529f\u80fd\u7684\u5f15\u811a\u3002 (\u5f15\u811a5)\"\"\"\npin6: MicroBitDigitalPin\n\"\"\"\u5177\u6709\u6570\u5b57\u529f\u80fd\u7684\u5f15\u811a\u3002 (\u5f15\u811a6)\"\"\"\npin7: MicroBitDigitalPin\n\"\"\"\u5177\u6709\u6570\u5b57\u529f\u80fd\u7684\u5f15\u811a\u3002 (\u5f15\u811a7)\"\"\"\npin8: MicroBitDigitalPin\n\"\"\"\u5177\u6709\u6570\u5b57\u529f\u80fd\u7684\u5f15\u811a\u3002 (\u5f15\u811a8)\"\"\"\npin9: MicroBitDigitalPin\n\"\"\"\u5177\u6709\u6570\u5b57\u529f\u80fd\u7684\u5f15\u811a\u3002 (\u5f15\u811a9)\"\"\"\npin10: MicroBitAnalogDigitalPin\n\"\"\"\u5177\u6709\u6570\u5b57\u548c\u6a21\u62df\u529f\u80fd\u7684\u5f15\u811a\u3002 (\u5f15\u811a10)\"\"\"\npin11: MicroBitDigitalPin\n\"\"\"\u5177\u6709\u6570\u5b57\u529f\u80fd\u7684\u5f15\u811a\u3002 (\u5f15\u811a11)\"\"\"\npin12: MicroBitDigitalPin\n\"\"\"\u5177\u6709\u6570\u5b57\u529f\u80fd\u7684\u5f15\u811a\u3002 (\u5f15\u811a12)\"\"\"\npin13: MicroBitDigitalPin\n\"\"\"\u5177\u6709\u6570\u5b57\u529f\u80fd\u7684\u5f15\u811a\u3002 (\u5f15\u811a13)\"\"\"\npin14: MicroBitDigitalPin\n\"\"\"\u5177\u6709\u6570\u5b57\u529f\u80fd\u7684\u5f15\u811a\u3002 (\u5f15\u811a14)\"\"\"\npin15: MicroBitDigitalPin\n\"\"\"\u5177\u6709\u6570\u5b57\u529f\u80fd\u7684\u5f15\u811a\u3002 (\u5f15\u811a15)\"\"\"\npin16: MicroBitDigitalPin\n\"\"\"\u5177\u6709\u6570\u5b57\u529f\u80fd\u7684\u5f15\u811a\u3002 (\u5f15\u811a16)\"\"\"\npin19: MicroBitDigitalPin\n\"\"\"\u5177\u6709\u6570\u5b57\u529f\u80fd\u7684\u5f15\u811a\u3002 (\u5f15\u811a19)\"\"\"\npin20: MicroBitDigitalPin\n\"\"\"\u5177\u6709\u6570\u5b57\u529f\u80fd\u7684\u5f15\u811a\u3002 (\u5f15\u811a20)\"\"\"\npin_logo: MicroBitTouchPin\n\"\"\"micro:bit \u6b63\u9762\u7684\u89e6\u6478\u611f\u5e94\u6807\u5fd7\u5f15\u811a\uff0c\u9ed8\u8ba4\u8bbe\u7f6e\u4e3a\u7535\u5bb9\u5f0f\u89e6\u6478\u6a21\u5f0f\u3002 (\u5f15\u811a\u6807\u5fd7)\"\"\"\npin_speaker: MicroBitAnalogDigitalPin\n\"\"\"\u7528\u4e8e\u5bf9 micro:bit \u626c\u58f0\u5668\u5bfb\u5740\u7684\u5f15\u811a\u3002 (\u626c\u58f0\u5668\u5f15\u811a)\n\nThis API is intended only for use in Pulse-Width Modulation pin operations e.g. pin_speaker.write_analog(128).\n\"\"\"\n\nclass Image:\n \"\"\"\u5728 micro:bit LED \u663e\u793a\u5c4f\u4e0a\u663e\u793a\u7684\u56fe\u50cf\u3002 (\u56fe\u50cf)\n\nGiven an image object it's possible to display it via the ``display`` API::\n\n display.show(Image.HAPPY)\"\"\"\n HEART: Image\n \"\"\"\u5fc3\u5f62\u56fe\u50cf (\u5fc3\u5f62)\"\"\"\n HEART_SMALL: Image\n \"\"\"\u5c0f\u7684\u5fc3\u5f62\u56fe\u50cf\u3002 (\u5c0f\u7684\u5fc3\u5f62)\"\"\"\n HAPPY: Image\n \"\"\"\u5feb\u4e50\u7684\u8138\u90e8\u56fe\u50cf\u3002 (\u5feb\u4e50)\"\"\"\n SMILE: Image\n \"\"\"\u5fae\u7b11\u7684\u8138\u90e8\u56fe\u50cf\u3002 (\u5fae\u7b11)\"\"\"\n SAD: Image\n \"\"\"\u96be\u8fc7\u7684\u8138\u90e8\u56fe\u50cf\u3002 (\u96be\u8fc7)\"\"\"\n CONFUSED: Image\n \"\"\"\u56f0\u60d1\u7684\u9762\u90e8\u56fe\u50cf\u3002 (\u56f0\u60d1)\"\"\"\n ANGRY: Image\n \"\"\"\u6124\u6012\u7684\u8138\u90e8\u56fe\u50cf\u3002 (\u6124\u6012)\"\"\"\n ASLEEP: Image\n \"\"\"\u7761\u7740\u7684\u8138\u90e8\u56fe\u50cf\u3002 (\u7761\u7740)\"\"\"\n SURPRISED: Image\n \"\"\"\u60ca\u8bb6\u7684\u8138\u90e8\u56fe\u50cf\u3002 (\u60ca\u8bb6)\"\"\"\n SILLY: Image\n \"\"\"\u50bb\u50bb\u7684\u8138\u90e8\u56fe\u50cf\u3002 (\u50bb\u7684)\"\"\"\n FABULOUS: Image\n \"\"\"\u6234\u58a8\u955c\u7684\u8138\u90e8\u56fe\u50cf\u3002 (\u6781\u597d\u7684)\"\"\"\n MEH: Image\n \"\"\"\u5370\u8c61\u5e73\u5e73\u7684\u8138\u90e8\u56fe\u50cf (\u4e0d\u611f\u5174\u8da3\u7684)\"\"\"\n YES: Image\n \"\"\"\u5bf9\u52fe\u56fe\u50cf\u3002 (\u662f\u7684)\"\"\"\n NO: Image\n \"\"\"\u6253\u53c9\u56fe\u50cf\u3002 (\u4e0d\u662f)\"\"\"\n CLOCK12: Image\n \"\"\"\u6307\u9488\u6307\u5411 12 \u70b9\u949f\u4f4d\u7f6e\u7684\u56fe\u50cf\u3002 (\u65f6\u949f12\u70b9)\"\"\"\n CLOCK11: Image\n \"\"\"\u6307\u9488\u6307\u5411 11 \u70b9\u949f\u4f4d\u7f6e\u7684\u56fe\u50cf\u3002 (\u65f6\u949f11\u70b9)\"\"\"\n CLOCK10: Image\n \"\"\"\u6307\u9488\u6307\u5411 10 \u70b9\u949f\u4f4d\u7f6e\u7684\u56fe\u50cf\u3002 (\u65f6\u949f10\u70b9)\"\"\"\n CLOCK9: Image\n \"\"\"\u6307\u9488\u6307\u5411 9 \u70b9\u949f\u4f4d\u7f6e\u7684\u56fe\u50cf\u3002 (\u65f6\u949f9\u70b9)\"\"\"\n CLOCK8: Image\n \"\"\"\u6307\u9488\u6307\u5411 8 \u70b9\u949f\u4f4d\u7f6e\u7684\u56fe\u50cf\u3002 (\u65f6\u949f8\u70b9)\"\"\"\n CLOCK7: Image\n \"\"\"\u6307\u9488\u6307\u5411 7 \u70b9\u949f\u4f4d\u7f6e\u7684\u56fe\u50cf\u3002 (\u65f6\u949f7\u70b9)\"\"\"\n CLOCK6: Image\n \"\"\"\u6307\u9488\u6307\u5411 6 \u70b9\u949f\u4f4d\u7f6e\u7684\u56fe\u50cf\u3002 (\u65f6\u949f6\u70b9)\"\"\"\n CLOCK5: Image\n \"\"\"\u6307\u9488\u6307\u5411 5 \u70b9\u949f\u4f4d\u7f6e\u7684\u56fe\u50cf\u3002 (\u65f6\u949f5\u70b9)\"\"\"\n CLOCK4: Image\n \"\"\"\u6307\u9488\u6307\u5411 4 \u70b9\u949f\u4f4d\u7f6e\u7684\u56fe\u50cf\u3002 (\u65f6\u949f4\u70b9)\"\"\"\n CLOCK3: Image\n \"\"\"\u6307\u9488\u6307\u5411 3 \u70b9\u949f\u4f4d\u7f6e\u7684\u56fe\u50cf\u3002 (\u65f6\u949f3\u70b9)\"\"\"\n CLOCK2: Image\n \"\"\"\u6307\u9488\u6307\u5411 2 \u70b9\u949f\u4f4d\u7f6e\u7684\u56fe\u50cf\u3002 (\u65f6\u949f2\u70b9)\"\"\"\n CLOCK1: Image\n \"\"\"\u6307\u9488\u6307\u5411 1 \u70b9\u949f\u4f4d\u7f6e\u7684\u56fe\u50cf\u3002 (\u65f6\u949f1\u70b9)\"\"\"\n ARROW_N: Image\n \"\"\"\u6307\u5411\u5317\u65b9\u7684\u7bad\u5934\u7684\u56fe\u50cf\u3002 (\u7bad\u5934\uff08\u6307\u5411\u5317\uff09)\"\"\"\n ARROW_NE: Image\n \"\"\"\u6307\u5411\u4e1c\u5317\u65b9\u7684\u7bad\u5934\u7684\u56fe\u50cf\u3002 (\u7bad\u5934\uff08\u6307\u5411\u4e1c\u5317\uff09)\"\"\"\n ARROW_E: Image\n \"\"\"\u6307\u5411\u4e1c\u65b9\u7684\u7bad\u5934\u7684\u56fe\u50cf\u3002 (\u7bad\u5934\uff08\u6307\u5411\u4e1c\uff09)\"\"\"\n ARROW_SE: Image\n \"\"\"\u6307\u5411\u4e1c\u5357\u65b9\u7684\u7bad\u5934\u7684\u56fe\u50cf\u3002 (\u7bad\u5934\uff08\u6307\u5411\u4e1c\u5357\uff09)\"\"\"\n ARROW_S: Image\n \"\"\"\u6307\u5411\u5357\u65b9\u7684\u7bad\u5934\u56fe\u50cf\u3002 (\u7bad\u5934\uff08\u6307\u5411\u5357\uff09)\"\"\"\n ARROW_SW: Image\n \"\"\"\u6307\u5411\u897f\u5357\u65b9\u7684\u7bad\u5934\u7684\u56fe\u50cf\u3002 (\u7bad\u5934\uff08\u6307\u5411\u897f\u5357\uff09)\"\"\"\n ARROW_W: Image\n \"\"\"\u6307\u5411\u897f\u65b9\u7684\u7bad\u5934\u7684\u56fe\u50cf\u3002 (\u7bad\u5934\uff08\u6307\u5411\u897f\uff09)\"\"\"\n ARROW_NW: Image\n \"\"\"\u6307\u5411\u897f\u5317\u65b9\u7684\u7bad\u5934\u7684\u56fe\u50cf\u3002 (\u7bad\u5934\uff08\u6307\u5411\u897f\u5317\uff09)\"\"\"\n TRIANGLE: Image\n \"\"\"\u5411\u4e0a\u7684\u4e09\u89d2\u5f62\u56fe\u50cf\u3002 (\u4e09\u89d2)\"\"\"\n TRIANGLE_LEFT: Image\n \"\"\"\u5de6\u89d2\u7684\u4e09\u89d2\u5f62\u56fe\u50cf\u3002 (\u5de6\u4e09\u89d2)\"\"\"\n CHESSBOARD: Image\n \"\"\"\u6309\u68cb\u76d8\u5f0f\u4ea4\u66ff\u70b9\u4eae LED\u3002 (\u56fd\u9645\u8c61\u68cb\u68cb\u76d8)\"\"\"\n DIAMOND: Image\n \"\"\"\u94bb\u77f3\u56fe\u50cf\u3002 (\u83f1\u5f62)\"\"\"\n DIAMOND_SMALL: Image\n \"\"\"\u5c0f\u94bb\u77f3\u56fe\u50cf\u3002 (\u5c0f\u7684\u83f1\u5f62)\"\"\"\n SQUARE: Image\n \"\"\"\u65b9\u5f62\u56fe\u50cf\u3002 (\u6b63\u65b9\u5f62)\"\"\"\n SQUARE_SMALL: Image\n \"\"\"\u5c0f\u7684\u65b9\u5f62\u56fe\u50cf\u3002 (\u5c0f\u65b9\u5f62)\"\"\"\n RABBIT: Image\n \"\"\"\u5154\u5b50\u56fe\u50cf\u3002 (\u5154\u5b50)\"\"\"\n COW: Image\n \"\"\"\u5976\u725b\u56fe\u50cf\u3002 (\u725b)\"\"\"\n MUSIC_CROTCHET: Image\n \"\"\"\u97f3\u4e50\u97f3\u7b26\u56fe\u50cf (\u97f3\u4e50\u97f3\u7b26)\"\"\"\n MUSIC_QUAVER: Image\n \"\"\"\u516b\u5206\u97f3\u7b26\u56fe\u50cf\u3002 (\u516b\u5206\u97f3\u7b26)\"\"\"\n MUSIC_QUAVERS: Image\n \"\"\"\u4e00\u5bf9\u516b\u5206\u97f3\u7b26\u56fe\u50cf\u3002 (\u4e00\u5bf9\u516b\u5206\u97f3\u7b26)\"\"\"\n PITCHFORK: Image\n \"\"\"\u5e72\u8349\u53c9\u56fe\u50cf\u3002 (\u5e72\u8349\u53c9)\"\"\"\n XMAS: Image\n \"\"\"\u5723\u8bde\u6811\u56fe\u50cf\u3002 (\u5723\u8bde\u8282)\"\"\"\n PACMAN: Image\n \"\"\"\u5403\u8c46\u4eba\u6e38\u620f\u89d2\u8272\u56fe\u50cf\u3002 (\u5403\u8c46\u4eba)\"\"\"\n TARGET: Image\n \"\"\"\u76ee\u6807\u56fe\u50cf (\u76ee\u6807)\"\"\"\n TSHIRT: Image\n \"\"\"T \u6064\u56fe\u50cf\u3002 (T\u6064)\"\"\"\n ROLLERSKATE: Image\n \"\"\"\u8f6e\u6ed1\u56fe\u50cf\u3002 (\u8f6e\u6ed1)\"\"\"\n DUCK: Image\n \"\"\"\u9e2d\u5b50\u56fe\u50cf\u3002 (\u9e2d\u5b50)\"\"\"\n HOUSE: Image\n \"\"\"\u623f\u5b50\u56fe\u50cf\u3002 (\u623f\u5b50)\"\"\"\n TORTOISE: Image\n \"\"\"\u4e4c\u9f9f\u56fe\u50cf\u3002 (\u4e4c\u9f9f)\"\"\"\n BUTTERFLY: Image\n \"\"\"\u8774\u8776\u56fe\u50cf (\u8774\u8776)\"\"\"\n STICKFIGURE: Image\n \"\"\"\u706b\u67f4\u4eba\u56fe\u50cf\u3002 (\u7b80\u7b14\u4eba\u7269\u753b)\"\"\"\n GHOST: Image\n \"\"\"\u5e7d\u7075\u56fe\u50cf\u3002 (\u5e7d\u7075)\"\"\"\n SWORD: Image\n \"\"\"\u5229\u5251\u56fe\u50cf\u3002 (\u5251)\"\"\"\n GIRAFFE: Image\n \"\"\"\u957f\u9888\u9e7f\u56fe\u50cf\u3002 (\u957f\u9888\u9e7f)\"\"\"\n SKULL: Image\n \"\"\"\u9ab7\u9ac5\u56fe\u50cf\u3002 (\u9ab7\u9ac5)\"\"\"\n UMBRELLA: Image\n \"\"\"\u96e8\u4f1e\u56fe\u50cf\u3002 (\u96e8\u4f1e)\"\"\"\n SNAKE: Image\n \"\"\"\u86c7\u56fe\u50cf\u3002 (\u86c7)\"\"\"\n SCISSORS: Image\n \"\"\"\u526a\u5200\u56fe\u50cf\u3002 (\u526a\u5200)\"\"\"\n ALL_CLOCKS: List[Image]\n \"\"\"\u6309\u987a\u5e8f\u5305\u542b\u6240\u6709 CLOCK_ \u56fe\u50cf\u7684\u5217\u8868\uff08\u65f6\u949f\uff09\u3002 (\u6240\u6709\u65f6\u949f)\"\"\"\n ALL_ARROWS: List[Image]\n \"\"\"\u6309\u987a\u5e8f\u5305\u542b\u6240\u6709 ARROW_ \u56fe\u50cf\u7684\u5217\u8868\uff08\u7bad\u5934\uff09\u3002 (\u6240\u6709\u7bad\u5934)\"\"\"\n\n @overload\n def __init__(self, string: str) -> None:\n \"\"\"\u6839\u636e\u63cf\u8ff0\u70b9\u4eae LED \u7684\u5b57\u7b26\u4e32\u6765\u521b\u5efa\u4e00\u5e45\u56fe\u50cf\u3002\n\n``string`` has to consist of digits 0-9 arranged into lines,\ndescribing the image, for example::\n\n image = Image(\"90009:\"\n \"09090:\"\n \"00900:\"\n \"09090:\"\n \"90009\")\n\nwill create a 5\u00d75 image of an X. The end of a line is indicated by a\ncolon. It's also possible to use newlines (\\\\n) insead of the colons.\n\n:param string: \u63cf\u8ff0\u56fe\u50cf\u7684\u5b57\u7b26\u4e32\u3002\"\"\"\n ...\n\n @overload\n def __init__(self, width: int=5, height: int=5, buffer: ReadableBuffer=None) -> None:\n \"\"\"\u521b\u5efa\u4e00\u5e45\u5177\u6709 ``width`` \u5217\u548c ``height`` \u884c\u7684\u7a7a\u767d\u56fe\u50cf\u3002\n\n:param width: (\u5bbd\u5ea6) \u53ef\u9009\u7684\u56fe\u50cf\u5bbd\u5ea6\n:param height: (\u9ad8\u5ea6) \u53ef\u9009\u7684\u56fe\u50cf\u9ad8\u5ea6\n:param buffer: (\u7f13\u51b2\u533a) \u7528\u53ef\u9009\u6570\u7ec4\u6216\u5728 0-9 \u8303\u56f4\u5185\u7684 ``width`` \u00d7 ``height`` \u6574\u6570\u5b57\u8282\u6765\u521d\u59cb\u5316\u56fe\u50cf\n\nExamples::\n\n Image(2, 2, b'\\x08\\x08\\x08\\x08')\n Image(2, 2, bytearray([9,9,9,9]))\n\nThese create 2 x 2 pixel images at full brightness.\"\"\"\n ...\n\n def width(self) -> int:\n \"\"\"\u83b7\u53d6\u5217\u6570\u3002 (\u5bbd\u5ea6)\n\n:return: The number of columns in the image\"\"\"\n ...\n\n def height(self) -> int:\n \"\"\"\u83b7\u53d6\u884c\u6570\u3002 (\u9ad8\u5ea6)\n\n:return: The number of rows in the image\"\"\"\n ...\n\n def set_pixel(self, x: int, y: int, value: int) -> None:\n \"\"\"\u8bbe\u7f6e\u50cf\u7d20\u4eae\u5ea6\u3002\n\nExample: ``my_image.set_pixel(0, 0, 9)``\n\n:param x: \u5217\u53f7\n:param y: \u884c\u53f7\n:param value: \u7528 0\uff08\u6697\uff09\u548c 9\uff08\u4eae\uff09\u4e4b\u95f4\u7684\u6574\u6570\u6765\u4ee3\u8868\u4eae\u5ea6\n\nThis method will raise an exception when called on any of the built-in\nread-only images, like ``Image.HEART``.\"\"\"\n ...\n\n def get_pixel(self, x: int, y: int) -> int:\n \"\"\"\u83b7\u53d6\u4e00\u4e2a\u50cf\u7d20\u7684\u4eae\u5ea6\u3002\n\nExample: ``my_image.get_pixel(0, 0)``\n\n:param x: \u5217\u53f7\n:param y: \u884c\u53f7\n:return: The brightness as an integer between 0 and 9.\"\"\"\n ...\n\n def shift_left(self, n: int) -> Image:\n \"\"\"\u901a\u8fc7\u5411\u5de6\u79fb\u52a8\u56fe\u7247\u6765\u521b\u5efa\u65b0\u56fe\u50cf\u3002\n\nExample: ``Image.HEART_SMALL.shift_left(1)``\n\n:param n: \u8981\u79fb\u52a8\u7684\u5217\u6570\n:return: The shifted image\"\"\"\n ...\n\n def shift_right(self, n: int) -> Image:\n \"\"\"\u901a\u8fc7\u5411\u53f3\u79fb\u52a8\u56fe\u7247\u6765\u521b\u5efa\u65b0\u56fe\u50cf\u3002\n\nExample: ``Image.HEART_SMALL.shift_right(1)``\n\n:param n: \u8981\u79fb\u52a8\u7684\u5217\u6570\n:return: The shifted image\"\"\"\n ...\n\n def shift_up(self, n: int) -> Image:\n \"\"\"\u901a\u8fc7\u5411\u4e0a\u79fb\u52a8\u56fe\u7247\u6765\u521b\u5efa\u65b0\u56fe\u50cf\u3002\n\nExample: ``Image.HEART_SMALL.shift_up(1)``\n\n:param n: \u8981\u79fb\u52a8\u7684\u884c\u6570\n:return: The shifted image\"\"\"\n ...\n\n def shift_down(self, n: int) -> Image:\n \"\"\"\u901a\u8fc7\u5411\u4e0b\u79fb\u52a8\u56fe\u7247\u6765\u521b\u5efa\u65b0\u56fe\u50cf\u3002\n\nExample: ``Image.HEART_SMALL.shift_down(1)``\n\n:param n: \u8981\u79fb\u52a8\u7684\u884c\u6570\n:return: The shifted image\"\"\"\n ...\n\n def crop(self, x: int, y: int, w: int, h: int) -> Image:\n \"\"\"\u901a\u8fc7\u88c1\u526a\u56fe\u7247\u6765\u521b\u5efa\u4e00\u5e45\u65b0\u56fe\u50cf\u3002 (\u88c1\u526a)\n\nExample: ``Image.HEART.crop(1, 1, 3, 3)``\n\n:param x: \u88c1\u526a\u504f\u79fb\u5217\n:param y: \u88c1\u526a\u504f\u79fb\u884c\n:param w: \u88c1\u526a\u5bbd\u5ea6\n:param h: \u88c1\u526a\u9ad8\u5ea6\n:return: The new image\"\"\"\n ...\n\n def copy(self) -> Image:\n \"\"\"\u521b\u5efa\u56fe\u50cf\u7684\u7cbe\u786e\u526f\u672c\u3002 (\u590d\u5236)\n\nExample: ``Image.HEART.copy()``\n\n:return: The new image\"\"\"\n ...\n\n def invert(self) -> Image:\n \"\"\"\u901a\u8fc7\u53cd\u8f6c\u6e90\u56fe\u50cf\u4e2d\u50cf\u7d20\u7684\u4eae\u5ea6\u6765\u521b\u5efa\u4e00\u5e45\u65b0\u56fe\u50cf\u3002 (\u53cd\u8f6c)\n\nExample: ``Image.SMALL_HEART.invert()``\n\n:return: The new image.\"\"\"\n ...\n\n def fill(self, value: int) -> None:\n \"\"\"\u8bbe\u7f6e\u56fe\u50cf\u4e2d\u6240\u6709\u50cf\u7d20\u7684\u4eae\u5ea6\u3002 (\u586b\u5145)\n\nExample: ``my_image.fill(5)``\n\n:param value: \u65b0\u4eae\u5ea6\u4e3a 0 (\u6697) \u548c 9 (\u660e) \u4e4b\u95f4\u7684\u6570\u5b57\u3002\n\nThis method will raise an exception when called on any of the built-in\nread-only images, like ``Image.HEART``.\"\"\"\n ...\n\n def blit(self, src: Image, x: int, y: int, w: int, h: int, xdest: int=0, ydest: int=0) -> None:\n \"\"\"\u590d\u5236\u53e6\u4e00\u5e45\u56fe\u50cf\u7684\u4e00\u90e8\u5206\u533a\u57df\u5230\u8fd9\u5e45\u56fe\u50cf\u3002\n\nExample: ``my_image.blit(Image.HEART, 1, 1, 3, 3, 1, 1)``\n\n:param src: (\u6765\u6e90) \u6e90\u56fe\u50cf\n:param x: \u6e90\u56fe\u50cf\u7684\u8d77\u59cb\u5217\u504f\u79fb\u91cf\n:param y: \u6e90\u56fe\u50cf\u7684\u8d77\u59cb\u884c\u504f\u79fb\u91cf\n:param w: \u8981\u590d\u5236\u7684\u5217\u6570\n:param h: \u8981\u590d\u5236\u7684\u884c\u6570\n:param xdest: (x\u504f\u79bb\u91cf) \u6b64\u56fe\u50cf\u4e2d\u8981\u4fee\u6539\u7684\u5217\u504f\u79fb\u91cf\n:param ydest: (y\u504f\u79bb\u91cf) \u6b64\u56fe\u50cf\u4e2d\u8981\u4fee\u6539\u7684\u884c\u504f\u79fb\u91cf\n\nPixels outside the source image are treated as having a brightness of 0.\n\n``shift_left()``, ``shift_right()``, ``shift_up()``, ``shift_down()``\nand ``crop()`` can are all implemented by using ``blit()``.\n\nFor example, img.crop(x, y, w, h) can be implemented as::\n\n def crop(self, x, y, w, h):\n res = Image(w, h)\n res.blit(self, x, y, w, h)\n return res\"\"\"\n ...\n\n def __repr__(self) -> str:\n \"\"\"\u83b7\u53d6\u56fe\u50cf\u7684\u7f29\u5c0f\u5b57\u7b26\u4e32\u8868\u793a\u3002 (\u8868\u793a)\"\"\"\n ...\n\n def __str__(self) -> str:\n \"\"\"\u83b7\u53d6\u56fe\u50cf\u7684\u53ef\u8bfb\u5b57\u7b26\u4e32\u8868\u793a\u3002 (\u5b57\u7b26\u4e32)\"\"\"\n ...\n\n def __add__(self, other: Image) -> Image:\n \"\"\"\u901a\u8fc7\u5c06\u4e24\u5e45\u56fe\u50cf\u6bcf\u4e2a\u50cf\u7d20\u7684\u4eae\u5ea6\u503c\u76f8\u52a0\u6765\u521b\u5efa\u4e00\u5e45\u65b0\u56fe\u50cf\u3002\n\nExample: ``Image.HEART + Image.HAPPY``\n\n:param other: (\u5176\u4ed6) \u8981\u6dfb\u52a0\u7684\u56fe\u50cf\u3002\"\"\"\n ...\n\n def __sub__(self, other: Image) -> Image:\n \"\"\"\u901a\u8fc7\u4ece\u6b64\u56fe\u50cf\u4e2d\u51cf\u53bb\u53e6\u4e00\u5e45\u56fe\u50cf\u7684\u4eae\u5ea6\u503c\u6765\u521b\u5efa\u4e00\u5e45\u65b0\u56fe\u50cf\u3002 (\u51cf\u53bb)\n\nExample: ``Image.HEART - Image.HEART_SMALL``\n\n:param other: (\u5176\u4ed6) \u8981\u51cf\u53bb\u7684\u56fe\u50cf\u3002\"\"\"\n ...\n\n def __mul__(self, n: float) -> Image:\n \"\"\"\u901a\u8fc7\u5c06\u6bcf\u4e2a\u50cf\u7d20\u7684\u4eae\u5ea6\u4e58\u4ee5 ``n`` \u6765\u521b\u5efa\u4e00\u5e45\u65b0\u56fe\u50cf\u3002 (\u76f8\u4e58)\n\nExample: ``Image.HEART * 0.5``\n\n:param n: \u8981\u76f8\u4e58\u7684\u6570\u503c\u3002\"\"\"\n ...\n\n def __truediv__(self, n: float) -> Image:\n \"\"\"\u901a\u8fc7\u5c06\u6bcf\u4e2a\u50cf\u7d20\u7684\u4eae\u5ea6\u9664\u4ee5 ``n`` \u6765\u521b\u5efa\u4e00\u5e45\u65b0\u56fe\u50cf\u3002 (\u9664\u4ee5)\n\nExample: ``Image.HEART / 2``\n\n:param n: \u8981\u9664\u4ee5\u7684\u6570\u503c\u3002\"\"\"\n ...\n\nclass SoundEvent:\n LOUD: SoundEvent\n \"\"\"\u8868\u793a\u58f0\u97f3\u4e8b\u4ef6\u4ece``quiet``\u5230``loud``\u7684\u8fc7\u6e21\uff0c\u5982\u62cd\u624b\u6216\u8005\u558a\u53eb\u3002 (\u5927\u58f0)\"\"\"\n QUIET: SoundEvent\n \"\"\"\u8868\u793a\u58f0\u97f3\u4e8b\u4ef6\u4ece``loud``\u5230``quiet``\u7684\u8fc7\u6e21\uff0c\u5982\u8bf4\u8bdd\u6216\u8005\u80cc\u666f\u97f3\u4e50\u3002 (\u5b89\u9759)\"\"\"\n\nclass Sound:\n \"\"\"\u53ef\u4ee5\u4f7f\u7528 ``audio.play(Sound.NAME)`` \u8c03\u7528\u5185\u7f6e\u58f0\u97f3\u3002 (\u58f0\u97f3)\"\"\"\n GIGGLE: Sound\n \"\"\"\u54af\u54af\u7684\u58f0\u97f3\u3002 (\u54af\u54af\u7b11)\"\"\"\n HAPPY: Sound\n \"\"\"\u5feb\u4e50\u7684\u58f0\u97f3\u3002 (\u5feb\u4e50)\"\"\"\n HELLO: Sound\n \"\"\"\u95ee\u5019\u58f0\u3002 (\u4f60\u597d)\"\"\"\n MYSTERIOUS: Sound\n \"\"\"\u795e\u79d8\u7684\u58f0\u97f3 (\u795e\u79d8\u7684)\"\"\"\n SAD: Sound\n \"\"\"\u60b2\u4f24\u7684\u58f0\u97f3\u3002 (\u96be\u8fc7)\"\"\"\n SLIDE: Sound\n \"\"\"\u6ed1\u52a8\u58f0\u3002 (\u6ed1\u52a8)\"\"\"\n SOARING: Sound\n \"\"\"\u7ff1\u7fd4\u7684\u58f0\u97f3\u3002 (\u9ad8\u6602)\"\"\"\n SPRING: Sound\n \"\"\"\u6625\u5929\u7684\u58f0\u97f3\u3002 (\u5f39\u7c27)\"\"\"\n TWINKLE: Sound\n \"\"\"\u95ea\u70c1\u7684\u58f0\u97f3\u3002 (\u95ea\u70c1)\"\"\"\n YAWN: Sound\n \"\"\"\u6253\u54c8\u6b20\u7684\u58f0\u97f3\u3002 (\u6253\u54c8\u6b20)\"\"\"", "/typeshed/stdlib/microbit/accelerometer.pyi": "\"\"\"\u6d4b\u91cf micro:bit \u7684\u52a0\u901f\u5ea6\u5e76\u8bc6\u522b\u624b\u52bf\u3002 (\u52a0\u901f\u5ea6\u4f20\u611f\u5668)\"\"\"\nfrom typing import Tuple\n\ndef get_x() -> int:\n \"\"\"\u83b7\u53d6 ``x`` \u8f74\u4e0a\u7684\u52a0\u901f\u5ea6\u6d4b\u91cf\u503c\uff08\u4ee5 milli-g \u4e3a\u5355\u4f4d\uff09\u3002\n\nExample: ``accelerometer.get_x()``\n\n:return: A positive or negative integer depending on direction in the range +/- 2000mg.\"\"\"\n ...\n\ndef get_y() -> int:\n \"\"\"\u83b7\u53d6 ``y`` \u8f74\u4e0a\u7684\u52a0\u901f\u5ea6\u6d4b\u91cf\u503c\uff08\u4ee5 milli-g \u4e3a\u5355\u4f4d\uff09\u3002\n\nExample: ``accelerometer.get_y()``\n\n:return: A positive or negative integer depending on direction in the range +/- 2000mg.\"\"\"\n ...\n\ndef get_z() -> int:\n \"\"\"\u83b7\u53d6 ``z`` \u8f74\u4e0a\u7684\u52a0\u901f\u5ea6\u6d4b\u91cf\u503c\uff08\u4ee5 milli-g \u4e3a\u5355\u4f4d\uff09\u3002\n\nExample: ``accelerometer.get_z()``\n\n:return: A positive or negative integer depending on direction in the range +/- 2000mg.\"\"\"\n ...\n\ndef get_values() -> Tuple[int, int, int]:\n \"\"\"\u4e00\u6b21\u83b7\u53d6\u6240\u6709\u8f74\u4e0a\u7684\u52a0\u901f\u5ea6\u6d4b\u91cf\u503c\u4f5c\u4e3a\u5143\u7ec4\u3002\n\nExample: ``x, y, z = accelerometer.get_values()``\n\n:return: a three-element tuple of integers ordered as X, Y, Z, each value a positive or negative integer depending on direction in the range +/- 2000mg\"\"\"\n ...\n\ndef get_strength() -> int:\n \"\"\"\u4ee5\u6b63\u6574\u6570\u5f62\u5f0f\u83b7\u53d6\u6240\u6709\u8f74\u7ec4\u5408\u7684\u52a0\u901f\u5ea6\u6d4b\u91cf\u503c\u3002\u8fd9\u662f X\u3001Y \u548c Z \u8f74\u7684\u6bd5\u8fbe\u54e5\u62c9\u65af\uff08Pythagorean\uff09\u548c\u3002 (\u83b7\u53d6\u5f3a\u5ea6)\n\nExample: ``accelerometer.get_strength()``\n\n:return: The combined acceleration strength of all the axes, in milli-g.\"\"\"\n ...\n\ndef current_gesture() -> str:\n \"\"\"\u83b7\u53d6\u5f53\u524d\u624b\u52bf\u7684\u540d\u79f0\u3002\n\nExample: ``accelerometer.current_gesture()``\n\nMicroPython understands the following gesture names: ``\"up\"``, ``\"down\"``,\n``\"left\"``, ``\"right\"``, ``\"face up\"``, ``\"face down\"``, ``\"freefall\"``,\n``\"3g\"``, ``\"6g\"``, ``\"8g\"``, ``\"shake\"``. Gestures are always\nrepresented as strings.\n\n:return: The current gesture\"\"\"\n ...\n\ndef is_gesture(name: str) -> bool:\n \"\"\"\u68c0\u67e5\u547d\u540d\u624b\u52bf\u5f53\u524d\u662f\u5426\u5904\u4e8e\u6d3b\u52a8\u72b6\u6001\u3002\n\nExample: ``accelerometer.is_gesture('shake')``\n\nMicroPython understands the following gesture names: ``\"up\"``, ``\"down\"``,\n``\"left\"``, ``\"right\"``, ``\"face up\"``, ``\"face down\"``, ``\"freefall\"``,\n``\"3g\"``, ``\"6g\"``, ``\"8g\"``, ``\"shake\"``. Gestures are always\nrepresented as strings.\n\n:param name: \u624b\u52bf\u540d\u79f0\u3002\n:return: ``True`` if the gesture is active, ``False`` otherwise.\"\"\"\n ...\n\ndef was_gesture(name: str) -> bool:\n \"\"\"\u68c0\u67e5\u547d\u540d\u624b\u52bf\u81ea\u4e0a\u6b21\u8c03\u7528\u540e\u662f\u5426\u5904\u4e8e\u6d3b\u52a8\u72b6\u6001\u3002\n\nExample: ``accelerometer.was_gesture('shake')``\n\nMicroPython understands the following gesture names: ``\"up\"``, ``\"down\"``,\n``\"left\"``, ``\"right\"``, ``\"face up\"``, ``\"face down\"``, ``\"freefall\"``,\n``\"3g\"``, ``\"6g\"``, ``\"8g\"``, ``\"shake\"``. Gestures are always\nrepresented as strings.\n\n:param name: \u624b\u52bf\u540d\u79f0\u3002\n:return: ``True`` if the gesture was active since the last call, ``False`` otherwise.\"\"\"\n\ndef get_gestures() -> Tuple[str, ...]:\n \"\"\"\u8fd4\u56de\u624b\u52bf\u5386\u53f2\u7684\u5143\u7ec4\u3002\n\nExample: ``accelerometer.get_gestures()``\n\nClears the gesture history before returning.\n\nGestures are not updated in the background so there needs to be constant\ncalls to some accelerometer method to do the gesture detection. Usually\ngestures can be detected using a loop with a small :func:`microbit.sleep` delay.\n\n:return: The history as a tuple, most recent last.\"\"\"\n ...\n\ndef set_range(value: int) -> None:\n \"\"\"\u5c06\u52a0\u901f\u5ea6\u8ba1\u7075\u654f\u5ea6\u8303\u56f4\uff08\u4ee5 g\uff08\u6807\u51c6\u91cd\u529b\uff09\u4e3a\u5355\u4f4d\uff09\u8bbe\u7f6e\u4e3a\u786c\u4ef6\u652f\u6301\u7684\u6700\u63a5\u8fd1\u7684\u503c\uff0c\u56e0\u6b64\u5b83\u4f1a\u53d6\u8fd1\u4f3c\u503c\u4e3a ``2``\u3001``4`` \u6216 ``8`` g\u3002 (\u8bbe\u7f6e\u8303\u56f4)\n\nExample: ``accelerometer.set_range(8)``\n\n:param value: \u52a0\u901f\u5ea6\u8ba1\u7684\u65b0\u8303\u56f4\uff0c``g`` \u4e2d\u7684\u6574\u6570\u3002\"\"\"", "/typeshed/stdlib/microbit/audio.pyi": "\"\"\"\u4f7f\u7528 micro:bit \u64ad\u653e\u58f0\u97f3\uff08\u5bfc\u5165 ``audio`` \u4ee5\u517c\u5bb9 V1\uff09\u3002 (\u97f3\u9891)\"\"\"\nfrom ..microbit import MicroBitDigitalPin, Sound, pin0\nfrom typing import ClassVar, Iterable, Union\n\ndef play(source: Union[Iterable[AudioFrame], Sound, SoundEffect], wait: bool=True, pin: MicroBitDigitalPin=pin0, return_pin: Union[MicroBitDigitalPin, None]=None) -> None:\n \"\"\"\u64ad\u653e\u5185\u7f6e\u58f0\u97f3\u3001\u97f3\u6548\u6216\u81ea\u5b9a\u4e49\u97f3\u9891\u5e27\u3002 (\u64ad\u653e)\n\nExample: ``audio.play(Sound.GIGGLE)``\n\n:param source: (\u6765\u6e90) \u5185\u7f6e\u7684 ``Sound``\uff0c\u4f8b\u5982 ``Sound.GIGGLE``\u3001``SoundEffect`` \u6216\u4f5c\u4e3a ``AudioFrame`` \u7684\u53ef\u8fed\u4ee3\u5bf9\u8c61\u7684\u6837\u672c\u6570\u636e\u3002\n:param wait: (\u7b49\u5f85) \u5982\u679c ``wait`` \u4e3a ``True``, \u6b64\u51fd\u6570\u5c06\u4f1a\u963b\u585e\u76f4\u5230\u58f0\u97f3\u5b8c\u6210\u3002\n:param pin: (\u5f15\u811a) \u53ef\u9009\u53c2\u6570\uff0c \u7528\u4e8e\u6307\u5b9a\u53ef\u8986\u76d6\u9ed8\u8ba4 ``pin0`` \u7684\u8f93\u51fa\u5f15\u811a\u3002 \u5982\u679c\u4e0d\u60f3\u64ad\u653e\u4efb\u4f55\u58f0\u97f3\uff0c\u53ef\u4ee5\u4f7f\u7528 ``pin=None``\u3002\n:param return_pin: \u6307\u5b9a\u4e00\u4e2a\u5dee\u5206\u8fb9\u7f18\u8fde\u63a5\u5668\u5f15\u811a\u4ee5\u8fde\u63a5\u5230\u5916\u90e8\u626c\u58f0\u5668\u800c\u4e0d\u662f\u63a5\u5730\u3002\u5bf9\u4e8e **V2** \u4fee\u8ba2\u7248\uff0c\u8fd9\u5c06\u88ab\u5ffd\u7565\u3002\"\"\"\n\ndef is_playing() -> bool:\n \"\"\"\u68c0\u67e5\u662f\u5426\u5728\u64ad\u653e\u58f0\u97f3\u3002\n\nExample: ``audio.is_playing()``\n\n:return: ``True`` if audio is playing, otherwise ``False``.\"\"\"\n ...\n\ndef stop() -> None:\n \"\"\"\u505c\u6b62\u6240\u6709\u97f3\u9891\u64ad\u653e\u3002 (\u505c\u6b62)\n\nExample: ``audio.stop()``\"\"\"\n ...\n\nclass SoundEffect:\n \"\"\"\u4e00\u79cd\u97f3\u6548\uff0c\u7531\u4e00\u7ec4\u901a\u8fc7\u6784\u9020\u51fd\u6570\u6216\u5c5e\u6027\u914d\u7f6e\u7684\u53c2\u6570\u7ec4\u6210\u3002 (\u97f3\u6548)\"\"\"\n WAVEFORM_SINE: ClassVar[int]\n \"\"\"\u7528\u4e8e ``waveform`` \u53c2\u6570\u7684\u6b63\u5f26\u6ce2\u9009\u9879\u3002 (\u6ce2\u5f62\u6b63\u5f26)\"\"\"\n WAVEFORM_SAWTOOTH: ClassVar[int]\n \"\"\"\u7528\u4e8e ``waveform`` \u53c2\u6570\u7684\u952f\u9f7f\u6ce2\u9009\u9879\u3002 (\u6ce2\u5f62\u952f\u9f7f)\"\"\"\n WAVEFORM_TRIANGLE: ClassVar[int]\n \"\"\"\u7528\u4e8e ``waveform`` \u53c2\u6570\u7684\u4e09\u89d2\u6ce2\u9009\u9879\u3002 (\u6ce2\u5f62\u4e09\u89d2)\"\"\"\n WAVEFORM_SQUARE: ClassVar[int]\n \"\"\"\u7528\u4e8e ``waveform`` \u53c2\u6570\u7684\u65b9\u6ce2\u9009\u9879\u3002 (\u65b9\u6ce2)\"\"\"\n WAVEFORM_NOISE: ClassVar[int]\n \"\"\"\u7528\u4e8e ``waveform`` \u53c2\u6570\u7684\u566a\u58f0\u9009\u9879\u3002 (\u6ce2\u5f62\u566a\u58f0)\"\"\"\n SHAPE_LINEAR: ClassVar[int]\n \"\"\"\u7528\u4e8e ``shape`` \u53c2\u6570\u7684\u7ebf\u6027\u63d2\u503c\u9009\u9879\u3002 (\u5f62\u72b6\u7ebf\u6027)\"\"\"\n SHAPE_CURVE: ClassVar[int]\n \"\"\"\u7528\u4e8e ``shape`` \u53c2\u6570\u7684\u66f2\u7ebf\u63d2\u503c\u9009\u9879\u3002 (\u5f62\u72b6\u66f2\u7ebf)\"\"\"\n SHAPE_LOG: ClassVar[int]\n \"\"\"\u7528\u4e8e ``shape`` \u53c2\u6570\u7684\u5bf9\u6570\u63d2\u503c\u9009\u9879\u3002 (\u5f62\u72b6\u65e5\u5fd7)\"\"\"\n FX_NONE: ClassVar[int]\n \"\"\"\u6ca1\u6709\u7528\u4e8e ``fx`` \u53c2\u6570\u7684\u6548\u679c\u9009\u9879\u3002 (fx \u65e0)\"\"\"\n FX_TREMOLO: ClassVar[int]\n \"\"\"\u7528\u4e8e ``fx`` \u53c2\u6570\u7684\u97f3\u91cf\u98a4\u97f3\u6548\u679c\u9009\u9879\u3002 (fx \u97f3\u91cf\u98a4\u97f3)\"\"\"\n FX_VIBRATO: ClassVar[int]\n \"\"\"\u7528\u4e8e ``fx`` \u53c2\u6570\u7684\u97f3\u9ad8\u98a4\u97f3\u6548\u679c\u9009\u9879\u3002 (fx \u97f3\u9ad8\u98a4\u97f3)\"\"\"\n FX_WARBLE: ClassVar[int]\n \"\"\"\u7528\u4e8e ``fx`` \u53c2\u6570\u7684\u67d4\u548c\u98a4\u97f3\u6548\u679c\u9009\u9879\u3002 (fx \u67d4\u548c\u98a4\u97f3)\"\"\"\n freq_start: int\n \"\"\"\u5f00\u59cb\u9891\u7387\u7528 Hertz (Hz) \u8868\u793a, \u662f\u4e00\u4e2a ``0`` \u548c ``9999`` \u4e4b\u95f4\u7684\u6570\u5b57 (\u5f00\u59cb\u9891\u7387)\"\"\"\n freq_end: int\n \"\"\"\u7ed3\u675f\u9891\u7387\u7528 Hertz (Hz) \u8868\u793a, \u662f\u4e00\u4e2a ``0`` \u548c ``9999`` \u4e4b\u95f4\u7684\u6570\u5b57 (\u7ed3\u675f\u9891\u7387)\"\"\"\n duration: int\n \"\"\"\u58f0\u97f3\u6301\u7eed\u65f6\u95f4\uff0c\u4ee5\u6beb\u79d2\u8ba1\uff0c \u662f\u4e00\u4e2a ``0`` \u548c ``9999`` \u4e4b\u95f4\u7684\u6570\u5b57 (\u6301\u7eed)\"\"\"\n vol_start: int\n \"\"\"\u5f00\u59cb\u97f3\u91cf\u503c\uff0c\u662f\u4e00\u4e2a ``0`` \u548c ``255`` \u4e4b\u95f4\u7684\u6570\u5b57 (\u5f00\u59cb\u97f3\u91cf\u503c)\"\"\"\n vol_end: int\n \"\"\"\u7ed3\u675f\u97f3\u91cf\u503c\uff0c\u662f\u4e00\u4e2a ``0`` \u548c ``255`` \u4e4b\u95f4\u7684\u6570\u5b57 (\u7ed3\u675f\u97f3\u91cf\u503c)\"\"\"\n waveform: int\n \"\"\"\u6ce2\u5f62\u7c7b\u578b\uff0c\u662f\u4e0b\u5217\u503c\u4e4b\u4e00\uff1a ``WAVEFORM_SINE``, ``WAVEFORM_SAWTOOTH``, ``WAVEFORM_TRIANGLE``, ``WAVEFORM_SQUARE``, ``WAVEFORM_NOISE`` (\u968f\u673a\u751f\u6210\u566a\u97f3) (\u6ce2\u5f62)\"\"\"\n fx: int\n \"\"\"\u5bf9\u58f0\u97f3\u6dfb\u52a0\u6548\u679c\uff0c\u4e0b\u5217\u503c\u4e4b\u4e00\uff1a ``FX_TREMOLO``, ``FX_VIBRATO``, ``FX_WARBLE``, \u6216 ``FX_NONE``\"\"\"\n shape: int\n \"\"\"\u5f00\u59cb\u9891\u7387\u548c\u7ed3\u675f\u9891\u7387\u4e4b\u95f4\u7684\u5185\u63d2\u66f2\u7ebf\u7c7b\u578b\uff0c\u4e0d\u540c\u6ce2\u5f62\u7684\u9891\u7387\u53d8\u5316\u901f\u7387\u4e0d\u540c\u3002 \u4ee5\u4e0b\u503c\u4e4b\u4e00: ``SHAPE_LINEAR``, ``SHAPE_CURVE``, ``SHAPE_LOG`` (\u5f62\u72b6)\"\"\"\n\n def __init__(self, freq_start: int=500, freq_end: int=2500, duration: int=500, vol_start: int=255, vol_end: int=0, waveform: int=WAVEFORM_SQUARE, fx: int=FX_NONE, shape: int=SHAPE_LOG):\n \"\"\"\u521b\u5efa\u65b0\u7684\u97f3\u6548\u3002\n\nExample: ``my_effect = SoundEffect(duration=1000)``\n\nAll the parameters are optional, with default values as shown above, and\nthey can all be modified via attributes of the same name. For example, we\ncan first create an effect ``my_effect = SoundEffect(duration=1000)``,\nand then change its attributes ``my_effect.duration = 500``.\n\n:param freq_start: (\u5f00\u59cb\u9891\u7387) \u5f00\u59cb\u9891\u7387\u7528 Hertz (Hz) \u8868\u793a, \u662f\u4e00\u4e2a ``0`` \u548c ``9999`` \u4e4b\u95f4\u7684\u6570\u5b57.\n:param freq_end: (\u7ed3\u675f\u9891\u7387) \u7ed3\u675f\u9891\u7387\u7528 Hertz (Hz) \u8868\u793a, \u662f\u4e00\u4e2a ``0`` \u548c ``9999`` \u4e4b\u95f4\u7684\u6570\u5b57.\n:param duration: (\u6301\u7eed) \u58f0\u97f3\u6301\u7eed\u65f6\u95f4\uff0c\u4ee5\u6beb\u79d2\u8ba1\uff0c \u662f\u4e00\u4e2a ``0`` \u548c ``9999`` \u4e4b\u95f4\u7684\u6570\u5b57.\n:param vol_start: (\u5f00\u59cb\u97f3\u91cf\u503c) \u5f00\u59cb\u97f3\u91cf\u503c\uff0c\u662f\u4e00\u4e2a ``0`` \u548c ``255`` \u4e4b\u95f4\u7684\u6570\u5b57.\n:param vol_end: (\u7ed3\u675f\u97f3\u91cf\u503c) \u7ed3\u675f\u97f3\u91cf\u503c\uff0c\u662f\u4e00\u4e2a ``0`` \u548c ``255`` \u4e4b\u95f4\u7684\u6570\u5b57.\n:param waveform: (\u6ce2\u5f62) \u6ce2\u5f62\u7c7b\u578b\uff0c\u662f\u4e0b\u5217\u503c\u4e4b\u4e00\uff1a ``WAVEFORM_SINE``, ``WAVEFORM_SAWTOOTH``, ``WAVEFORM_TRIANGLE``, ``WAVEFORM_SQUARE``, ``WAVEFORM_NOISE`` (\u968f\u673a\u751f\u6210\u566a\u97f3).\n:param fx: \u5bf9\u58f0\u97f3\u6dfb\u52a0\u6548\u679c\uff0c\u4e0b\u5217\u503c\u4e4b\u4e00\uff1a ``FX_TREMOLO``, ``FX_VIBRATO``, ``FX_WARBLE``, \u6216 ``FX_NONE``.\n:param shape: (\u5f62\u72b6) \u5f00\u59cb\u9891\u7387\u548c\u7ed3\u675f\u9891\u7387\u4e4b\u95f4\u7684\u5185\u63d2\u66f2\u7ebf\u7c7b\u578b\uff0c\u4e0d\u540c\u6ce2\u5f62\u7684\u9891\u7387\u53d8\u5316\u901f\u5ea6\u4e0d\u540c\u3002 \u4ee5\u4e0b\u503c\u4e4b\u4e00: ``SHAPE_LINEAR``, ``SHAPE_CURVE``, ``SHAPE_LOG``.\"\"\"\n\n def copy(self) -> SoundEffect:\n \"\"\"\u521b\u5efa\u6b64 ``SoundEffect`` \u7684\u526f\u672c\u3002 (\u590d\u5236)\n\nExample: ``sound_2 = sound_1.copy()``\n\n:return: A copy of the SoundEffect.\"\"\"\n\nclass AudioFrame:\n \"\"\"``AudioFrame`` \u5bf9\u8c61\u662f \u4e00\u4e2a\u5305\u542b 32 \u4e2a\u6837\u672c\u7684\u5217\u8868\uff0c\u6bcf\u4e2a\u6837\u672c\u90fd\u662f\u4e00\u4e2a\u65e0\u7b26\u53f7\u5b57\u8282\n\uff080 \u5230 255 \u4e4b\u95f4\u7684\u6574\u6570\uff09\u3002 (\u97f3\u9891\u5e27)\n\nIt takes just over 4 ms to play a single frame.\n\nExample::\n\n frame = AudioFrame()\n for i in range(len(frame)):\n frame[i] = 252 - i * 8\"\"\"\n\n def copyfrom(self, other: AudioFrame) -> None:\n \"\"\"\u7528\u5176\u4ed6 ``AudioFrame`` \u5b9e\u4f8b\u4e2d\u7684\u6570\u636e\u8986\u76d6\u6b64 ``AudioFrame`` \u4e2d\u7684\u6570\u636e\u3002 (\u590d\u5236)\n\nExample: ``my_frame.copyfrom(source_frame)``\n\n:param other: (\u5176\u4ed6) \u4ece ``AudioFrame`` \u5b9e\u4f8b\u4e2d\u590d\u5236\u6570\u636e\u3002\"\"\"\n\n def __len__(self) -> int:\n ...\n\n def __setitem__(self, key: int, value: int) -> None:\n ...\n\n def __getitem__(self, key: int) -> int:\n ...", @@ -46,6 +45,7 @@ "/typeshed/stdlib/microbit/speaker.pyi": "\"\"\"\u63a7\u5236\u5185\u7f6e\u626c\u58f0\u5668\uff08\u4ec5\u9650 V2\uff09\u3002 (\u626c\u58f0\u5668\\u200b\\u200b\\u200b\\u200b)\"\"\"\n\ndef off() -> None:\n \"\"\"\u5173\u95ed\u626c\u58f0\u5668\\u200b\\u200b\\u200b\\u200b\u3002 (\u5173\u95ed)\n\nExample: ``speaker.off()``\n\nThis does not disable sound output to an edge connector pin.\"\"\"\n ...\n\ndef on() -> None:\n \"\"\"\u6253\u5f00\u626c\u58f0\u5668\\u200b\\u200b\\u200b\\u200b\u3002 (\u6253\u5f00)\n\nExample: ``speaker.on()``\"\"\"\n ...", "/typeshed/stdlib/microbit/spi.pyi": "\"\"\"\u901a\u8fc7\u4e32\u884c\u5916\u8bbe\u63a5\u53e3\uff08SPI\uff09\u603b\u7ebf\u4e0e\u8bbe\u5907\u901a\u4fe1\u3002 (\u4e32\u884c\u5916\u56f4\u63a5\u53e3\uff08SPI\uff09)\"\"\"\nfrom _typeshed import ReadableBuffer, WriteableBuffer\nfrom ..microbit import pin13, pin14, pin15, MicroBitDigitalPin\n\ndef init(baudrate: int=1000000, bits: int=8, mode: int=0, sclk: MicroBitDigitalPin=pin13, mosi: MicroBitDigitalPin=pin15, miso: MicroBitDigitalPin=pin14) -> None:\n \"\"\"\u521d\u59cb\u5316\u4e32\u884c\u5916\u8bbe\u63a5\u53e3\uff08SPI \uff09\u901a\u4fe1\u3002\n\nExample: ``spi.init()``\n\nFor correct communication, the parameters have to be the same on both communicating devices.\n\n:param baudrate: (\u6ce2\u7279\u7387) \u901a\u4fe1\u901f\u5ea6\u3002\n:param bits: (\u4f4d) \u6bcf\u6b21\u4f20\u8f93\u7684\u5bbd\u5ea6\uff08\u5355\u4f4d\uff1abit\uff09\u3002\u76ee\u524d\u53ea\u652f\u6301 ``bits=8``\uff0c\u4f46\u662f\u672a\u6765\u53ef\u80fd\u652f\u6301\u5176\u4ed6\u5bbd\u5ea6\u3002\n:param mode: (\u6a21\u5f0f) \u51b3\u5b9a\u65f6\u949f\u6781\u6027\u548c\u76f8\u4f4d\u7684\u7ec4\u5408\u2014\u2014\u201c\u53c2\u89c1\u5728\u7ebf\u8868\u683c\u201d\u3002\n:param sclk: (SCLK) sclk \u5f15\u811a(\u9ed8\u8ba4 13)\n:param mosi: (MOSI) mosi \u5f15\u811a(\u9ed8\u8ba4 15)\n:param miso: (MISO) MISO\u5f15\u811a\uff08\u9ed8\u8ba4\u503c14\uff09\"\"\"\n ...\n\ndef read(nbytes: int) -> bytes:\n \"\"\"\u8bfb\u53d6\u5b57\u8282\u3002 (\u8bfb\u53d6)\n\nExample: ``spi.read(64)``\n\n:param nbytes: (\u5b57\u8282\u6570) \u8981\u8bfb\u53d6\u7684\u6700\u5927\u5b57\u8282\u6570\u3002\n:return: The bytes read.\"\"\"\n ...\n\ndef write(buffer: ReadableBuffer) -> None:\n \"\"\"\u5c06\u5b57\u8282\u5199\u5165\u603b\u7ebf\u3002 (\u5199\u5165)\n\nExample: ``spi.write(bytes([1, 2, 3]))``\n\n:param buffer: (\u7f13\u51b2\u533a) \u8bfb\u53d6\u6570\u636e\u7684\u7f13\u51b2\u533a\u3002\"\"\"\n ...\n\ndef write_readinto(out: WriteableBuffer, in_: ReadableBuffer) -> None:\n \"\"\"\u5c06 ``out`` \u7f13\u51b2\u533a\u5199\u5165\u603b\u7ebf\uff0c\u5e76\u5c06\u4efb\u4f55\u54cd\u5e94\u8bfb\u5165 ``in_`` \u7f13\u51b2\u533a\u3002 (\u5199\u5e76\u8bfb\u5165)\n\nExample: ``spi.write_readinto(out_buffer, in_buffer)``\n\nThe length of the buffers should be the same. The buffers can be the same object.\n\n:param out: (\u5199\u51fa) \u5199\u5165\u4efb\u4f55\u54cd\u5e94\u7684\u7f13\u51b2\u533a\u3002\n:param in_: (\u8bfb\u5165) \u8bfb\u53d6\u6570\u636e\u7684\u7f13\u51b2\u533a\u3002\"\"\"\n ...", "/typeshed/stdlib/microbit/uart.pyi": "\"\"\"\u4f7f\u7528\u4e32\u884c\u63a5\u53e3\u4e0e\u8bbe\u5907\u901a\u4fe1\u3002 (\u901a\u7528\u5f02\u6b65\u6536\u53d1\u5668\uff08UART\uff09)\"\"\"\nfrom _typeshed import WriteableBuffer\nfrom ..microbit import MicroBitDigitalPin\nfrom typing import Optional, Union\nODD: int\n\"\"\"\u5947\u6821\u9a8c (\u5947\u6570)\"\"\"\nEVEN: int\n\"\"\"\u5076\u6821\u9a8c (\u5076\u6570)\"\"\"\n\ndef init(baudrate: int=9600, bits: int=8, parity: Optional[int]=None, stop: int=1, tx: Optional[MicroBitDigitalPin]=None, rx: Optional[MicroBitDigitalPin]=None) -> None:\n \"\"\"\u521d\u59cb\u5316\u4e32\u884c\u901a\u4fe1\u3002\n\nExample: ``uart.init(115200, tx=pin0, rx=pin1)``\n\n:param baudrate: (\u6ce2\u7279\u7387) \u901a\u4fe1\u901f\u5ea6\u3002\n:param bits: (\u4f4d\u6570) \u6b63\u5728\u4f20\u8f93\u7684\u5b57\u8282\u5927\u5c0f\u3002micro:bit \u4ec5\u652f\u6301 8 \u5b57\u8282\u3002\n:param parity: (\u5947\u5076\u6821\u9a8c) \u5982\u4f55\u68c0\u67e5\u5947\u5076\u6027\uff0c``None``\u3001``uart.ODD`` \u6216 ``uart.EVEN``\u3002\n:param stop: (\u505c\u6b62) \u505c\u6b62\u4f4d\u7684\u6570\u91cf\uff0c\u5bf9\u4e8e micro:bit\uff0c\u5fc5\u987b\u4e3a 1\u3002\n:param tx: (\u53d1\u9001\u5f15\u811a) \u4f20\u8f93\u5f15\u811a\u3002\n:param rx: (\u63a5\u6536\u5f15\u811a) \u63a5\u6536\u5f15\u811a\u3002\n\nInitializing the UART on external pins will cause the Python console on\nUSB to become unaccessible, as it uses the same hardware. To bring the\nconsole back you must reinitialize the UART without passing anything for\n``tx`` or ``rx`` (or passing ``None`` to these arguments). This means\nthat calling ``uart.init(115200)`` is enough to restore the Python console.\n\nFor more details see `the online documentation `_.\"\"\"\n ...\n\ndef any() -> bool:\n \"\"\"\u68c0\u67e5\u662f\u5426\u6709\u4efb\u4f55\u6570\u636e\u6b63\u5728\u7b49\u5f85\u3002 (\u4efb\u4f55)\n\nExample: ``uart.any()``\n\n:return: ``True`` if any data is waiting, else ``False``.\"\"\"\n ...\n\ndef read(nbytes: Optional[int]=None) -> Optional[bytes]:\n \"\"\"\u8bfb\u53d6\u5b57\u8282\u3002 (\u8bfb\u53d6)\n\nExample: ``uart.read()``\n\n:param nbytes: (\u5b57\u8282\u6570) \u5982\u679c\u6307\u5b9a\u4e86 ``nbytes``\uff0c\u5219\u6700\u591a\u8bfb\u53d6\u90a3\u4e48\u591a\u5b57\u8282\uff0c\u5426\u5219\u8bfb\u53d6\u5c3d\u53ef\u80fd\u591a\u7684\u5b57\u8282\n:return: A bytes object or ``None`` on timeout\"\"\"\n ...\n\ndef readinto(buf: WriteableBuffer, nbytes: Optional[int]=None) -> Optional[int]:\n \"\"\"\u8bfb\u53d6\u5b57\u8282\u5230 ``buf``\u3002 (\u8bfb\u5165)\n\nExample: ``uart.readinto(input_buffer)``\n\n:param buf: (\u7f13\u51b2\u533a) \u8981\u5199\u5165\u7684\u7f13\u5b58\u3002\n:param nbytes: (\u5b57\u8282\u6570) \u5982\u679c\u6307\u5b9a\u4e86 ``nbytes``\uff0c\u5219\u6700\u591a\u8bfb\u53d6\u90a3\u4e48\u591a\u5b57\u8282\uff0c\u5426\u5219\u8bfb\u53d6 ``len(buf)`` \u4e2a\u5b57\u8282\u3002\n:return: number of bytes read and stored into ``buf`` or ``None`` on timeout.\"\"\"\n ...\n\ndef readline() -> Optional[bytes]:\n \"\"\"\u8bfb\u53d6\u4e00\u884c\uff0c\u4ee5\u6362\u884c\u7b26\u7ed3\u5c3e\u3002 (\u8bfb\u53d6\u4e00\u884c)\n\nExample: ``uart.readline()``\n\n:return: The line read or ``None`` on timeout. The newline character is included in the returned bytes.\"\"\"\n ...\n\ndef write(buf: Union[bytes, str]) -> Optional[int]:\n \"\"\"\u5c06\u7f13\u51b2\u533a\u5199\u5165\u603b\u7ebf\u3002 (\u5199\u5165)\n\nExample: ``uart.write('hello world')``\n\n:param buf: (\u7f13\u51b2\u533a) \u4e00\u4e2a\u5b57\u8282\u5bf9\u8c61\u6216\u4e00\u4e2a\u5b57\u7b26\u4e32\u3002\n:return: The number of bytes written, or ``None`` on timeout.\n\nExamples::\n\n uart.write('hello world')\n uart.write(b'hello world')\n uart.write(bytes([1, 2, 3]))\"\"\"\n ...", + "/typeshed/stdlib/collections/__init__.pyi": "import sys\nfrom typing import (\n Any,\n Dict,\n Generic,\n ItemsView,\n Iterable,\n Iterator,\n KeysView,\n Optional,\n Reversible,\n Tuple,\n Type,\n TypeVar,\n Union,\n ValuesView,\n)\n\n_S = TypeVar(\"_S\")\n_T = TypeVar(\"_T\")\n_KT = TypeVar(\"_KT\")\n_VT = TypeVar(\"_VT\")\n\nif sys.version_info >= (3, 7):\n def namedtuple(\n typename: str,\n field_names: Union[str, Iterable[str]],\n *,\n rename: bool = ...,\n module: Optional[str] = ...,\n defaults: Optional[Iterable[Any]] = ...,\n ) -> Type[Tuple[Any, ...]]: ...\n\nelse:\n def namedtuple(\n typename: str,\n field_names: Union[str, Iterable[str]],\n *,\n verbose: bool = ...,\n rename: bool = ...,\n module: Optional[str] = ...,\n ) -> Type[Tuple[Any, ...]]: ...\n\nclass _OrderedDictKeysView(KeysView[_KT], Reversible[_KT]):\n def __reversed__(self) -> Iterator[_KT]: ...\n\nclass _OrderedDictItemsView(ItemsView[_KT, _VT], Reversible[Tuple[_KT, _VT]]):\n def __reversed__(self) -> Iterator[Tuple[_KT, _VT]]: ...\n\nclass _OrderedDictValuesView(ValuesView[_VT], Reversible[_VT]):\n def __reversed__(self) -> Iterator[_VT]: ...\n\nclass OrderedDict(Dict[_KT, _VT], Reversible[_KT], Generic[_KT, _VT]):\n def popitem(self, last: bool = ...) -> Tuple[_KT, _VT]: ...\n def move_to_end(self, key: _KT, last: bool = ...) -> None: ...\n def copy(self: _S) -> _S: ...\n def __reversed__(self) -> Iterator[_KT]: ...\n def keys(self) -> _OrderedDictKeysView[_KT]: ...\n def items(self) -> _OrderedDictItemsView[_KT, _VT]: ...\n def values(self) -> _OrderedDictValuesView[_VT]: ...\n", "/src/pyrightconfig.json": "{ \n \"pythonVersion\": \"3.6\",\n \"pythonPlatform\": \"Linux\",\n \"typeCheckingMode\": \"basic\",\n \"typeshedPath\": \"/typeshed/\",\n \"reportMissingModuleSource\": false,\n \"reportWildcardImportFromLibrary\": false,\n \"verboseOutput\": true\n }\n" } } \ No newline at end of file diff --git a/src/micropython/main/typeshed.zh-tw.json b/src/micropython/main/typeshed.zh-tw.json index f09d00647..de2c6c9a2 100644 --- a/src/micropython/main/typeshed.zh-tw.json +++ b/src/micropython/main/typeshed.zh-tw.json @@ -19,7 +19,7 @@ "/typeshed/stdlib/power.pyi": "\"\"\"Manage the power modes of the micro:bit (V2 only).\n\"\"\"\n\nfrom microbit import MicroBitDigitalPin, Button\nfrom typing import Optional, Tuple, Union\n\ndef off() -> None:\n \"\"\"Power down the board to the lowest possible power mode.\n\n Example: ``power.off()``\n\n This is the equivalent to pressing the reset button for a few seconds,\n to set the board in \"Off mode\".\n\n The micro:bit will only wake up if the reset button is pressed or,\n if on battery power, when a USB cable is connected.\n\n When the board wakes up it will start for a reset state, so your program\n will start running from the beginning.\n \"\"\"\n ...\n\ndef deep_sleep(\n ms: Optional[int] = None,\n wake_on: Optional[\n Union[MicroBitDigitalPin, Button] | Tuple[MicroBitDigitalPin | Button, ...]\n ] = None,\n run_every: bool = True,\n) -> None:\n \"\"\"Set the micro:bit into a low power mode where it can wake up and continue operation.\n\n Example: ``power.deep_sleep(wake_on=(button_a, button_b))``\n\n The program state is preserved and when it wakes up it will resume\n operation where it left off.\n\n Deep Sleep mode will consume more battery power than Off mode.\n\n The wake up sources are configured via arguments.\n\n The board will always wake up when receiving UART data, when the reset\n button is pressed (which resets the board) or, in battery power,\n when the USB cable is inserted.\n\n When the ``run_every`` parameter is set to ``True`` (the default), any\n function scheduled with ``run_every`` will momentarily wake up the board\n to run and when it finishes it will go back to sleep.\n\n :param ms: A time in milliseconds to wait before it wakes up.\n :param wake_on: A single instance or a tuple of pins and/or buttons to wake up the board, e.g. ``deep_sleep(wake_on=button_a)`` or ``deep_sleep(wake_on=(pin0, pin2, button_b))``.\n :param run_every: A boolean to configure if the functions scheduled with ``microbit.run_every`` will continue to run while it sleeps.\n \"\"\"\n ...\n", "/typeshed/stdlib/radio.pyi": "\"\"\"\u4f7f\u7528\u5167\u5efa\u7121\u7dda\u96fb\u5728 micro:bits \u4e4b\u9593\u9032\u884c\u901a\u8a0a\u3002 (\u7121\u7dda\u96fb)\"\"\"\nfrom _typeshed import WriteableBuffer\nfrom typing import Optional, Tuple\nRATE_1MBIT: int\n\"\"\"\u5e38\u6578\u7528\u65bc\u6307\u793a\u6bcf\u79d2 1 MBit \u7684\u8f38\u9001\u91cf\u3002\"\"\"\nRATE_2MBIT: int\n\"\"\"\u5e38\u6578\u7528\u65bc\u6307\u793a\u6bcf\u79d2 2 MBit \u7684\u8f38\u9001\u91cf\u3002\"\"\"\n\ndef on() -> None:\n \"\"\"\u958b\u555f\u7121\u7dda\u96fb\u3002\n\nExample: ``radio.on()``\n\nThis needs to be explicitly called since the radio draws power and takes\nup memory that you may otherwise need.\"\"\"\n ...\n\ndef off() -> None:\n \"\"\"\u95dc\u9589\u7121\u7dda\u96fb\uff0c\u7bc0\u7701\u96fb\u91cf\u548c\u8a18\u61b6\u9ad4\u3002\n\nExample: ``radio.off()``\"\"\"\n ...\n\ndef config(length: int=32, queue: int=3, channel: int=7, power: int=6, address: int=1969383796, group: int=0, data_rate: int=RATE_1MBIT) -> None:\n \"\"\"\u8a2d\u5b9a\u7121\u7dda\u96fb\u3002\n\nExample: ``radio.config(group=42)``\n\nThe default configuration is suitable for most use.\n\n:param length: (default=32) \u5b9a\u7fa9\u900f\u904e\u7121\u7dda\u96fb\u50b3\u9001\u7684\u8a0a\u606f\u7684\u6700\u5927\u9577\u5ea6 (\u4ee5\u4f4d\u5143\u7d44\u70ba\u55ae\u4f4d)\u3002\n\u6700\u9577\u53ef\u9054 251 \u500b\u4f4d\u5143\u7d44 (S0\u3001LENGTH \u548c S1 \u524d\u5e8f\u7de8\u78bc\u70ba 254 - 3 \u500b\u4f4d\u5143\u7d44)\u3002\n:param queue: (default=3) \u6307\u5b9a\u53ef\u4ee5\u5b58\u5132\u5728\u50b3\u5165\u8a0a\u606f\u4f47\u5217\u4e2d\u7684\u8a0a\u606f\u6578\u3002\n\u5982\u679c\u4f47\u5217\u4e2d\u6c92\u6709\u7a7a\u9593\u53ef\u7559\u7d66\u50b3\u5165\u8a0a\u606f\uff0c\u5247\u6368\u68c4\u50b3\u5165\u8a0a\u606f\u3002\n:param channel: (default=7) \u4e00\u500b\u5f9e 0 \u5230 83 (\u5305\u542b) \u7684\u6574\u6578\u503c\uff0c\u5b9a\u7fa9\u7121\u7dda\u96fb\u8abf\u6574\u5230\u7684\u4efb\u610f \"channel\"\u3002\n\u8a0a\u606f\u5c07\u900f\u904e\u6b64\u983b\u9053\u50b3\u9001\uff0c\u53ea\u6709\u900f\u904e\u6b64\u983b\u9053\u63a5\u6536\u7684\u8a0a\u606f\uff0c\u624d\u6703\u653e\u5165\u50b3\u5165\u8a0a\u606f\u4f47\u5217\u3002\n\u6bcf\u4e00\u6b65\u90fd\u662f 1MHz \u5bec\uff0c\u4ee5 2400MHz \u70ba\u57fa\u790e\u3002\n:param power: (default=6) \u662f\u4e00\u500b\u5f9e 0 \u5230 7 (\u5305\u542b) \u7684\u6574\u6578\u503c\uff0c\u8868\u793a\u7121\u7dda\u96fb\u8a0a\u606f\u6642\u4f7f\u7528\u7684\u8a0a\u865f\u529f\u7387\u3002\n\u6578\u503c\u8d8a\u9ad8\uff0c\u8a0a\u865f\u8d8a\u5f37\uff0c\u4f46\u88dd\u7f6e\u6d88\u8017\u7684\u529f\u7387\u8d8a\u591a\u3002\u7de8\u865f\u8f49\u63db\u70ba\u4e0b\u5217 dBm (\u5206\u8c9d\u6beb\u74e6) \u6578\u503c\u5217\u8868\u4e2d\u7684\u4f4d\u7f6e\uff1a-30\u3001-20\u3001-16\u3001-12\u3001-8\u3001-4\u30010\u30014\u3002\n:param address: (default=0x75626974) \u4efb\u610f\u540d\u7a31\uff0c\u8868\u793a\u70ba 32 \u4f4d\u5143\u4f4d\u5740\uff0c\u7528\u65bc\u5728\u786c\u9ad4\u7b49\u7d1a\u7be9\u9078\u50b3\u5165\u7684\u8cc7\u6599\u5957\u4ef6\uff0c\u50c5\u4fdd\u7559\u8207\u60a8\u8a2d\u5b9a\u7684\u4f4d\u5740\u76f8\u7b26\u7684\u90a3\u4e9b\u3002\n\u5176\u4ed6 micro:bit \u76f8\u95dc\u5e73\u53f0\u4f7f\u7528\u7684\u9810\u8a2d\u8a2d\u5b9a\uff0c\u5247\u662f\u6b64\u8655\u4f7f\u7528\u7684\u9810\u8a2d\u8a2d\u5b9a\u3002\n:param group: (default=0) \u7be9\u9078\u8a0a\u606f\u6642\u8207 ``address`` \u4e00\u8d77\u4f7f\u7528\u7684 8 \u4f4d\u5143\u503c (0-255)\u3002\n\u5f9e\u6982\u5ff5\u4e0a\u8b1b\uff0c\"address\" \u5c31\u50cf\u4e00\u500b\u5bb6\u5ead/\u8fa6\u516c\u5ba4\u5730\u5740\uff0c\u800c \"group\" \u5c31\u50cf\u60a8\u8981\u5411\u8a72\u5730\u5740\u50b3\u9001\u8a0a\u606f\u7684\u4eba\u3002\n:param data_rate: (default=``radio.RATE_1MBIT``) \u8868\u793a\u8cc7\u6599\u8f38\u9001\u91cf\u767c\u751f\u7684\u901f\u5ea6\u3002\n\u53ef\u4ee5\u662f ``radio`` \u6a21\u7d44\u4e2d\u5b9a\u7fa9\u7684\u4e0b\u5217\u5e38\u6578\u4e4b\u4e00\uff1a``RATE_250KBIT``\u3001``RATE_1MBIT`` \u6216 ``RATE_2MBIT``\u3002\n\nIf ``config`` is not called then the defaults described above are assumed.\"\"\"\n ...\n\ndef reset() -> None:\n \"\"\"\u5c07\u8a2d\u5b9a\u91cd\u8a2d\u70ba\u5176\u9810\u8a2d\u503c\u3002\n\nExample: ``radio.reset()``\n\nThe defaults as as per the ``config`` function above.\"\"\"\n ...\n\ndef send_bytes(message: bytes) -> None:\n \"\"\"\u50b3\u9001\u5305\u542b\u4f4d\u5143\u7d44\u7684\u8a0a\u606f\u3002\n\nExample: ``radio.send_bytes(b'hello')``\n\n:param message: \u8981\u50b3\u9001\u7684\u4f4d\u5143\u7d44\u3002\"\"\"\n ...\n\ndef receive_bytes() -> Optional[bytes]:\n \"\"\"\u63a5\u6536\u8a0a\u606f\u4f47\u5217\u4e2d\u7684\u4e0b\u4e00\u5247\u50b3\u5165\u8a0a\u606f\u3002\n\nExample: ``radio.receive_bytes()``\n\n:return: The message bytes if any, otherwise ``None``.\"\"\"\n ...\n\ndef receive_bytes_into(buffer: WriteableBuffer) -> Optional[int]:\n \"\"\"\u5c07\u8a0a\u606f\u4f47\u5217\u4e2d\u7684\u4e0b\u4e00\u5247\u50b3\u5165\u8a0a\u606f\u8907\u88fd\u5230\u7de9\u885d\u5340\u3002\n\nExample: ``radio.receive_bytes_info(buffer)``\n\n:param buffer: \u76ee\u6a19\u7de9\u885d\u5340\u3002\u5982\u679c\u8a0a\u606f\u5927\u5c0f\u5927\u65bc\u7de9\u885d\u5340\uff0c\u5247\u8a0a\u606f\u6703\u88ab\u622a\u65b7\u3002\n:return: ``None`` if there are no pending messages, otherwise it returns the length of the message (which might be more than the length of the buffer).\"\"\"\n ...\n\ndef send(message: str) -> None:\n \"\"\"\u50b3\u9001\u8a0a\u606f\u5b57\u4e32\u3002\n\nExample: ``radio.send('hello')``\n\nThis is the equivalent of ``radio.send_bytes(bytes(message, 'utf8'))`` but with ``b'\\x01\\x00\\x01'``\nprepended to the front (to make it compatible with other platforms that target the micro:bit).\n\n:param message: \u8981\u50b3\u9001\u7684\u5b57\u4e32\u3002\"\"\"\n ...\n\ndef receive() -> Optional[str]:\n \"\"\"\u5de5\u4f5c\u65b9\u5f0f\u8207 ``receive_bytes`` \u5b8c\u5168\u76f8\u540c\uff0c\u4f46\u6703\u50b3\u56de\u50b3\u9001\u7684\u4efb\u4f55\u5167\u5bb9\u3002\n\nExample: ``radio.receive()``\n\nEquivalent to ``str(receive_bytes(), 'utf8')`` but with a check that the the first\nthree bytes are ``b'\\x01\\x00\\x01'`` (to make it compatible with other platforms that\nmay target the micro:bit).\n\n:return: The message with the prepended bytes stripped and converted to a string.\n\nA ``ValueError`` exception is raised if conversion to string fails.\"\"\"\n ...\n\ndef receive_full() -> Optional[Tuple[bytes, int, int]]:\n \"\"\"\u50b3\u56de\u4e00\u500b\u5305\u542b\u4e09\u500b\u6578\u503c\u7684\u5143\u7d44\uff0c\u7528\u4f86\u4ee3\u8868\u8a0a\u606f\u4f47\u5217\u4e2d\u7684\u4e0b\u4e00\u5247\u50b3\u5165\u8a0a\u606f\u3002\n\nExample: ``radio.receive_full()``\n\nIf there are no pending messages then ``None`` is returned.\n\nThe three values in the tuple represent:\n\n- the next incoming message on the message queue as bytes.\n- the RSSI (signal strength): a value between 0 (strongest) and -255 (weakest) as measured in dBm.\n- a microsecond timestamp: the value returned by ``time.ticks_us()`` when the message was received.\n\nFor example::\n\n details = radio.receive_full()\n if details:\n msg, rssi, timestamp = details\n\nThis function is useful for providing information needed for triangulation\nand/or trilateration with other micro:bit devices.\n\n:return: ``None`` if there is no message, otherwise a tuple of length three with the bytes, strength and timestamp values.\"\"\"\n ...", "/typeshed/stdlib/random.pyi": "\"\"\"\u751f\u6210\u96a8\u6a5f\u6578\u3002\"\"\"\nfrom typing import TypeVar, Sequence, Union, overload\n\ndef getrandbits(n: int) -> int:\n \"\"\"\u751f\u6210\u5177\u6709 ``n`` \u500b\u96a8\u6a5f\u4f4d\u5143\u7684\u6574\u6578\u3002\n\nExample: ``random.getrandbits(1)``\n\n:param n: \u4ecb\u65bc 1-30 (\u5305\u542b) \u4e4b\u9593\u7684\u503c\u3002\"\"\"\n ...\n\ndef seed(n: int) -> None:\n \"\"\"\u521d\u59cb\u5316\u96a8\u6a5f\u6578\u751f\u6210\u5668\u3002\n\nExample: ``random.seed(0)``\n\n:param n: \u6574\u6578\u7a2e\u5b50\n\nThis will give you reproducibly deterministic randomness from a given starting\nstate (``n``).\"\"\"\n ...\n\ndef randint(a: int, b: int) -> int:\n \"\"\"\u5728 ``a`` \u548c ``b`` (\u5305\u542b) \u4e4b\u9593\u9078\u64c7\u4e00\u500b\u96a8\u6a5f\u6574\u6578\u3002\n\nExample: ``random.randint(0, 9)``\n\n:param a: \u7bc4\u570d\u7684\u8d77\u59cb\u503c (\u5305\u542b)\n:param b: \u7bc4\u570d\u7684\u7d50\u675f\u503c (\u5305\u542b)\n\nAlias for ``randrange(a, b + 1)``.\"\"\"\n ...\n\n@overload\ndef randrange(stop: int) -> int:\n \"\"\"\u5728\u96f6\u5230 (\u4f46\u4e0d\u5305\u62ec) ``stop`` \u4e4b\u9593\u96a8\u6a5f\u9078\u64c7\u4e00\u500b\u6574\u6578\u3002\n\nExample: ``random.randrange(10)``\n\n:param stop: \u7bc4\u570d\u7684\u7d50\u675f\u503c (\u6392\u9664)\"\"\"\n ...\n\n@overload\ndef randrange(start: int, stop: int, step: int=1) -> int:\n \"\"\"\u5f9e ``range(start, stop, step)`` \u4e2d\u9078\u64c7\u4e00\u500b\u96a8\u6a5f\u9078\u64c7\u7684\u5143\u7d20\u3002\n\nExample: ``random.randrange(0, 10)``\n\n:param start: \u7bc4\u570d\u7684\u958b\u59cb (\u5305\u542b)\n:param stop: \u7bc4\u570d\u7d50\u675f (\u6392\u9664)\n:param step: \u6b65\u9a5f\u3002\"\"\"\n ...\n_T = TypeVar('_T')\n\ndef choice(seq: Sequence[_T]) -> _T:\n \"\"\"\u5f9e\u975e\u7a7a\u5e8f\u5217 ``seq`` \u4e2d\u9078\u64c7\u4e00\u500b\u96a8\u6a5f\u5143\u7d20\u3002\n\nExample: ``random.choice([Image.HAPPY, Image.SAD])``\n\n:param seq: \u5e8f\u5217\u3002\n\nIf ``seq`` is empty, raises ``IndexError``.\"\"\"\n ...\n\ndef random() -> float:\n \"\"\"\u5728 [0.0, 1.0) \u7bc4\u570d\u5167\u751f\u6210\u4e00\u500b\u96a8\u6a5f\u6d6e\u9ede\u6578\u3002\n\nExample: ``random.random()``\n\n:return: The random floating point number\"\"\"\n ...\n\ndef uniform(a: float, b: float) -> float:\n \"\"\"\u50b3\u56de\u4e00\u500b\u4ecb\u65bc ``a`` \u548c ``b`` \u4e4b\u9593\u7684\u96a8\u6a5f\u6d6e\u9ede\u6578\u3002\n\nExample: ``random.uniform(0, 9)``\n\n:param a: \u7bc4\u570d\u7684\u8d77\u59cb\u503c (\u5305\u62ec)\n:param b: \u7bc4\u570d\u7684\u7d50\u675f\u503c (\u5305\u542b)\"\"\"\n ...", - "/typeshed/stdlib/speech.pyi": "\"\"\"\u8b93 micro:bit \u8aaa\u8a71\u3001\u5531\u6b4c\u548c\u767c\u51fa\u985e\u4f3c\u8072\u97f3\u7684\u5176\u4ed6\u8a9e\u97f3\u3002\"\"\"\nfrom typing import Optional\nfrom .microbit import MicroBitDigitalPin, pin0\n\ndef translate(words: str) -> str:\n \"\"\"\u5c07\u82f1\u8a9e\u55ae\u5b57\u7ffb\u8b6f\u6210\u97f3\u7d20\u3002\n\nExample: ``speech.translate('hello world')``\n\n:param words: \u82f1\u6587\u55ae\u5b57\u5b57\u4e32\u3002\n:return: A string containing a best guess at the appropriate phonemes to pronounce.\nThe output is generated from this `text to phoneme translation table `_.\n\nThis function should be used to generate a first approximation of phonemes\nthat can be further hand-edited to improve accuracy, inflection and\nemphasis.\n\nSee `the online documentation `_ for detailed information.\"\"\"\n ...\n\ndef pronounce(phonemes: str, pitch: int=64, speed: int=72, mouth: int=128, throat: int=128, pin: Optional[MicroBitDigitalPin]=pin0) -> None:\n \"\"\"\u767c\u51fa\u97f3\u7d20\u7684\u8072\u97f3\u3002\n\nExample: ``speech.pronounce(' /HEHLOW WERLD')``\n\n:param phonemes: \u767c\u97f3\u7684\u97f3\u7d20\u5b57\u4e32\n:param pitch: (\u9593\u8ddd) \u4e00\u500b\u4ee3\u8868\u8072\u97f3\u97f3\u9ad8\u7684\u6578\u5b57\n:param speed: \u4e00\u500b\u4ee3\u8868\u8072\u97f3\u901f\u5ea6\u7684\u6578\u5b57\n:param mouth: \u4e00\u500b\u4ee3\u8868\u8072\u97f3\u53e3\u578b\u7684\u6578\u5b57\n:param throat: \u4e00\u500b\u4ee3\u8868\u8072\u97f3\u5589\u578b\u7684\u6578\u5b57\n:param pin: (\u5f15\u8173) \u6307\u5b9a\u8f38\u51fa\u5f15\u8173\u7684\u53ef\u9078\u5f15\u6578\uff0c\u53ef\u7528\u65bc\u8986\u5beb\u9810\u8a2d\u503c ``pin0``\u3002\n\u5982\u679c\u6211\u5011\u4e0d\u60f3\u5f9e\u5f15\u8173\u4e0a\u64ad\u653e\u4efb\u4f55\u8072\u97f3\uff0c\u53ef\u4ee5\u4f7f\u7528 ``pin=None``\u3002\u50c5\u9650 micro:bit\u3002\n\nOverride the optional pitch, speed, mouth and throat settings to change the\ntimbre (quality) of the voice.\n\nSee `the online documentation `_ for detailed information.\"\"\"\n ...\n\ndef say(words: str, pitch: int=64, speed: int=72, mouth: int=128, throat: int=128, pin: MicroBitDigitalPin=pin0) -> None:\n \"\"\"\u8aaa\u82f1\u8a9e\u55ae\u8a5e\u3002\n\nExample: ``speech.say('hello world')``\n\n:param words: \u8981\u8aaa\u7684\u4e00\u4e32\u8a5e\u3002\n:param pitch: (\u9593\u8ddd) \u4e00\u500b\u4ee3\u8868\u8072\u97f3\u97f3\u9ad8\u7684\u6578\u5b57\n:param speed: \u4e00\u500b\u4ee3\u8868\u8072\u97f3\u901f\u5ea6\u7684\u6578\u5b57\n:param mouth: \u4e00\u500b\u4ee3\u8868\u8072\u97f3\u53e3\u578b\u7684\u6578\u5b57\n:param throat: \u4e00\u500b\u4ee3\u8868\u8072\u97f3\u5589\u578b\u7684\u6578\u5b57\n:param pin: (\u5f15\u8173) \u6307\u5b9a\u8f38\u51fa\u5f15\u8173\u7684\u53ef\u9078\u5f15\u6578\u53ef\u7528\u65bc\u8986\u5beb\u9810\u8a2d\u503c ``pin0``\u3002\n\u5982\u679c\u6211\u5011\u7121\u610f\u5f9e\u5f15\u8173\u4e0a\u64ad\u653e\u4efb\u4f55\u8072\u97f3\uff0c\u53ef\u4ee5\u4f7f\u7528 ``pin=None``\u3002\u50c5\u9650 micro:bit\u3002\n\nThe result is semi-accurate for English. Override the optional pitch, speed,\nmouth and throat settings to change the timbre (quality) of the voice.\n\nThis is a short-hand equivalent of:\n``speech.pronounce(speech.translate(words))``\n\nSee `the online documentation `_ for detailed information.\"\"\"\n ...\n\ndef sing(phonemes: str, pitch: int=64, speed: int=72, mouth: int=128, throat: int=128, pin: MicroBitDigitalPin=pin0) -> None:\n \"\"\"\u5531\u51fa\u97f3\u7d20\u3002\n\nExample: ``speech.sing(' /HEHLOW WERLD')``\n\n:param phonemes: \u8981\u5531\u7684\u4e00\u4e32\u8a5e\u3002\n:param pitch: (\u9593\u8ddd) \u4e00\u500b\u4ee3\u8868\u8072\u97f3\u97f3\u9ad8\u7684\u6578\u5b57\n:param speed: \u4e00\u500b\u4ee3\u8868\u8072\u97f3\u901f\u5ea6\u7684\u6578\u5b57\n:param mouth: \u4e00\u500b\u4ee3\u8868\u8072\u97f3\u53e3\u578b\u7684\u6578\u5b57\n:param throat: \u4e00\u500b\u4ee3\u8868\u8072\u97f3\u5589\u578b\u7684\u6578\u5b57\n:param pin: (\u5f15\u8173) \u6307\u5b9a\u8f38\u51fa\u5f15\u8173\u7684\u53ef\u9078\u5f15\u6578\uff0c\u53ef\u7528\u65bc\u8986\u5beb\u9810\u8a2d\u503c ``pin0``\u3002\n\u5982\u679c\u6211\u5011\u4e0d\u60f3\u5f9e\u5f15\u8173\u4e0a\u64ad\u653e\u4efb\u4f55\u8072\u97f3\uff0c\u53ef\u4ee5\u4f7f\u7528 ``pin=None``\u3002\u50c5\u9650 micro:bit\u3002\n\nOverride the optional pitch, speed, mouth and throat settings to change\nthe timbre (quality) of the voice.\n\nSee `the online documentation `_ for detailed information.\"\"\"\n ...", + "/typeshed/stdlib/speech.pyi": "\"\"\"\u8b93 micro:bit \u8aaa\u8a71\u3001\u5531\u6b4c\u548c\u767c\u51fa\u985e\u4f3c\u8072\u97f3\u7684\u5176\u4ed6\u8a9e\u97f3\u3002\"\"\"\nfrom typing import Optional\nfrom .microbit import MicroBitDigitalPin, pin0\n\ndef translate(words: str) -> str:\n \"\"\"\u5c07\u82f1\u8a9e\u55ae\u5b57\u7ffb\u8b6f\u6210\u97f3\u7d20\u3002\n\nExample: ``speech.translate('hello world')``\n\n:param words: \u82f1\u6587\u55ae\u5b57\u5b57\u4e32\u3002\n:return: A string containing a best guess at the appropriate phonemes to pronounce.\nThe output is generated from this `text to phoneme translation table `_.\n\nThis function should be used to generate a first approximation of phonemes\nthat can be further hand-edited to improve accuracy, inflection and\nemphasis.\n\nSee `the online documentation `_ for detailed information.\"\"\"\n ...\n\ndef pronounce(phonemes: str, pitch: int=64, speed: int=72, mouth: int=128, throat: int=128, pin: Optional[MicroBitDigitalPin]=pin0) -> None:\n \"\"\"\u767c\u51fa\u97f3\u7d20\u7684\u8072\u97f3\u3002\n\nExample: ``speech.pronounce(' /HEHLOW WERLD')``\n\n:param phonemes: \u767c\u97f3\u7684\u97f3\u7d20\u5b57\u4e32\n:param pitch: (\u9593\u8ddd) \u4e00\u500b\u4ee3\u8868\u8072\u97f3\u97f3\u9ad8\u7684\u6578\u5b57\n:param speed: \u4e00\u500b\u4ee3\u8868\u8072\u97f3\u901f\u5ea6\u7684\u6578\u5b57\n:param mouth: \u4e00\u500b\u4ee3\u8868\u8072\u97f3\u53e3\u578b\u7684\u6578\u5b57\n:param throat: \u4e00\u500b\u4ee3\u8868\u8072\u97f3\u5589\u578b\u7684\u6578\u5b57\n:param pin: (\u5f15\u8173) \u6307\u5b9a\u8f38\u51fa\u5f15\u8173\u7684\u53ef\u9078\u5f15\u6578\uff0c\u53ef\u7528\u65bc\u8986\u5beb\u9810\u8a2d\u503c ``pin0``\u3002\n\u5982\u679c\u6211\u5011\u4e0d\u60f3\u5f9e\u5f15\u8173\u4e0a\u64ad\u653e\u4efb\u4f55\u8072\u97f3\uff0c\u53ef\u4ee5\u4f7f\u7528 ``pin=None``\u3002\u50c5\u9650 micro:bit\u3002\n\nOverride the optional pitch, speed, mouth and throat settings to change the\ntimbre (quality) of the voice.\n\nSee `the online documentation `_ for detailed information.\"\"\"\n ...\n\ndef say(words: str, pitch: int=64, speed: int=72, mouth: int=128, throat: int=128, pin: MicroBitDigitalPin=pin0) -> None:\n \"\"\"\u8aaa\u82f1\u8a9e\u55ae\u5b57\u3002\n\nExample: ``speech.say('hello world')``\n\n:param words: \u8981\u8aaa\u7684\u4e00\u4e32\u8a5e\u3002\n:param pitch: (\u9593\u8ddd) \u4e00\u500b\u4ee3\u8868\u8072\u97f3\u97f3\u9ad8\u7684\u6578\u5b57\n:param speed: \u4e00\u500b\u4ee3\u8868\u8072\u97f3\u901f\u5ea6\u7684\u6578\u5b57\n:param mouth: \u4e00\u500b\u4ee3\u8868\u8072\u97f3\u53e3\u578b\u7684\u6578\u5b57\n:param throat: \u4e00\u500b\u4ee3\u8868\u8072\u97f3\u5589\u578b\u7684\u6578\u5b57\n:param pin: (\u5f15\u8173) \u6307\u5b9a\u8f38\u51fa\u5f15\u8173\u7684\u53ef\u9078\u5f15\u6578\u53ef\u7528\u65bc\u8986\u5beb\u9810\u8a2d\u503c ``pin0``\u3002\n\u5982\u679c\u6211\u5011\u7121\u610f\u5f9e\u5f15\u8173\u4e0a\u64ad\u653e\u4efb\u4f55\u8072\u97f3\uff0c\u53ef\u4ee5\u4f7f\u7528 ``pin=None``\u3002\u50c5\u9650 micro:bit\u3002\n\nThe result is semi-accurate for English. Override the optional pitch, speed,\nmouth and throat settings to change the timbre (quality) of the voice.\n\nThis is a short-hand equivalent of:\n``speech.pronounce(speech.translate(words))``\n\nSee `the online documentation `_ for detailed information.\"\"\"\n ...\n\ndef sing(phonemes: str, pitch: int=64, speed: int=72, mouth: int=128, throat: int=128, pin: MicroBitDigitalPin=pin0) -> None:\n \"\"\"\u5531\u51fa\u97f3\u7d20\u3002\n\nExample: ``speech.sing(' /HEHLOW WERLD')``\n\n:param phonemes: \u8981\u5531\u7684\u4e00\u4e32\u8a5e\u3002\n:param pitch: (\u9593\u8ddd) \u4e00\u500b\u4ee3\u8868\u8072\u97f3\u97f3\u9ad8\u7684\u6578\u5b57\n:param speed: \u4e00\u500b\u4ee3\u8868\u8072\u97f3\u901f\u5ea6\u7684\u6578\u5b57\n:param mouth: \u4e00\u500b\u4ee3\u8868\u8072\u97f3\u53e3\u578b\u7684\u6578\u5b57\n:param throat: \u4e00\u500b\u4ee3\u8868\u8072\u97f3\u5589\u578b\u7684\u6578\u5b57\n:param pin: (\u5f15\u8173) \u6307\u5b9a\u8f38\u51fa\u5f15\u8173\u7684\u53ef\u9078\u5f15\u6578\uff0c\u53ef\u7528\u65bc\u8986\u5beb\u9810\u8a2d\u503c ``pin0``\u3002\n\u5982\u679c\u6211\u5011\u4e0d\u60f3\u5f9e\u5f15\u8173\u4e0a\u64ad\u653e\u4efb\u4f55\u8072\u97f3\uff0c\u53ef\u4ee5\u4f7f\u7528 ``pin=None``\u3002\u50c5\u9650 micro:bit\u3002\n\nOverride the optional pitch, speed, mouth and throat settings to change\nthe timbre (quality) of the voice.\n\nSee `the online documentation `_ for detailed information.\"\"\"\n ...", "/typeshed/stdlib/struct.pyi": "\"\"\"\u58d3\u7e2e\u548c\u89e3\u58d3\u7e2e\u539f\u59cb\u8cc7\u6599\u985e\u578b\u3002\"\"\"\nfrom _typeshed import ReadableBuffer, WriteableBuffer\nfrom typing import Any, Tuple, Union\n\ndef calcsize(fmt: str) -> int:\n \"\"\"\u53d6\u5f97\u5b58\u5132\u7279\u5b9a ``fmt`` \u6240\u9700\u7684\u4f4d\u5143\u7d44\u6578\u3002\n\nExample: ``struct.calcsize('hf')``\n\n:param fmt: \u683c\u5f0f\u5b57\u4e32\u3002\n:return The number of bytes needed to store such a value.\"\"\"\n ...\n\ndef pack(fmt: str, v1: Any, *vn: Any) -> bytes:\n \"\"\"\u6839\u64da\u683c\u5f0f\u5b57\u4e32\uff0c\u58d3\u7e2e\u6578\u503c\u3002\n\nExample: ``struct.pack('hf', 1, 3.1415)``\n\n:param fmt: \u683c\u5f0f\u5b57\u4e32\u3002\n:param v1: \u9996\u4f4d\u6578\u503c\u3002\n:param *vn: \u5269\u9918\u6578\u503c\u3002\n:return A bytes object encoding the values.\"\"\"\n ...\n\ndef pack_into(fmt: str, buffer: WriteableBuffer, offset: int, v1: Any, *vn: Any) -> None:\n \"\"\"\u6839\u64da\u683c\u5f0f\u5b57\u4e32\uff0c\u58d3\u7e2e\u6578\u503c\u3002\n\nExample: ``struct.pack_info('hf', buffer, 1, 3.1415)``\n\n:param fmt: \u683c\u5f0f\u5b57\u4e32\u3002\n:param buffer: \u8981\u5beb\u5165\u7684\u7de9\u885d\u5340\u3002\n:param offset: \u7de9\u885d\u5340\u5167\u7684\u4f4d\u79fb\u3002\u5f9e\u7de9\u885d\u5340\u7d50\u5c3e\u958b\u59cb\u8a08\u6578\uff0c\u8a72\u4f4d\u79fb\u53ef\u80fd\u70ba\u8ca0\u6578\u3002\n:param v1: \u9996\u4f4d\u6578\u503c\u3002\n:param *vn: \u5269\u9918\u6578\u503c\u3002\"\"\"\n ...\n\ndef unpack(fmt: str, data: ReadableBuffer) -> Tuple[Any, ...]:\n \"\"\"\u6839\u64da\u683c\u5f0f\u5b57\u4e32\uff0c\u89e3\u58d3\u7e2e\u6578\u503c\u3002\n\nExample: ``v1, v2 = struct.unpack('hf', buffer)``\n\n:param fmt: \u683c\u5f0f\u5b57\u4e32\u3002\n:param data: \u8cc7\u6599\u3002\n:return: A tuple of the unpacked values.\"\"\"\n ...\n\ndef unpack_from(fmt: str, buffer: ReadableBuffer, offset: int=0) -> Tuple:\n \"\"\"\u6839\u64da\u683c\u5f0f\u5b57\u4e32\uff0c\u5f9e\u7de9\u885d\u5340\u89e3\u58d3\u7e2e\u8cc7\u6599\u3002\n\nExample: ``v1, v2 = struct.unpack_from('hf', buffer)``\n\n:param fmt: \u683c\u5f0f\u5b57\u4e32\u3002\n:param buffer: \u8981\u8b80\u53d6\u7684\u4f86\u6e90\u7de9\u885d\u5340\u3002\n:param offset: \u7de9\u885d\u5340\u5167\u7684\u4f4d\u79fb\u3002\u5f9e\u7de9\u885d\u5340\u7d50\u5c3e\u958b\u59cb\u8a08\u6578\uff0c\u8a72\u4f4d\u79fb\u53ef\u80fd\u70ba\u8ca0\u6578\u3002\n:return: A tuple of the unpacked values.\"\"\"\n ...", "/typeshed/stdlib/sys.pyi": "\"\"\"\u7cfb\u7d71\u7279\u5b9a\u51fd\u5f0f\"\"\"\nfrom typing import Any, Dict, List, NoReturn, TextIO, Tuple\n\ndef exit(retval: object=...) -> NoReturn:\n \"\"\"\u4f7f\u7528\u6307\u5b9a\u7684\u9000\u51fa\u4ee3\u78bc\u4f86\u7d42\u6b62\u7576\u524d\u7a0b\u5f0f\u3002\n\nExample: ``sys.exit(1)``\n\nThis function raises a ``SystemExit`` exception. If an argument is given, its\nvalue given as an argument to ``SystemExit``.\n\n:param retval: \u9000\u51fa\u4ee3\u78bc\u6216\u8a0a\u606f\u3002\"\"\"\n ...\n\ndef print_exception(exc: Exception) -> None:\n \"\"\"\u8f38\u51fa\u5e36\u6709\u56de\u6eaf\u7684\u4f8b\u5916\u72c0\u6cc1\u3002\n\nExample: ``sys.print_exception(e)``\n\n:param exc: \u8f38\u51fa\u4f8b\u5916\u72c0\u6cc1\n\nThis is simplified version of a function which appears in the\n``traceback`` module in CPython.\"\"\"\nargv: List[str]\n\"\"\"\u76ee\u524d\u7a0b\u5f0f\u555f\u52d5\u6642\uff0c\u6240\u4f7f\u7528\u7684\u53ef\u8b8a\u5f15\u6578\u5217\u8868\u3002\"\"\"\nbyteorder: str\n\"\"\"\u7cfb\u7d71\u7684\u4f4d\u5143\u7d44\u9806\u5e8f (``\"little\"`` \u6216 ``\"big\"``)\u3002\"\"\"\n\nclass _implementation:\n name: str\n version: Tuple[int, int, int]\nimplementation: _implementation\n\"\"\"\u5305\u542b\u95dc\u65bc\u76ee\u524d Python \u57f7\u884c\u8cc7\u8a0a\u7684\u7269\u4ef6\u3002\n\nFor MicroPython, it has following attributes:\n\n- ``name`` - string \"micropython\"\n- ``version`` - tuple (major, minor, micro), e.g. (1, 7, 0)\n\nThis object is the recommended way to distinguish MicroPython from other\nPython implementations (note that it still may not exist in the very\nminimal ports).\n\nCPython mandates more attributes for this object, but the actual useful\nbare minimum is implemented in MicroPython.\n\"\"\"\nmaxsize: int\n\"\"\"\n\u672c\u6a5f\u6574\u6578\u985e\u578b\u5728\u7576\u524d\u5e73\u53f0\u4e0a\u53ef\u4ee5\u4fdd\u5b58\u7684\u6700\u5927\u503c\uff0c\u6216 MicroPython \u6574\u6578\u985e\u578b\u53ef\u8868\u793a\u7684\u6700\u5927\u503c\uff0c\u5982\u679c\u5b83\u5c0f\u65bc\u5e73\u53f0\u6700\u5927\u503c (\u5c0d\u65bc\u6c92\u6709 long int \u652f\u63f4\u7684 MicroPython \u9023\u63a5\u57e0\uff0c\u5c31\u662f\u9019\u7a2e\u60c5\u6cc1)\u3002\n\nThis attribute is useful for detecting \"bitness\" of a platform (32-bit vs\n64-bit, etc.). It's recommended to not compare this attribute to some\nvalue directly, but instead count number of bits in it::\n\n bits = 0\n v = sys.maxsize\n while v:\n bits += 1\n v >>= 1\n if bits > 32:\n # 64-bit (or more) platform\n ...\n else:\n # 32-bit (or less) platform\n # Note that on 32-bit platform, value of bits may be less than 32\n # (e.g. 31) due to peculiarities described above, so use \"> 16\",\n # \"> 32\", \"> 64\" style of comparisons.\n\"\"\"\nmodules: Dict[str, Any]\n\"\"\"\u5df2\u8f09\u5165\u6a21\u7d44\u7684\u5b57\u5178\u3002 \n\nOn some ports, it may not include builtin modules.\"\"\"\npath: List[str]\n\"\"\"\u7528\u65bc\u641c\u5c0b\u532f\u5165\u6a21\u7d44\u7684\u53ef\u8b8a\u5b57\u5178\u5217\u8868\u3002\"\"\"\nplatform: str\n\"\"\"\u6b63\u5728\u57f7\u884c MicroPython \u7684\u5e73\u53f0\u3002 \n\nFor OS/RTOS ports, this is usually an identifier of the OS, e.g. ``\"linux\"``.\nFor baremetal ports it is an identifier of a board, e.g. ``\"pyboard\"`` for \nthe original MicroPython reference board. It thus can be used to\ndistinguish one board from another.\n\nIf you need to check whether your program runs on MicroPython (vs other\nPython implementation), use ``sys.implementation`` instead.\n\"\"\"\nversion: str\n\"\"\"\u6b64\u57f7\u884c\u7b26\u5408\u7684 Python \u8a9e\u8a00\u7248\u672c\uff0c\u505a\u70ba\u5b57\u4e32\u3002\"\"\"\nversion_info: Tuple[int, int, int]\n\"\"\"\u6b64\u57f7\u884c\u7b26\u5408\u7684 Python \u8a9e\u8a00\u7248\u672c\uff0c\u505a\u70ba\u6574\u6578\u5143\u7d44\u3002\n\nOnly the first three version numbers (major, minor, micro) are supported and\nthey can be referenced only by index, not by name.\n\"\"\"", "/typeshed/stdlib/this.pyi": "def authors() -> str: ...\n", @@ -35,7 +35,6 @@ "/typeshed/stdlib/usys.pyi": "from sys import *\n", "/typeshed/stdlib/utime.pyi": "from time import *\n", "/typeshed/stdlib/_typeshed/__init__.pyi": "# Utility types for typeshed\n#\n# See the README.md file in this directory for more information.\n\nimport array\nimport sys\nfrom os import PathLike\nfrom typing import AbstractSet, Any, Container, Iterable, Protocol, Tuple, TypeVar, Union\nfrom typing_extensions import Literal, final\n\n_KT = TypeVar(\"_KT\")\n_KT_co = TypeVar(\"_KT_co\", covariant=True)\n_KT_contra = TypeVar(\"_KT_contra\", contravariant=True)\n_VT = TypeVar(\"_VT\")\n_VT_co = TypeVar(\"_VT_co\", covariant=True)\n_T = TypeVar(\"_T\")\n_T_co = TypeVar(\"_T_co\", covariant=True)\n_T_contra = TypeVar(\"_T_contra\", contravariant=True)\n\n# Use for \"self\" annotations:\n# def __enter__(self: Self) -> Self: ...\nSelf = TypeVar(\"Self\") # noqa Y001\n\n# stable\nclass IdentityFunction(Protocol):\n def __call__(self, __x: _T) -> _T: ...\n\nclass SupportsLessThan(Protocol):\n def __lt__(self, __other: Any) -> bool: ...\n\nSupportsLessThanT = TypeVar(\"SupportsLessThanT\", bound=SupportsLessThan) # noqa: Y001\n\nclass SupportsDivMod(Protocol[_T_contra, _T_co]):\n def __divmod__(self, __other: _T_contra) -> _T_co: ...\n\nclass SupportsRDivMod(Protocol[_T_contra, _T_co]):\n def __rdivmod__(self, __other: _T_contra) -> _T_co: ...\n\nclass SupportsLenAndGetItem(Protocol[_T_co]):\n def __len__(self) -> int: ...\n def __getitem__(self, __k: int) -> _T_co: ...\n\n# Mapping-like protocols\n\n# stable\nclass SupportsItems(Protocol[_KT_co, _VT_co]):\n def items(self) -> AbstractSet[Tuple[_KT_co, _VT_co]]: ...\n\n# stable\nclass SupportsKeysAndGetItem(Protocol[_KT, _VT_co]):\n def keys(self) -> Iterable[_KT]: ...\n def __getitem__(self, __k: _KT) -> _VT_co: ...\n\n# stable\nclass SupportsGetItem(Container[_KT_contra], Protocol[_KT_contra, _VT_co]):\n def __getitem__(self, __k: _KT_contra) -> _VT_co: ...\n\n# stable\nclass SupportsItemAccess(SupportsGetItem[_KT_contra, _VT], Protocol[_KT_contra, _VT]):\n def __setitem__(self, __k: _KT_contra, __v: _VT) -> None: ...\n def __delitem__(self, __v: _KT_contra) -> None: ...\n\n# These aliases are simple strings in Python 2.\nStrPath = Union[str, PathLike[str]] # stable\nBytesPath = Union[bytes, PathLike[bytes]] # stable\nStrOrBytesPath = Union[str, bytes, PathLike[str], PathLike[bytes]] # stable\n\nOpenTextModeUpdating = Literal[\n \"r+\",\n \"+r\",\n \"rt+\",\n \"r+t\",\n \"+rt\",\n \"tr+\",\n \"t+r\",\n \"+tr\",\n \"w+\",\n \"+w\",\n \"wt+\",\n \"w+t\",\n \"+wt\",\n \"tw+\",\n \"t+w\",\n \"+tw\",\n \"a+\",\n \"+a\",\n \"at+\",\n \"a+t\",\n \"+at\",\n \"ta+\",\n \"t+a\",\n \"+ta\",\n \"x+\",\n \"+x\",\n \"xt+\",\n \"x+t\",\n \"+xt\",\n \"tx+\",\n \"t+x\",\n \"+tx\",\n]\nOpenTextModeWriting = Literal[\"w\", \"wt\", \"tw\", \"a\", \"at\", \"ta\", \"x\", \"xt\", \"tx\"]\nOpenTextModeReading = Literal[\"r\", \"rt\", \"tr\", \"U\", \"rU\", \"Ur\", \"rtU\", \"rUt\", \"Urt\", \"trU\", \"tUr\", \"Utr\"]\nOpenTextMode = Union[OpenTextModeUpdating, OpenTextModeWriting, OpenTextModeReading]\nOpenBinaryModeUpdating = Literal[\n \"rb+\",\n \"r+b\",\n \"+rb\",\n \"br+\",\n \"b+r\",\n \"+br\",\n \"wb+\",\n \"w+b\",\n \"+wb\",\n \"bw+\",\n \"b+w\",\n \"+bw\",\n \"ab+\",\n \"a+b\",\n \"+ab\",\n \"ba+\",\n \"b+a\",\n \"+ba\",\n \"xb+\",\n \"x+b\",\n \"+xb\",\n \"bx+\",\n \"b+x\",\n \"+bx\",\n]\nOpenBinaryModeWriting = Literal[\"wb\", \"bw\", \"ab\", \"ba\", \"xb\", \"bx\"]\nOpenBinaryModeReading = Literal[\"rb\", \"br\", \"rbU\", \"rUb\", \"Urb\", \"brU\", \"bUr\", \"Ubr\"]\nOpenBinaryMode = Union[OpenBinaryModeUpdating, OpenBinaryModeReading, OpenBinaryModeWriting]\n\n# stable\nclass HasFileno(Protocol):\n def fileno(self) -> int: ...\n\nFileDescriptor = int # stable\nFileDescriptorLike = Union[int, HasFileno] # stable\n\n# stable\nclass SupportsRead(Protocol[_T_co]):\n def read(self, __length: int = ...) -> _T_co: ...\n\n# stable\nclass SupportsReadline(Protocol[_T_co]):\n def readline(self, __length: int = ...) -> _T_co: ...\n\n# stable\nclass SupportsNoArgReadline(Protocol[_T_co]):\n def readline(self) -> _T_co: ...\n\n# stable\nclass SupportsWrite(Protocol[_T_contra]):\n def write(self, __s: _T_contra) -> Any: ...\n\nReadableBuffer = Union[bytes, bytearray, memoryview, array.array[Any]] # stable\nWriteableBuffer = Union[bytearray, memoryview, array.array[Any]] # stable\n\n# stable\nif sys.version_info >= (3, 10):\n from types import NoneType as NoneType\nelse:\n # Used by type checkers for checks involving None (does not exist at runtime)\n @final\n class NoneType:\n def __bool__(self) -> Literal[False]: ...\n", - "/typeshed/stdlib/collections/__init__.pyi": "import sys\nfrom typing import (\n Any,\n Dict,\n Generic,\n ItemsView,\n Iterable,\n Iterator,\n KeysView,\n Optional,\n Reversible,\n Tuple,\n Type,\n TypeVar,\n Union,\n ValuesView,\n)\n\n_S = TypeVar(\"_S\")\n_T = TypeVar(\"_T\")\n_KT = TypeVar(\"_KT\")\n_VT = TypeVar(\"_VT\")\n\nif sys.version_info >= (3, 7):\n def namedtuple(\n typename: str,\n field_names: Union[str, Iterable[str]],\n *,\n rename: bool = ...,\n module: Optional[str] = ...,\n defaults: Optional[Iterable[Any]] = ...,\n ) -> Type[Tuple[Any, ...]]: ...\n\nelse:\n def namedtuple(\n typename: str,\n field_names: Union[str, Iterable[str]],\n *,\n verbose: bool = ...,\n rename: bool = ...,\n module: Optional[str] = ...,\n ) -> Type[Tuple[Any, ...]]: ...\n\nclass _OrderedDictKeysView(KeysView[_KT], Reversible[_KT]):\n def __reversed__(self) -> Iterator[_KT]: ...\n\nclass _OrderedDictItemsView(ItemsView[_KT, _VT], Reversible[Tuple[_KT, _VT]]):\n def __reversed__(self) -> Iterator[Tuple[_KT, _VT]]: ...\n\nclass _OrderedDictValuesView(ValuesView[_VT], Reversible[_VT]):\n def __reversed__(self) -> Iterator[_VT]: ...\n\nclass OrderedDict(Dict[_KT, _VT], Reversible[_KT], Generic[_KT, _VT]):\n def popitem(self, last: bool = ...) -> Tuple[_KT, _VT]: ...\n def move_to_end(self, key: _KT, last: bool = ...) -> None: ...\n def copy(self: _S) -> _S: ...\n def __reversed__(self) -> Iterator[_KT]: ...\n def keys(self) -> _OrderedDictKeysView[_KT]: ...\n def items(self) -> _OrderedDictItemsView[_KT, _VT]: ...\n def values(self) -> _OrderedDictValuesView[_VT]: ...\n", "/typeshed/stdlib/microbit/__init__.pyi": "\"\"\"\u5f15\u8173\u3001\u5f71\u50cf\u3001\u8072\u97f3\u3001\u6eab\u5ea6\u548c\u97f3\u91cf\u3002\"\"\"\nfrom typing import Any, Callable, List, Optional, Tuple, Union, overload\nfrom _typeshed import ReadableBuffer\nfrom . import accelerometer as accelerometer\nfrom . import audio as audio\nfrom . import compass as compass\nfrom . import display as display\nfrom . import i2c as i2c\nfrom . import microphone as microphone\nfrom . import speaker as speaker\nfrom . import spi as spi\nfrom . import uart as uart\n\ndef run_every(callback: Optional[Callable[[], None]]=None, days: int=0, h: int=0, min: int=0, s: int=0, ms: int=0) -> Callable[[Callable[[], None]], Callable[[], None]]:\n \"\"\"Schedule to run a function at the interval specified by the time arguments **V2 only**.\n\nExample: ``run_every(my_logging, min=5)``\n\n``run_every`` can be used in two ways:\n\nAs a Decorator - placed on top of the function to schedule. For example::\n\n @run_every(h=1, min=20, s=30, ms=50)\n def my_function():\n # Do something here\n\nAs a Function - passing the callback as a positional argument. For example::\n\n def my_function():\n # Do something here\n run_every(my_function, s=30)\n\nEach argument corresponds to a different time unit and they are additive.\nSo ``run_every(min=1, s=30)`` schedules the callback every minute and a half.\n\nWhen an exception is thrown inside the callback function it deschedules the\nfunction. To avoid this you can catch exceptions with ``try/except``.\n\n:param callback: Function to call at the provided interval. Omit when using as a decorator.\n:param days: Sets the day mark for the scheduling.\n:param h: Sets the hour mark for the scheduling.\n:param min: Sets the minute mark for the scheduling.\n:param s: Sets the second mark for the scheduling.\n:param ms: Sets the millisecond mark for the scheduling.\"\"\"\n\ndef panic(n: int) -> None:\n \"\"\"\u9032\u5165\u7dca\u6025\u6a21\u5f0f\u3002\n\nExample: ``panic(127)``\n\n:param n: \u4efb\u610f\u6574\u6578 <= 255 \u4ee5\u8868\u793a\u72c0\u614b\u3002\n\nRequires restart.\"\"\"\n\ndef reset() -> None:\n \"\"\"\u91cd\u555f\u958b\u767c\u677f\u3002\"\"\"\n\n@overload\ndef scale(value: float, from_: Tuple[float, float], to: Tuple[int, int]) -> int:\n \"\"\"Converts a value from a range to an integer range.\n\nExample: ``volume = scale(accelerometer.get_x(), from_=(-2000, 2000), to=(0, 255))``\n\nFor example, to convert an accelerometer X value to a speaker volume.\n\nIf one of the numbers in the ``to`` parameter is a floating point\n(i.e a decimal number like ``10.0``), this function will return a\nfloating point number.\n\n temp_fahrenheit = scale(30, from_=(0.0, 100.0), to=(32.0, 212.0))\n\n:param value: A number to convert.\n:param from_: A tuple to define the range to convert from.\n:param to: A tuple to define the range to convert to.\n:return: The ``value`` converted to the ``to`` range.\"\"\"\n\n@overload\ndef scale(value: float, from_: Tuple[float, float], to: Tuple[float, float]) -> float:\n \"\"\"Converts a value from a range to a floating point range.\n\nExample: ``temp_fahrenheit = scale(30, from_=(0.0, 100.0), to=(32.0, 212.0))``\n\nFor example, to convert temperature from a Celsius scale to Fahrenheit.\n\nIf one of the numbers in the ``to`` parameter is a floating point\n(i.e a decimal number like ``10.0``), this function will return a\nfloating point number.\nIf they are both integers (i.e ``10``), it will return an integer::\n\n returns_int = scale(accelerometer.get_x(), from_=(-2000, 2000), to=(0, 255))\n\n:param value: A number to convert.\n:param from_: A tuple to define the range to convert from.\n:param to: A tuple to define the range to convert to.\n:return: The ``value`` converted to the ``to`` range.\"\"\"\n\ndef sleep(n: float) -> None:\n \"\"\"\u7b49\u5f85 ``n`` \u6beb\u79d2\u3002\n\nExample: ``sleep(1000)``\n\n:param n: \u8981\u7b49\u5f85\u7684\u6beb\u79d2\u6578\u3002\n\nOne second is 1000 milliseconds, so::\n\n microbit.sleep(1000)\n\nwill pause the execution for one second.\"\"\"\n\ndef running_time() -> int:\n \"\"\"\u53d6\u5f97\u958b\u767c\u677f\u7684\u57f7\u884c\u6642\u9593\u3002\n\n:return: The number of milliseconds since the board was switched on or restarted.\"\"\"\n\ndef temperature() -> int:\n \"\"\"\u53d6\u5f97 micro:bit \u7684\u6eab\u5ea6 (\u4ee5\u651d\u6c0f\u70ba\u55ae\u4f4d)\u3002 (\u6eab\u5ea6)\"\"\"\n\ndef set_volume(v: int) -> None:\n \"\"\"\u8a2d\u5b9a\u97f3\u91cf\u3002\n\nExample: ``set_volume(127)``\n\n:param v: \u4ecb\u65bc 0 (\u4f4e) \u548c 255 (\u9ad8) \u4e4b\u9593\u7684\u503c\u3002\n\nOut of range values will be clamped to 0 or 255.\n\n**V2** only.\"\"\"\n ...\n\nclass Button:\n \"\"\"\u6309\u9215 ``button_a`` \u548c ``button_b`` \u7684\u985e\u5225\u3002\"\"\"\n\n def is_pressed(self) -> bool:\n \"\"\"\u6aa2\u67e5\u6309\u9215\u662f\u5426\u6709\u6309\u4e0b\u3002\n\n:return: ``True`` if the specified button ``button`` is pressed, and ``False`` otherwise.\"\"\"\n ...\n\n def was_pressed(self) -> bool:\n \"\"\"\u6aa2\u67e5\u81ea\u88dd\u7f6e\u555f\u52d5\u6216\u4e0a\u6b21\u547c\u53eb\u6b64\u65b9\u6cd5\u4ee5\u4f86\uff0c\u662f\u5426\u6709\u6309\u4e0b\u8a72\u6309\u9215\u3002\n\nCalling this method will clear the press state so\nthat the button must be pressed again before this method will return\n``True`` again.\n\n:return: ``True`` if the specified button ``button`` was pressed, and ``False`` otherwise\"\"\"\n ...\n\n def get_presses(self) -> int:\n \"\"\"\u53d6\u5f97\u6309\u4e0b\u6309\u9215\u7684\u57f7\u884c\u7e3d\u6578\uff0c\u4e26\u5728\u50b3\u56de\u524d\u5c07\u6b64\u7e3d\u6578\u91cd\u8a2d\u70ba\u96f6\u3002\n\n:return: The number of presses since the device started or the last time this method was called\"\"\"\n ...\nbutton_a: Button\n\"\"\"\u5de6\u5074\u6309\u9215 ``Button`` \u7269\u4ef6\u3002\"\"\"\nbutton_b: Button\n\"\"\"\u53f3\u5074\u6309\u9215 ``Button`` \u7269\u4ef6\u3002\"\"\"\n\nclass MicroBitDigitalPin:\n \"\"\"\u6578\u4f4d\u5f15\u8173\u3002\n\nSome pins support analog and touch features using the ``MicroBitAnalogDigitalPin`` and ``MicroBitTouchPin`` subclasses.\"\"\"\n NO_PULL: int\n PULL_UP: int\n PULL_DOWN: int\n\n def read_digital(self) -> int:\n \"\"\"\u53d6\u5f97\u5f15\u8173\u7684\u6578\u4f4d\u503c\u3002\n\nExample: ``value = pin0.read_digital()``\n\n:return: 1 if the pin is high, and 0 if it's low.\"\"\"\n ...\n\n def write_digital(self, value: int) -> None:\n \"\"\"\u8a2d\u5b9a\u5f15\u8173\u7684\u6578\u4f4d\u503c\u3002\n\nExample: ``pin0.write_digital(1)``\n\n:param value: 1 \u5c07\u5f15\u8173\u8a2d\u70ba\u9ad8\u96fb\u5e73\uff0c\u6216 0 \u5c07\u5f15\u8173\u8a2d\u70ba\u4f4e\u96fb\u5e73\"\"\"\n ...\n\n def set_pull(self, value: int) -> None:\n \"\"\"\u5c07\u63d0\u53d6\u72c0\u614b\u8a2d\u70ba\u4e09\u500b\u53ef\u80fd\u503c\u4e4b\u4e00\uff1a``PULL_UP``\u3001``PULL_DOWN`` \u6216 ``NO_PULL``\u3002\n\nExample: ``pin0.set_pull(pin0.PULL_UP)``\n\n:param value: \u76f8\u95dc\u5f15\u8173\u7684\u63d0\u53d6\u72c0\u614b\uff0c\u4f8b\u5982 ``pin0.PULL_UP``\u3002\"\"\"\n ...\n\n def get_pull(self) -> int:\n \"\"\"\u53d6\u5f97\u5f15\u8173\u4e0a\u7684\u63d0\u53d6\u72c0\u614b\u3002\n\nExample: ``pin0.get_pull()``\n\n:return: ``NO_PULL``, ``PULL_DOWN``, or ``PULL_UP``\n\nThese are set using the ``set_pull()`` method or automatically configured\nwhen a pin mode requires it.\"\"\"\n ...\n\n def get_mode(self) -> str:\n \"\"\"\u50b3\u56de\u5f15\u8173\u6a21\u5f0f\u3002\n\nExample: ``pin0.get_mode()``\n\nWhen a pin is used for a specific function, like\nwriting a digital value, or reading an analog value, the pin mode\nchanges.\n\n:return: ``\"unused\"``, ``\"analog\"``, ``\"read_digital\"``, ``\"write_digital\"``, ``\"display\"``, ``\"button\"``, ``\"music\"``, ``\"audio\"``, ``\"touch\"``, ``\"i2c\"``, or ``\"spi\"``\"\"\"\n ...\n\n def write_analog(self, value: int) -> None:\n \"\"\"\u5728\u5f15\u8173\u4e0a\u8f38\u51fa PWM \u8a0a\u865f\uff0c\u5de5\u4f5c\u9031\u671f\u8207 ``value`` \u6210\u6b63\u6bd4\u3002\n\nExample: ``pin0.write_analog(254)``\n\n:param value: \u4ecb\u65bc 0 (0% \u5de5\u4f5c\u9031\u671f) \u548c 1023 (100% \u5de5\u4f5c\u9031\u671f) \u4e4b\u9593\u7684\u6574\u6578\u6216\u6d6e\u9ede\u6578\u3002\"\"\"\n\n def set_analog_period(self, period: int) -> None:\n \"\"\"\u5c07\u8f38\u51fa\u7684 PWM \u8a0a\u865f\u9031\u671f\u8a2d\u70ba ``period`` (\u4ee5\u6beb\u79d2\u70ba\u55ae\u4f4d)\u3002\n\nExample: ``pin0.set_analog_period(10)``\n\n:param period: \u4ee5\u6beb\u79d2\u70ba\u55ae\u4f4d\u7684\u9031\u671f\uff0c\u6700\u5c0f\u6709\u6548\u503c\u70ba 1ms\u3002\"\"\"\n\n def set_analog_period_microseconds(self, period: int) -> None:\n \"\"\"\u5c07\u8f38\u51fa\u7684 PWM \u8a0a\u865f\u9031\u671f\u8a2d\u70ba ``period`` (\u4ee5\u5fae\u79d2\u70ba\u55ae\u4f4d)\u3002\n\nExample: ``pin0.set_analog_period_microseconds(512)``\n\n:param period: \u4ee5\u5fae\u79d2\u70ba\u55ae\u4f4d\u7684\u9031\u671f\uff0c\u6700\u5c0f\u6709\u6548\u503c\u70ba 256\u00b5s\u3002\"\"\"\n\nclass MicroBitAnalogDigitalPin(MicroBitDigitalPin):\n \"\"\"\u5177\u6709\u985e\u6bd4\u548c\u6578\u4f4d\u529f\u80fd\u7684\u5f15\u8173\u3002\"\"\"\n\n def read_analog(self) -> int:\n \"\"\"\u8b80\u53d6\u65bd\u52a0\u5230\u5f15\u8173\u7684\u96fb\u58d3\u3002\n\nExample: ``pin0.read_analog()``\n\n:return: An integer between 0 (meaning 0V) and 1023 (meaning 3.3V).\"\"\"\n\nclass MicroBitTouchPin(MicroBitAnalogDigitalPin):\n \"\"\"\u5177\u6709\u985e\u6bd4\u3001\u6578\u4f4d\u548c\u89f8\u63a7\u529f\u80fd\u7684\u5f15\u8173\u3002\"\"\"\n CAPACITIVE: int\n RESISTIVE: int\n\n def is_touched(self) -> bool:\n \"\"\"\u6aa2\u67e5\u5f15\u8173\u662f\u5426\u53d7\u89f8\u63a7\u3002\n\nExample: ``pin0.is_touched()``\n\nThe default touch mode for the pins on the edge connector is ``resistive``.\nThe default for the logo pin **V2** is ``capacitive``.\n\n**Resistive touch**\nThis test is done by measuring how much resistance there is between the\npin and ground. A low resistance gives a reading of ``True``. To get\na reliable reading using a finger you may need to touch the ground pin\nwith another part of your body, for example your other hand.\n\n**Capacitive touch**\nThis test is done by interacting with the electric field of a capacitor\nusing a finger as a conductor. `Capacitive touch\n`_\ndoes not require you to make a ground connection as part of a circuit.\n\n:return: ``True`` if the pin is being touched with a finger, otherwise return ``False``.\"\"\"\n ...\n\n def set_touch_mode(self, value: int) -> None:\n \"\"\"\u8a2d\u5b9a\u5f15\u8173\u7684\u89f8\u63a7\u6a21\u5f0f\u3002\n\nExample: ``pin0.set_touch_mode(pin0.CAPACITIVE)``\n\nThe default touch mode for the pins on the edge connector is\n``resistive``. The default for the logo pin **V2** is ``capacitive``.\n\n:param value: \u76f8\u95dc\u5f15\u8173\u7684 ``CAPACITIVE`` \u6216 ``RESISTIVE``\u3002\"\"\"\n ...\npin0: MicroBitTouchPin\n\"\"\"\u5177\u6709\u6578\u4f4d\u3001\u985e\u6bd4\u548c\u89f8\u63a7\u529f\u80fd\u7684\u5f15\u8173\u3002 (\u5f15\u8173 0)\"\"\"\npin1: MicroBitTouchPin\n\"\"\"\u5177\u6709\u6578\u4f4d\u3001\u985e\u6bd4\u548c\u89f8\u63a7\u529f\u80fd\u7684\u5f15\u8173\u3002 (\u5f15\u8173 1)\"\"\"\npin2: MicroBitTouchPin\n\"\"\"\u5177\u6709\u6578\u4f4d\u3001\u985e\u6bd4\u548c\u89f8\u63a7\u529f\u80fd\u7684\u5f15\u8173\u3002 (\u5f15\u8173 2)\"\"\"\npin3: MicroBitAnalogDigitalPin\n\"\"\"\u5177\u6709\u6578\u4f4d\u548c\u985e\u6bd4\u529f\u80fd\u7684\u5f15\u8173\u3002 (\u5f15\u8173 3)\"\"\"\npin4: MicroBitAnalogDigitalPin\n\"\"\"\u5177\u6709\u6578\u4f4d\u548c\u985e\u6bd4\u529f\u80fd\u7684\u5f15\u8173\u3002 (\u5f15\u8173 4)\"\"\"\npin5: MicroBitDigitalPin\n\"\"\"\u5177\u6709\u6578\u4f4d\u529f\u80fd\u7684\u5f15\u8173\u3002 (\u5f15\u8173 5)\"\"\"\npin6: MicroBitDigitalPin\n\"\"\"\u5177\u6709\u6578\u4f4d\u529f\u80fd\u7684\u5f15\u8173\u3002 (\u5f15\u8173 6)\"\"\"\npin7: MicroBitDigitalPin\n\"\"\"\u5177\u6709\u6578\u4f4d\u529f\u80fd\u7684\u5f15\u8173\u3002 (\u5f15\u8173 7)\"\"\"\npin8: MicroBitDigitalPin\n\"\"\"\u5177\u6709\u6578\u4f4d\u529f\u80fd\u7684\u5f15\u8173\u3002 (\u5f15\u8173 8)\"\"\"\npin9: MicroBitDigitalPin\n\"\"\"\u5177\u6709\u6578\u4f4d\u529f\u80fd\u7684\u5f15\u8173\u3002 (\u5f15\u8173 9)\"\"\"\npin10: MicroBitAnalogDigitalPin\n\"\"\"\u5177\u6709\u6578\u4f4d\u548c\u985e\u6bd4\u529f\u80fd\u7684\u5f15\u8173\u3002 (\u5f15\u8173 10)\"\"\"\npin11: MicroBitDigitalPin\n\"\"\"\u5177\u6709\u6578\u4f4d\u529f\u80fd\u7684\u5f15\u8173\u3002 (\u5f15\u8173 11)\"\"\"\npin12: MicroBitDigitalPin\n\"\"\"\u5177\u6709\u6578\u4f4d\u529f\u80fd\u7684\u5f15\u8173\u3002 (\u5f15\u8173 12)\"\"\"\npin13: MicroBitDigitalPin\n\"\"\"\u5177\u6709\u6578\u4f4d\u529f\u80fd\u7684\u5f15\u8173\u3002 (\u5f15\u8173 13)\"\"\"\npin14: MicroBitDigitalPin\n\"\"\"\u5177\u6709\u6578\u4f4d\u529f\u80fd\u7684\u5f15\u8173\u3002 (\u5f15\u8173 14)\"\"\"\npin15: MicroBitDigitalPin\n\"\"\"\u5177\u6709\u6578\u4f4d\u529f\u80fd\u7684\u5f15\u8173\u3002 (\u5f15\u8173 15)\"\"\"\npin16: MicroBitDigitalPin\n\"\"\"\u5177\u6709\u6578\u4f4d\u529f\u80fd\u7684\u5f15\u8173\u3002 (\u5f15\u8173 16)\"\"\"\npin19: MicroBitDigitalPin\n\"\"\"\u5177\u6709\u6578\u4f4d\u529f\u80fd\u7684\u5f15\u8173\u3002 (\u5f15\u8173 19)\"\"\"\npin20: MicroBitDigitalPin\n\"\"\"\u5177\u6709\u6578\u4f4d\u529f\u80fd\u7684\u5f15\u8173\u3002 (\u5f15\u8173 20)\"\"\"\npin_logo: MicroBitTouchPin\n\"\"\"micro:bit \u6b63\u9762\u7684\u89f8\u63a7\u611f\u61c9\u6a19\u8a8c\u5f15\u8173\uff0c\u9810\u8a2d\u70ba\u96fb\u5bb9\u5f0f\u89f8\u63a7\u6a21\u5f0f\u3002\"\"\"\npin_speaker: MicroBitAnalogDigitalPin\n\"\"\"\u7528\u65bc\u5b9a\u5740 micro:bit \u63da\u8072\u5668\u7684\u5f15\u8173\u3002\n\nThis API is intended only for use in Pulse-Width Modulation pin operations e.g. pin_speaker.write_analog(128).\n\"\"\"\n\nclass Image:\n \"\"\"\u8981\u5728 micro:bit LED \u986f\u793a\u5668\u4e0a\u986f\u793a\u7684\u5716\u50cf\u3002 (\u5716\u50cf)\n\nGiven an image object it's possible to display it via the ``display`` API::\n\n display.show(Image.HAPPY)\"\"\"\n HEART: Image\n \"\"\"\u611b\u5fc3\u5716\u50cf\u3002\"\"\"\n HEART_SMALL: Image\n \"\"\"\u5c0f\u611b\u5fc3\u5716\u50cf\u3002\"\"\"\n HAPPY: Image\n \"\"\"\u958b\u5fc3\u7684\u81c9\u5716\u50cf\u3002 (\u958b\u5fc3)\"\"\"\n SMILE: Image\n \"\"\"\u7b11\u81c9\u5716\u50cf\u3002 (\u5fae\u7b11)\"\"\"\n SAD: Image\n \"\"\"\u50b7\u5fc3\u7684\u81c9\u5716\u50cf\u3002\"\"\"\n CONFUSED: Image\n \"\"\"\u56f0\u60d1\u7684\u81c9\u5716\u50cf\u3002\"\"\"\n ANGRY: Image\n \"\"\"\u751f\u6c23\u7684\u81c9\u5716\u50cf\u3002\"\"\"\n ASLEEP: Image\n \"\"\"\u7761\u81c9\u5716\u50cf\u3002\"\"\"\n SURPRISED: Image\n \"\"\"\u9a5a\u8a1d\u7684\u81c9\u5716\u50cf\u3002\"\"\"\n SILLY: Image\n \"\"\"\u9b3c\u81c9\u5716\u50cf\u3002\"\"\"\n FABULOUS: Image\n \"\"\"\u6234\u592a\u967d\u773c\u93e1\u7684\u81c9\u5716\u50cf\u3002\"\"\"\n MEH: Image\n \"\"\"\u51b7\u6f20\u7684\u81c9\u5716\u50cf\u3002\"\"\"\n YES: Image\n \"\"\"\u52fe\u865f\u5716\u50cf\u3002\"\"\"\n NO: Image\n \"\"\"\u53c9\u865f\u5716\u50cf\u3002\"\"\"\n CLOCK12: Image\n \"\"\"\u6307\u91dd\u6307\u5411 12 \u9ede\u9418\u7684\u5716\u50cf\u3002\"\"\"\n CLOCK11: Image\n \"\"\"\u6307\u91dd\u6307\u5411 11 \u9ede\u9418\u7684\u5716\u50cf\u3002\"\"\"\n CLOCK10: Image\n \"\"\"\u6307\u91dd\u6307\u5411 10 \u9ede\u9418\u7684\u5716\u50cf\u3002\"\"\"\n CLOCK9: Image\n \"\"\"\u6307\u91dd\u6307\u5411 9 \u9ede\u9418\u7684\u5716\u50cf\u3002\"\"\"\n CLOCK8: Image\n \"\"\"\u6307\u91dd\u6307\u5411 8 \u9ede\u9418\u7684\u5716\u50cf\u3002\"\"\"\n CLOCK7: Image\n \"\"\"\u6307\u91dd\u6307\u5411 7 \u9ede\u9418\u7684\u5716\u50cf\u3002\"\"\"\n CLOCK6: Image\n \"\"\"\u6307\u91dd\u6307\u5411 6 \u9ede\u9418\u7684\u5716\u50cf\u3002\"\"\"\n CLOCK5: Image\n \"\"\"\u6307\u91dd\u6307\u5411 5 \u9ede\u9418\u7684\u5716\u50cf\u3002\"\"\"\n CLOCK4: Image\n \"\"\"\u6307\u91dd\u6307\u5411 4 \u9ede\u9418\u7684\u5716\u50cf\u3002\"\"\"\n CLOCK3: Image\n \"\"\"\u6307\u91dd\u6307\u5411 3 \u9ede\u9418\u7684\u5716\u50cf\u3002\"\"\"\n CLOCK2: Image\n \"\"\"\u6307\u91dd\u6307\u5411 2 \u9ede\u9418\u7684\u5716\u50cf\u3002\"\"\"\n CLOCK1: Image\n \"\"\"\u6307\u91dd\u6307\u5411 1 \u9ede\u9418\u7684\u5716\u50cf\u3002\"\"\"\n ARROW_N: Image\n \"\"\"\u6307\u5411\u5317\u65b9\u7bad\u982d\u7684\u5716\u50cf\u3002\"\"\"\n ARROW_NE: Image\n \"\"\"\u6307\u5411\u6771\u5317\u7bad\u982d\u7684\u5716\u50cf\u3002\"\"\"\n ARROW_E: Image\n \"\"\"\u6307\u5411\u6771\u65b9\u7bad\u982d\u7684\u5716\u50cf\u3002\"\"\"\n ARROW_SE: Image\n \"\"\"\u6307\u5411\u6771\u5357\u7bad\u982d\u7684\u5716\u50cf\u3002\"\"\"\n ARROW_S: Image\n \"\"\"\u6307\u5411\u5357\u65b9\u7bad\u982d\u7684\u5716\u50cf\u3002\"\"\"\n ARROW_SW: Image\n \"\"\"\u6307\u5411\u897f\u5357\u7bad\u982d\u7684\u5716\u50cf\u3002\"\"\"\n ARROW_W: Image\n \"\"\"\u6307\u5411\u897f\u65b9\u7bad\u982d\u7684\u5716\u50cf\u3002\"\"\"\n ARROW_NW: Image\n \"\"\"\u6307\u5411\u897f\u5317\u7bad\u982d\u7684\u5716\u50cf\u3002\"\"\"\n TRIANGLE: Image\n \"\"\"\u4e09\u89d2\u5f62\u671d\u4e0a\u7684\u5716\u50cf\u3002\"\"\"\n TRIANGLE_LEFT: Image\n \"\"\"\u4e09\u89d2\u5f62\u671d\u5de6\u7684\u5716\u50cf\u3002\"\"\"\n CHESSBOARD: Image\n \"\"\"\u4ee5\u68cb\u76e4\u5716\u6848\u4ea4\u932f\u767c\u4eae\u7684 LED \u71c8\u3002\"\"\"\n DIAMOND: Image\n \"\"\"\u947d\u77f3\u5716\u50cf\u3002\"\"\"\n DIAMOND_SMALL: Image\n \"\"\"\u5c0f\u947d\u77f3\u5716\u50cf\u3002\"\"\"\n SQUARE: Image\n \"\"\"\u6b63\u65b9\u5f62\u5716\u50cf\u3002\"\"\"\n SQUARE_SMALL: Image\n \"\"\"\u5c0f\u6b63\u65b9\u5f62\u5716\u50cf\u3002\"\"\"\n RABBIT: Image\n \"\"\"\u5154\u5b50\u5716\u50cf\u3002\"\"\"\n COW: Image\n \"\"\"\u4e73\u725b\u5716\u50cf\u3002\"\"\"\n MUSIC_CROTCHET: Image\n \"\"\"\u56db\u5206\u97f3\u7b26\u5716\u50cf\u3002\"\"\"\n MUSIC_QUAVER: Image\n \"\"\"\u516b\u5206\u97f3\u7b26\u5716\u50cf\u3002\"\"\"\n MUSIC_QUAVERS: Image\n \"\"\"\u4e00\u7d44\u516b\u5206\u97f3\u7b26\u5716\u50cf\u3002\"\"\"\n PITCHFORK: Image\n \"\"\"\u4e7e\u8349\u53c9\u5716\u50cf\u3002\"\"\"\n XMAS: Image\n \"\"\"\u8056\u8a95\u6a39\u5716\u50cf\u3002\"\"\"\n PACMAN: Image\n \"\"\"\u5c0f\u7cbe\u9748\u8857\u6a5f\u89d2\u8272\u5716\u50cf\u3002\"\"\"\n TARGET: Image\n \"\"\"\u9776\u5b50\u5716\u50cf\u3002\"\"\"\n TSHIRT: Image\n \"\"\"T \u6064\u5716\u50cf\u3002\"\"\"\n ROLLERSKATE: Image\n \"\"\"\u8f2a\u5f0f\u6e9c\u51b0\u978b\u5716\u50cf\u3002\"\"\"\n DUCK: Image\n \"\"\"\u9d28\u5b50\u5716\u50cf\u3002\"\"\"\n HOUSE: Image\n \"\"\"\u623f\u5b50\u5716\u50cf\u3002\"\"\"\n TORTOISE: Image\n \"\"\"\u9678\u9f9c\u5716\u50cf\u3002\"\"\"\n BUTTERFLY: Image\n \"\"\"\u8774\u8776\u5716\u50cf\u3002\"\"\"\n STICKFIGURE: Image\n \"\"\"\u7c21\u7b46\u756b\u5716\u50cf\u3002\"\"\"\n GHOST: Image\n \"\"\"\u5e7d\u9748\u5716\u50cf\u3002\"\"\"\n SWORD: Image\n \"\"\"\u528d\u5716\u50cf\u3002\"\"\"\n GIRAFFE: Image\n \"\"\"\u9577\u9838\u9e7f\u5716\u50cf\u3002\"\"\"\n SKULL: Image\n \"\"\"\u9ab7\u9acf\u982d\u5716\u50cf\"\"\"\n UMBRELLA: Image\n \"\"\"\u96e8\u5098\u5716\u50cf\u3002\"\"\"\n SNAKE: Image\n \"\"\"\u86c7\u5716\u50cf\u3002\"\"\"\n SCISSORS: Image\n \"\"\"Scissors image.\"\"\"\n ALL_CLOCKS: List[Image]\n \"\"\"\u6309\u9806\u5e8f\u5305\u542b\u6240\u6709 CLOCK_\u5716\u50cf\u7684\u5217\u8868\u3002\"\"\"\n ALL_ARROWS: List[Image]\n \"\"\"\u6309\u9806\u5e8f\u5305\u542b\u6240\u6709 ARROW_\u5716\u50cf\u7684\u5217\u8868\u3002\"\"\"\n\n @overload\n def __init__(self, string: str) -> None:\n \"\"\"\u5f9e\u63cf\u8ff0\u9ede\u4eae\u54ea\u4e9b LED \u7684\u5b57\u4e32\u5efa\u7acb\u5716\u50cf\u3002\n\n``string`` has to consist of digits 0-9 arranged into lines,\ndescribing the image, for example::\n\n image = Image(\"90009:\"\n \"09090:\"\n \"00900:\"\n \"09090:\"\n \"90009\")\n\nwill create a 5\u00d75 image of an X. The end of a line is indicated by a\ncolon. It's also possible to use newlines (\\\\n) insead of the colons.\n\n:param string: \u63cf\u8ff0\u5716\u50cf\u7684\u5b57\u4e32\u3002\"\"\"\n ...\n\n @overload\n def __init__(self, width: int=5, height: int=5, buffer: ReadableBuffer=None) -> None:\n \"\"\"\u5efa\u7acb\u4e00\u500b ``width`` \u884c ``height`` \u5217\u7684\u7a7a\u767d\u5716\u50cf\u3002\n\n:param width: \u53ef\u9078\u7684\u5716\u50cf\u5bec\u5ea6\n:param height: \u53ef\u9078\u7684\u5716\u50cf\u9ad8\u5ea6\n:param buffer: \u7528\u53ef\u9078\u9663\u5217\u6216\u5728 0-9 \u7bc4\u570d\u5167\u7684 ``width``\u00d7``height`` \u6574\u6578\u4f4d\u5143\u7d44\uff0c\u4f86\u521d\u59cb\u5316\u5716\u50cf\n\nExamples::\n\n Image(2, 2, b'\\x08\\x08\\x08\\x08')\n Image(2, 2, bytearray([9,9,9,9]))\n\nThese create 2 x 2 pixel images at full brightness.\"\"\"\n ...\n\n def width(self) -> int:\n \"\"\"\u53d6\u5f97\u884c\u6578\u3002\n\n:return: The number of columns in the image\"\"\"\n ...\n\n def height(self) -> int:\n \"\"\"\u53d6\u5f97\u5217\u6578\u3002\n\n:return: The number of rows in the image\"\"\"\n ...\n\n def set_pixel(self, x: int, y: int, value: int) -> None:\n \"\"\"\u8a2d\u5b9a\u50cf\u7d20\u7684\u4eae\u5ea6\u3002\n\nExample: ``my_image.set_pixel(0, 0, 9)``\n\n:param x: \u884c\u865f\n:param y: \u5217\u865f\n:param value: \u4eae\u5ea6\u70ba\u4ecb\u65bc 0 (\u6697) \u548c 9 (\u4eae) \u4e4b\u9593\u7684\u6574\u6578\n\nThis method will raise an exception when called on any of the built-in\nread-only images, like ``Image.HEART``.\"\"\"\n ...\n\n def get_pixel(self, x: int, y: int) -> int:\n \"\"\"\u53d6\u5f97\u50cf\u7d20\u7684\u4eae\u5ea6\u3002\n\nExample: ``my_image.get_pixel(0, 0)``\n\n:param x: \u884c\u865f\n:param y: \u5217\u865f\n:return: The brightness as an integer between 0 and 9.\"\"\"\n ...\n\n def shift_left(self, n: int) -> Image:\n \"\"\"\u5411\u5de6\u79fb\u52d5\u5716\u50cf\uff0c\u4ee5\u5efa\u7acb\u65b0\u5716\u50cf\u3002\n\nExample: ``Image.HEART_SMALL.shift_left(1)``\n\n:param n: \u8981\u79fb\u52d5\u7684\u884c\u6578\n:return: The shifted image\"\"\"\n ...\n\n def shift_right(self, n: int) -> Image:\n \"\"\"\u5411\u53f3\u79fb\u52d5\u5716\u50cf\uff0c\u4ee5\u5efa\u7acb\u65b0\u5716\u50cf\u3002\n\nExample: ``Image.HEART_SMALL.shift_right(1)``\n\n:param n: \u8981\u79fb\u52d5\u7684\u884c\u6578\n:return: The shifted image\"\"\"\n ...\n\n def shift_up(self, n: int) -> Image:\n \"\"\"\u5411\u4e0a\u79fb\u52d5\u5716\u50cf\uff0c\u4ee5\u5efa\u7acb\u65b0\u5716\u50cf\u3002\n\nExample: ``Image.HEART_SMALL.shift_up(1)``\n\n:param n: \u8981\u79fb\u52d5\u7684\u5217\u6578\n:return: The shifted image\"\"\"\n ...\n\n def shift_down(self, n: int) -> Image:\n \"\"\"\u900f\u904e\u5411\u4e0b\u79fb\u52d5\u5716\u50cf\uff0c\u4ee5\u5efa\u7acb\u4e00\u500b\u65b0\u5716\u50cf\u3002\n\nExample: ``Image.HEART_SMALL.shift_down(1)``\n\n:param n: \u8981\u79fb\u52d5\u7684\u5217\u6578\n:return: The shifted image\"\"\"\n ...\n\n def crop(self, x: int, y: int, w: int, h: int) -> Image:\n \"\"\"\u900f\u904e\u88c1\u526a\u5716\u50cf\uff0c\u4ee5\u5efa\u7acb\u4e00\u500b\u65b0\u5716\u50cf\u3002\n\nExample: ``Image.HEART.crop(1, 1, 3, 3)``\n\n:param x: \u88c1\u526a\u4f4d\u79fb\u884c\n:param y: \u88c1\u526a\u4f4d\u79fb\u5217\n:param w: \u526a\u88c1\u5bec\u5ea6\n:param h: \u526a\u88c1\u9ad8\u5ea6\n:return: The new image\"\"\"\n ...\n\n def copy(self) -> Image:\n \"\"\"\u5efa\u7acb\u5716\u50cf\u7684\u7cbe\u78ba\u526f\u672c\u3002\n\nExample: ``Image.HEART.copy()``\n\n:return: The new image\"\"\"\n ...\n\n def invert(self) -> Image:\n \"\"\"\u900f\u904e\u53cd\u8f49\u4f86\u6e90\u5716\u50cf\u7684\u50cf\u7d20\u4eae\u5ea6\uff0c\u4ee5\u5efa\u7acb\u4e00\u500b\u65b0\u5716\u50cf\u3002\n\nExample: ``Image.SMALL_HEART.invert()``\n\n:return: The new image.\"\"\"\n ...\n\n def fill(self, value: int) -> None:\n \"\"\"\u8a2d\u5b9a\u5716\u50cf\u4e2d\u6240\u6709\u50cf\u7d20\u7684\u4eae\u5ea6\u3002\n\nExample: ``my_image.fill(5)``\n\n:param value: \u65b0\u4eae\u5ea6\u70ba 0 (\u6697) \u548c 9 (\u4eae) \u4e4b\u9593\u7684\u6578\u5b57\u3002\n\nThis method will raise an exception when called on any of the built-in\nread-only images, like ``Image.HEART``.\"\"\"\n ...\n\n def blit(self, src: Image, x: int, y: int, w: int, h: int, xdest: int=0, ydest: int=0) -> None:\n \"\"\"\u5c07\u53e6\u4e00\u500b\u5716\u50cf\u4e2d\u7684\u4e00\u500b\u5340\u57df\u8907\u88fd\u5230\u8a72\u5716\u50cf\u4e2d\u3002\n\nExample: ``my_image.blit(Image.HEART, 1, 1, 3, 3, 1, 1)``\n\n:param src: \u4f86\u6e90\u5716\u50cf\n:param x: \u4f86\u6e90\u5716\u50cf\u4e2d\u7684\u8d77\u59cb\u884c\u4f4d\u79fb\n:param y: \u4f86\u6e90\u5716\u50cf\u4e2d\u7684\u8d77\u59cb\u5217\u4f4d\u79fb\n:param w: \u8981\u8907\u88fd\u7684\u884c\u6578\n:param h: \u8981\u8907\u88fd\u7684\u5217\u6578\n:param xdest: \u6b64\u5716\u50cf\u4e2d\u8981\u4fee\u6539\u7684\u884c\u4f4d\u79fb\n:param ydest: \u6b64\u5716\u50cf\u4e2d\u8981\u4fee\u6539\u7684\u5217\u4f4d\u79fb\n\nPixels outside the source image are treated as having a brightness of 0.\n\n``shift_left()``, ``shift_right()``, ``shift_up()``, ``shift_down()``\nand ``crop()`` can are all implemented by using ``blit()``.\n\nFor example, img.crop(x, y, w, h) can be implemented as::\n\n def crop(self, x, y, w, h):\n res = Image(w, h)\n res.blit(self, x, y, w, h)\n return res\"\"\"\n ...\n\n def __repr__(self) -> str:\n \"\"\"\u53d6\u5f97\u5716\u50cf\u7684\u7dca\u6e4a\u5b57\u4e32\u986f\u793a\u3002\"\"\"\n ...\n\n def __str__(self) -> str:\n \"\"\"\u53d6\u5f97\u5716\u50cf\u7684\u53ef\u8b80\u5b57\u4e32\u986f\u793a\u3002\"\"\"\n ...\n\n def __add__(self, other: Image) -> Image:\n \"\"\"\u900f\u904e\u5c07\u5169\u500b\u5716\u50cf\u7684\u50cf\u7d20\u4eae\u5ea6\u503c\u76f8\u52a0\uff0c\u4ee5\u5efa\u7acb\u4e00\u500b\u65b0\u5716\u50cf\u3002\n\nExample: ``Image.HEART + Image.HAPPY``\n\n:param other: \u8981\u65b0\u589e\u7684\u5716\u50cf\u3002\"\"\"\n ...\n\n def __sub__(self, other: Image) -> Image:\n \"\"\"\u900f\u904e\u5f9e\u8a72\u5716\u50cf\u4e2d\u6e1b\u53bb\u53e6\u4e00\u500b\u5716\u50cf\u7684\u4eae\u5ea6\u503c\uff0c\u4ee5\u5efa\u7acb\u4e00\u500b\u65b0\u5716\u50cf\u3002\n\nExample: ``Image.HEART - Image.HEART_SMALL``\n\n:param other: \u8981\u6e1b\u53bb\u7684\u5716\u50cf\u3002\"\"\"\n ...\n\n def __mul__(self, n: float) -> Image:\n \"\"\"\u5c07\u5404\u50cf\u7d20\u7684\u4eae\u5ea6\u4e58\u4ee5 ``n``\uff0c\u4ee5\u5efa\u7acb\u65b0\u5716\u50cf\u3002\n\nExample: ``Image.HEART * 0.5``\n\n:param n: \u8981\u4e58\u4ee5\u7684\u503c\u3002\"\"\"\n ...\n\n def __truediv__(self, n: float) -> Image:\n \"\"\"\u900f\u904e\u5c07\u5404\u50cf\u7d20\u7684\u4eae\u5ea6\u9664\u4ee5 ``n``\uff0c\u4ee5\u5efa\u7acb\u4e00\u500b\u65b0\u5716\u50cf\u3002\n\nExample: ``Image.HEART / 2``\n\n:param n: \u8981\u9664\u4ee5\u7684\u503c\u3002\"\"\"\n ...\n\nclass SoundEvent:\n LOUD: SoundEvent\n \"\"\"\u8868\u793a\u8072\u97f3\u4e8b\u4ef6\u7684\u8f49\u63db\uff0c\u5f9e ``quiet`` \u5230 ``loud``\uff0c\u5982\u9f13\u638c\u6216\u558a\u53eb\u3002\"\"\"\n QUIET: SoundEvent\n \"\"\"\u8868\u793a\u8072\u97f3\u4e8b\u4ef6\u7684\u8f49\u63db\uff0c\u5f9e ``loud`` \u5230 ``quiet``\u3002\u4f8b\u5982\uff0c\u8aaa\u8a71\u6216\u80cc\u666f\u97f3\u6a02\u3002\"\"\"\n\nclass Sound:\n \"\"\"\u53ef\u4ee5\u4f7f\u7528 ``audio.play(Sound.NAME)`` \u8abf\u7528\u5167\u5efa\u8072\u97f3\u3002\"\"\"\n GIGGLE: Sound\n \"\"\"\u54af\u54af\u7b11\u7684\u8072\u97f3\u3002 (\u54af\u54af\u7b11)\"\"\"\n HAPPY: Sound\n \"\"\"\u958b\u5fc3\u7684\u8072\u97f3\u3002 (\u958b\u5fc3)\"\"\"\n HELLO: Sound\n \"\"\"\u6b61\u8fce\u7684\u8072\u97f3\u3002 (\u54c8\u56c9)\"\"\"\n MYSTERIOUS: Sound\n \"\"\"\u795e\u7955\u7684\u8072\u97f3\u3002 (\u795e\u79d8)\"\"\"\n SAD: Sound\n \"\"\"\u96e3\u904e\u7684\u8072\u97f3\u3002 (\u96e3\u904e)\"\"\"\n SLIDE: Sound\n \"\"\"\u6ed1\u52d5\u7684\u8072\u97f3\u3002\"\"\"\n SOARING: Sound\n \"\"\"\u9ad8\u6602\u7684\u8072\u97f3\u3002 (\u9ad8\u6602)\"\"\"\n SPRING: Sound\n \"\"\"\u5f48\u8df3\u7684\u8072\u97f3\u3002 (\u5f48\u8df3)\"\"\"\n TWINKLE: Sound\n \"\"\"\u767c\u4eae\u7684\u8072\u97f3\u3002 (\u767c\u4eae)\"\"\"\n YAWN: Sound\n \"\"\"\u5475\u6b20\u7684\u8072\u97f3\u3002\"\"\"", "/typeshed/stdlib/microbit/accelerometer.pyi": "\"\"\"\u6e2c\u91cf micro:bit \u7684\u52a0\u901f\u5ea6\u4e26\u8b58\u5225\u624b\u52e2\u3002\"\"\"\nfrom typing import Tuple\n\ndef get_x() -> int:\n \"\"\"\u53d6\u5f97 ``x`` \u8ef8\u4e0a\u7684\u52a0\u901f\u5ea6\u6e2c\u91cf\u503c (\u4ee5\u6beb\u514b\u70ba\u55ae\u4f4d)\u3002\n\nExample: ``accelerometer.get_x()``\n\n:return: A positive or negative integer depending on direction in the range +/- 2000mg.\"\"\"\n ...\n\ndef get_y() -> int:\n \"\"\"\u53d6\u5f97 ``y`` \u8ef8\u4e0a\u7684\u52a0\u901f\u5ea6\u6e2c\u91cf\u503c (\u4ee5\u6beb\u514b\u70ba\u55ae\u4f4d)\u3002\n\nExample: ``accelerometer.get_y()``\n\n:return: A positive or negative integer depending on direction in the range +/- 2000mg.\"\"\"\n ...\n\ndef get_z() -> int:\n \"\"\"\u53d6\u5f97 ``z`` \u8ef8\u4e0a\u7684\u52a0\u901f\u5ea6\u6e2c\u91cf\u503c (\u4ee5\u6beb\u514b\u70ba\u55ae\u4f4d)\u3002\n\nExample: ``accelerometer.get_z()``\n\n:return: A positive or negative integer depending on direction in the range +/- 2000mg.\"\"\"\n ...\n\ndef get_values() -> Tuple[int, int, int]:\n \"\"\"\u4e00\u6b21\u53d6\u5f97\u6240\u6709\u8ef8\u4e0a\u7684\u52a0\u901f\u5ea6\u6e2c\u91cf\u503c\u505a\u70ba\u5143\u7d44\u3002\n\nExample: ``x, y, z = accelerometer.get_values()``\n\n:return: a three-element tuple of integers ordered as X, Y, Z, each value a positive or negative integer depending on direction in the range +/- 2000mg\"\"\"\n ...\n\ndef get_strength() -> int:\n \"\"\"Get the acceleration measurement of all axes combined, as a positive integer. This is the Pythagorean sum of the X, Y and Z axes.\n\nExample: ``accelerometer.get_strength()``\n\n:return: The combined acceleration strength of all the axes, in milli-g.\"\"\"\n ...\n\ndef current_gesture() -> str:\n \"\"\"\u53d6\u5f97\u76ee\u524d\u624b\u52e2\u7684\u540d\u7a31\u3002\n\nExample: ``accelerometer.current_gesture()``\n\nMicroPython understands the following gesture names: ``\"up\"``, ``\"down\"``,\n``\"left\"``, ``\"right\"``, ``\"face up\"``, ``\"face down\"``, ``\"freefall\"``,\n``\"3g\"``, ``\"6g\"``, ``\"8g\"``, ``\"shake\"``. Gestures are always\nrepresented as strings.\n\n:return: The current gesture\"\"\"\n ...\n\ndef is_gesture(name: str) -> bool:\n \"\"\"\u6aa2\u67e5\u547d\u540d\u7684\u624b\u52e2\u76ee\u524d\u662f\u5426\u8655\u65bc\u6d3b\u52d5\u72c0\u614b\u3002\n\nExample: ``accelerometer.is_gesture('shake')``\n\nMicroPython understands the following gesture names: ``\"up\"``, ``\"down\"``,\n``\"left\"``, ``\"right\"``, ``\"face up\"``, ``\"face down\"``, ``\"freefall\"``,\n``\"3g\"``, ``\"6g\"``, ``\"8g\"``, ``\"shake\"``. Gestures are always\nrepresented as strings.\n\n:param name: \u624b\u52e2\u540d\u7a31\u3002\n:return: ``True`` if the gesture is active, ``False`` otherwise.\"\"\"\n ...\n\ndef was_gesture(name: str) -> bool:\n \"\"\"\u6aa2\u67e5\u547d\u540d\u624b\u52e2\u81ea\u4e0a\u6b21\u547c\u53eb\u5f8c\u662f\u5426\u8655\u65bc\u6d3b\u52d5\u72c0\u614b\u3002\n\nExample: ``accelerometer.was_gesture('shake')``\n\nMicroPython understands the following gesture names: ``\"up\"``, ``\"down\"``,\n``\"left\"``, ``\"right\"``, ``\"face up\"``, ``\"face down\"``, ``\"freefall\"``,\n``\"3g\"``, ``\"6g\"``, ``\"8g\"``, ``\"shake\"``. Gestures are always\nrepresented as strings.\n\n:param name: \u624b\u52e2\u540d\u7a31\u3002\n:return: ``True`` if the gesture was active since the last call, ``False`` otherwise.\"\"\"\n\ndef get_gestures() -> Tuple[str, ...]:\n \"\"\"\u50b3\u56de\u624b\u52e2\u6b77\u53f2\u7d00\u9304\u7684\u5143\u7d44\u3002\n\nExample: ``accelerometer.get_gestures()``\n\nClears the gesture history before returning.\n\nGestures are not updated in the background so there needs to be constant\ncalls to some accelerometer method to do the gesture detection. Usually\ngestures can be detected using a loop with a small :func:`microbit.sleep` delay.\n\n:return: The history as a tuple, most recent last.\"\"\"\n ...\n\ndef set_range(value: int) -> None:\n \"\"\"Set the accelerometer sensitivity range, in g (standard gravity), to the closest values supported by the hardware, so it rounds to either ``2``, ``4``, or ``8`` g.\n\nExample: ``accelerometer.set_range(8)``\n\n:param value: New range for the accelerometer, an integer in ``g``.\"\"\"", "/typeshed/stdlib/microbit/audio.pyi": "\"\"\"\u4f7f\u7528 micro:bit \u64ad\u653e\u8072\u97f3 (\u532f\u5165 ``audio`` \u8207 V1 \u76f8\u5bb9)\u3002\"\"\"\nfrom ..microbit import MicroBitDigitalPin, Sound, pin0\nfrom typing import ClassVar, Iterable, Union\n\ndef play(source: Union[Iterable[AudioFrame], Sound, SoundEffect], wait: bool=True, pin: MicroBitDigitalPin=pin0, return_pin: Union[MicroBitDigitalPin, None]=None) -> None:\n \"\"\"Play a built-in sound, sound effect or custom audio frames.\n\nExample: ``audio.play(Sound.GIGGLE)``\n\n:param source: A built-in ``Sound`` such as ``Sound.GIGGLE``, a ``SoundEffect`` or sample data as an iterable of ``AudioFrame`` objects.\n:param wait: \u5982\u679c ``wait`` \u70ba ``True``\uff0c\u6b64\u51fd\u5f0f\u5c07\u6703\u5c01\u9396\uff0c\u76f4\u5230\u8072\u97f3\u5b8c\u6210\u3002\n:param pin: (\u5f15\u8173) \u6307\u5b9a\u8f38\u51fa\u5f15\u8173\u7684\u53ef\u9078\u5f15\u6578\uff0c\u53ef\u7528\u65bc\u8986\u5beb\u9810\u8a2d\u503c ``pin0``\u3002\u5982\u679c\u6211\u5011\u4e0d\u60f3\u64ad\u653e\u4efb\u4f55\u8072\u97f3\uff0c\u6211\u5011\u53ef\u4ee5\u4f7f\u7528 ``pin=None``\u3002\n:param return_pin: \u6307\u5b9a\u5dee\u5206\u908a\u7de3\u9023\u63a5\u5668\u5f15\u8173\uff0c\u4ee5\u9023\u63a5\u5230\u5916\u90e8\u63da\u8072\u5668\u800c\u4e0d\u662f\u63a5\u5730\u3002\u5728 **V2** \u4fee\u8a02\u7248\u4e2d\uff0c\u9019\u5c07\u6703\u88ab\u5ffd\u7565\u3002\"\"\"\n\ndef is_playing() -> bool:\n \"\"\"\u6aa2\u67e5\u662f\u5426\u6b63\u5728\u64ad\u653e\u8072\u97f3\u3002\n\nExample: ``audio.is_playing()``\n\n:return: ``True`` if audio is playing, otherwise ``False``.\"\"\"\n ...\n\ndef stop() -> None:\n \"\"\"\u505c\u6b62\u6240\u6709\u97f3\u8a0a\u64ad\u653e\u3002\n\nExample: ``audio.stop()``\"\"\"\n ...\n\nclass SoundEffect:\n \"\"\"A sound effect, composed by a set of parameters configured via the constructor or attributes.\"\"\"\n WAVEFORM_SINE: ClassVar[int]\n \"\"\"Sine wave option used for the ``waveform`` parameter.\"\"\"\n WAVEFORM_SAWTOOTH: ClassVar[int]\n \"\"\"Sawtooth wave option used for the ``waveform`` parameter.\"\"\"\n WAVEFORM_TRIANGLE: ClassVar[int]\n \"\"\"Triangle wave option used for the ``waveform`` parameter.\"\"\"\n WAVEFORM_SQUARE: ClassVar[int]\n \"\"\"Square wave option used for the ``waveform`` parameter.\"\"\"\n WAVEFORM_NOISE: ClassVar[int]\n \"\"\"Noise option used for the ``waveform`` parameter.\"\"\"\n SHAPE_LINEAR: ClassVar[int]\n \"\"\"Linear interpolation option used for the ``shape`` parameter.\"\"\"\n SHAPE_CURVE: ClassVar[int]\n \"\"\"Curve interpolation option used for the ``shape`` parameter.\"\"\"\n SHAPE_LOG: ClassVar[int]\n \"\"\"Logarithmic interpolation option used for the ``shape`` parameter.\"\"\"\n FX_NONE: ClassVar[int]\n \"\"\"No effect option used for the ``fx`` parameter.\"\"\"\n FX_TREMOLO: ClassVar[int]\n \"\"\"Tremelo effect option used for the ``fx`` parameter.\"\"\"\n FX_VIBRATO: ClassVar[int]\n \"\"\"Vibrato effect option used for the ``fx`` parameter.\"\"\"\n FX_WARBLE: ClassVar[int]\n \"\"\"Warble effect option used for the ``fx`` parameter.\"\"\"\n freq_start: int\n \"\"\"Start frequency in Hertz (Hz), a number between ``0`` and ``9999``\"\"\"\n freq_end: int\n \"\"\"End frequency in Hertz (Hz), a number between ``0`` and ``9999``\"\"\"\n duration: int\n \"\"\"Duration of the sound in milliseconds, a number between ``0`` and ``9999``\"\"\"\n vol_start: int\n \"\"\"Start volume value, a number between ``0`` and ``255``\"\"\"\n vol_end: int\n \"\"\"End volume value, a number between ``0`` and ``255``\"\"\"\n waveform: int\n \"\"\"Type of waveform shape, one of these values: ``WAVEFORM_SINE``, ``WAVEFORM_SAWTOOTH``, ``WAVEFORM_TRIANGLE``, ``WAVEFORM_SQUARE``, ``WAVEFORM_NOISE`` (randomly generated noise)\"\"\"\n fx: int\n \"\"\"Effect to add on the sound, one of the following values: ``FX_TREMOLO``, ``FX_VIBRATO``, ``FX_WARBLE``, or ``FX_NONE``\"\"\"\n shape: int\n \"\"\"The type of the interpolation curve between the start and end frequencies, different wave shapes have different rates of change in frequency. One of the following values: ``SHAPE_LINEAR``, ``SHAPE_CURVE``, ``SHAPE_LOG``\"\"\"\n\n def __init__(self, freq_start: int=500, freq_end: int=2500, duration: int=500, vol_start: int=255, vol_end: int=0, waveform: int=WAVEFORM_SQUARE, fx: int=FX_NONE, shape: int=SHAPE_LOG):\n \"\"\"Create a new sound effect.\n\nExample: ``my_effect = SoundEffect(duration=1000)``\n\nAll the parameters are optional, with default values as shown above, and\nthey can all be modified via attributes of the same name. For example, we\ncan first create an effect ``my_effect = SoundEffect(duration=1000)``,\nand then change its attributes ``my_effect.duration = 500``.\n\n:param freq_start: Start frequency in Hertz (Hz), a number between ``0`` and ``9999``.\n:param freq_end: End frequency in Hertz (Hz), a number between ``0`` and ``9999``.\n:param duration: Duration of the sound in milliseconds, a number between ``0`` and ``9999``.\n:param vol_start: Start volume value, a number between ``0`` and ``255``.\n:param vol_end: End volume value, a number between ``0`` and ``255``.\n:param waveform: Type of waveform shape, one of these values: ``WAVEFORM_SINE``, ``WAVEFORM_SAWTOOTH``, ``WAVEFORM_TRIANGLE``, ``WAVEFORM_SQUARE``, ``WAVEFORM_NOISE`` (randomly generated noise).\n:param fx: Effect to add on the sound, one of the following values: ``FX_TREMOLO``, ``FX_VIBRATO``, ``FX_WARBLE``, or ``FX_NONE``.\n:param shape: The type of the interpolation curve between the start and end frequencies, different wave shapes have different rates of change in frequency. One of the following values: ``SHAPE_LINEAR``, ``SHAPE_CURVE``, ``SHAPE_LOG``.\"\"\"\n\n def copy(self) -> SoundEffect:\n \"\"\"Create a copy of this ``SoundEffect``.\n\nExample: ``sound_2 = sound_1.copy()``\n\n:return: A copy of the SoundEffect.\"\"\"\n\nclass AudioFrame:\n \"\"\"``AudioFrame`` \u7269\u4ef6\u662f 32 \u500b\u6a23\u672c\u7684\u5217\u8868\uff0c\u6bcf\u500b\u6a23\u672c\u90fd\u662f\u4e00\u500b\u7121\u7b26\u865f\u4f4d\u5143\u7d44 (0 \u5230 255 \u4e4b\u9593\u7684\u6574\u6578)\u3002\n\nIt takes just over 4 ms to play a single frame.\n\nExample::\n\n frame = AudioFrame()\n for i in range(len(frame)):\n frame[i] = 252 - i * 8\"\"\"\n\n def copyfrom(self, other: AudioFrame) -> None:\n \"\"\"Overwrite the data in this ``AudioFrame`` with the data from another ``AudioFrame`` instance.\n\nExample: ``my_frame.copyfrom(source_frame)``\n\n:param other: ``AudioFrame`` instance from which to copy the data.\"\"\"\n\n def __len__(self) -> int:\n ...\n\n def __setitem__(self, key: int, value: int) -> None:\n ...\n\n def __getitem__(self, key: int) -> int:\n ...", @@ -46,6 +45,7 @@ "/typeshed/stdlib/microbit/speaker.pyi": "\"\"\"\u63a7\u5236\u5167\u5efa\u63da\u8072\u5668 (\u50c5\u9650 V2)\u3002\"\"\"\n\ndef off() -> None:\n \"\"\"\u95dc\u9589\u63da\u8072\u5668\u3002\n\nExample: ``speaker.off()``\n\nThis does not disable sound output to an edge connector pin.\"\"\"\n ...\n\ndef on() -> None:\n \"\"\"\u958b\u555f\u63da\u8072\u5668\u3002\n\nExample: ``speaker.on()``\"\"\"\n ...", "/typeshed/stdlib/microbit/spi.pyi": "\"\"\"\u4f7f\u7528\u5468\u908a\u8a2d\u5099\u4ecb\u9762 (SPI) \u532f\u6d41\u6392\u8207\u88dd\u7f6e\u9032\u884c\u901a\u8a0a\u3002\"\"\"\nfrom _typeshed import ReadableBuffer, WriteableBuffer\nfrom ..microbit import pin13, pin14, pin15, MicroBitDigitalPin\n\ndef init(baudrate: int=1000000, bits: int=8, mode: int=0, sclk: MicroBitDigitalPin=pin13, mosi: MicroBitDigitalPin=pin15, miso: MicroBitDigitalPin=pin14) -> None:\n \"\"\"\u521d\u59cb\u5316 SPI \u901a\u8a0a\u3002\n\nExample: ``spi.init()``\n\nFor correct communication, the parameters have to be the same on both communicating devices.\n\n:param baudrate: \u901a\u8a0a\u901f\u5ea6\u3002\n:param bits: \u6bcf\u6b21\u50b3\u8f38\u7684\u4f4d\u5143\u5bec\u5ea6\u3002\u76ee\u524d\u50c5\u652f\u63f4 ``bits=8``\u3002\u7136\u800c\uff0c\u9019\u7a2e\u60c5\u6cc1\u5728\u672a\u4f86\u53ef\u80fd\u6703\u6539\u8b8a\u3002\n:param mode: \u78ba\u5b9a\u6642\u8108\u6975\u6027\u548c\u76f8\u4f4d\u7684\u7d44\u5408 - \u8acb\u898b\u7dda\u4e0a\u8868\u683c `_\u3002\n:param sclk: sclk \u5f15\u8173 (\u9810\u8a2d 13)\n:param mosi: mosi \u5f15\u8173 (\u9810\u8a2d 15)\n:param miso: miso \u5f15\u8173 (\u9810\u8a2d 14)\"\"\"\n ...\n\ndef read(nbytes: int) -> bytes:\n \"\"\"\u8b80\u53d6\u4f4d\u5143\u7d44\u3002\n\nExample: ``spi.read(64)``\n\n:param nbytes: \u8981\u8b80\u53d6\u7684\u6700\u5927\u4f4d\u5143\u7d44\u6578\u3002\n:return: The bytes read.\"\"\"\n ...\n\ndef write(buffer: ReadableBuffer) -> None:\n \"\"\"\u5c07\u4f4d\u5143\u7d44\u5beb\u5165\u532f\u6d41\u6392\u3002\n\nExample: ``spi.write(bytes([1, 2, 3]))``\n\n:param buffer: \u8b80\u53d6\u8cc7\u6599\u7684\u4f86\u6e90\u7de9\u885d\u5340\u3002\"\"\"\n ...\n\ndef write_readinto(out: WriteableBuffer, in_: ReadableBuffer) -> None:\n \"\"\"\u5c07 ``out`` \u7de9\u885d\u5340\u5beb\u5165\u532f\u6d41\u6392\uff0c\u4e26\u5c07\u4efb\u4f55\u56de\u61c9\u5beb\u5165 ``in_`` \u7de9\u885d\u5340\u3002\n\nExample: ``spi.write_readinto(out_buffer, in_buffer)``\n\nThe length of the buffers should be the same. The buffers can be the same object.\n\n:param out: \u8981\u5beb\u5165\u4efb\u4f55\u56de\u61c9\u7684\u7de9\u885d\u5340\u3002\n:param in_: \u8981\u5f9e\u4e2d\u8b80\u53d6\u8cc7\u6599\u7684\u7de9\u885d\u5340\u3002\"\"\"\n ...", "/typeshed/stdlib/microbit/uart.pyi": "\"\"\"\u4f7f\u7528\u5e8f\u5217\u4ecb\u9762\u8207\u88dd\u7f6e\u901a\u8a0a\u3002\"\"\"\nfrom _typeshed import WriteableBuffer\nfrom ..microbit import MicroBitDigitalPin\nfrom typing import Optional, Union\nODD: int\n\"\"\"\u5947\u6578\u540c\u4f4d\u6aa2\u67e5\"\"\"\nEVEN: int\n\"\"\"\u5076\u6578\u540c\u4f4d\u6aa2\u67e5\"\"\"\n\ndef init(baudrate: int=9600, bits: int=8, parity: Optional[int]=None, stop: int=1, tx: Optional[MicroBitDigitalPin]=None, rx: Optional[MicroBitDigitalPin]=None) -> None:\n \"\"\"\u521d\u59cb\u5316\u5e8f\u5217\u901a\u8a0a\u3002\n\nExample: ``uart.init(115200, tx=pin0, rx=pin1)``\n\n:param baudrate: \u901a\u8a0a\u901f\u5ea6\u3002\n:param bits: \u6b63\u5728\u50b3\u8f38\u7684\u4f4d\u5143\u7d44\u5927\u5c0f\uff0cmicro:bit \u53ea\u652f\u63f4 8\u3002\n:param parity: \u5982\u4f55\u6aa2\u67e5\u5947\u5076\u6027\uff0c``None``\u3001``uart.ODD`` \u6216 ``uart.EVEN``\u3002\n:param stop: \u505c\u6b62\u4f4d\u5143\u7684\u6578\u91cf\uff0cmicro:bit \u5fc5\u9808\u70ba 1\u3002\n:param tx: \u50b3\u8f38\u5f15\u8173\u3002\n:param rx: \u6b63\u5728\u63a5\u6536\u5f15\u8173\u3002\n\nInitializing the UART on external pins will cause the Python console on\nUSB to become unaccessible, as it uses the same hardware. To bring the\nconsole back you must reinitialize the UART without passing anything for\n``tx`` or ``rx`` (or passing ``None`` to these arguments). This means\nthat calling ``uart.init(115200)`` is enough to restore the Python console.\n\nFor more details see `the online documentation `_.\"\"\"\n ...\n\ndef any() -> bool:\n \"\"\"\u6aa2\u67e5\u662f\u5426\u6709\u4efb\u4f55\u8cc7\u6599\u6b63\u5728\u7b49\u5f85\u3002\n\nExample: ``uart.any()``\n\n:return: ``True`` if any data is waiting, else ``False``.\"\"\"\n ...\n\ndef read(nbytes: Optional[int]=None) -> Optional[bytes]:\n \"\"\"\u8b80\u53d6\u4f4d\u5143\u7d44\u3002\n\nExample: ``uart.read()``\n\n:param nbytes: \u5982\u679c\u6307\u5b9a\u4e86 ``nbytes``\uff0c\u5247\u6700\u591a\u8b80\u53d6\u90a3\u9ebc\u591a\u4f4d\u5143\u7d44\uff0c\u5426\u5247\u8b80\u53d6\u76e1\u53ef\u80fd\u591a\u7684\u4f4d\u5143\u7d44\n:return: A bytes object or ``None`` on timeout\"\"\"\n ...\n\ndef readinto(buf: WriteableBuffer, nbytes: Optional[int]=None) -> Optional[int]:\n \"\"\"\u5c07\u4f4d\u5143\u7d44\u8b80\u5165 ``buf``\u3002\n\nExample: ``uart.readinto(input_buffer)``\n\n:param buf: \u8981\u5beb\u5165\u7684\u7de9\u885d\u5340\u3002\n:param nbytes: \u5982\u679c\u6307\u5b9a\u4e86 ``nbytes``\uff0c\u5247\u6700\u591a\u8b80\u53d6\u90a3\u9ebc\u591a\u4f4d\u5143\u7d44\uff0c\u5426\u5247\u8b80\u53d6 ``len(buf)`` \u500b\u4f4d\u5143\u7d44\u3002\n:return: number of bytes read and stored into ``buf`` or ``None`` on timeout.\"\"\"\n ...\n\ndef readline() -> Optional[bytes]:\n \"\"\"\u8b80\u53d6\u4e00\u884c\uff0c\u4ee5\u65b0\u884c\u5b57\u5143\u7d50\u5c3e\u3002\n\nExample: ``uart.readline()``\n\n:return: The line read or ``None`` on timeout. The newline character is included in the returned bytes.\"\"\"\n ...\n\ndef write(buf: Union[bytes, str]) -> Optional[int]:\n \"\"\"\u5c07\u7de9\u885d\u5340\u5beb\u5165\u532f\u6d41\u6392\u3002\n\nExample: ``uart.write('hello world')``\n\n:param buf: \u4e00\u500b\u4f4d\u5143\u7d44\u7269\u4ef6\u6216\u4e00\u500b\u5b57\u4e32\u3002\n:return: The number of bytes written, or ``None`` on timeout.\n\nExamples::\n\n uart.write('hello world')\n uart.write(b'hello world')\n uart.write(bytes([1, 2, 3]))\"\"\"\n ...", + "/typeshed/stdlib/collections/__init__.pyi": "import sys\nfrom typing import (\n Any,\n Dict,\n Generic,\n ItemsView,\n Iterable,\n Iterator,\n KeysView,\n Optional,\n Reversible,\n Tuple,\n Type,\n TypeVar,\n Union,\n ValuesView,\n)\n\n_S = TypeVar(\"_S\")\n_T = TypeVar(\"_T\")\n_KT = TypeVar(\"_KT\")\n_VT = TypeVar(\"_VT\")\n\nif sys.version_info >= (3, 7):\n def namedtuple(\n typename: str,\n field_names: Union[str, Iterable[str]],\n *,\n rename: bool = ...,\n module: Optional[str] = ...,\n defaults: Optional[Iterable[Any]] = ...,\n ) -> Type[Tuple[Any, ...]]: ...\n\nelse:\n def namedtuple(\n typename: str,\n field_names: Union[str, Iterable[str]],\n *,\n verbose: bool = ...,\n rename: bool = ...,\n module: Optional[str] = ...,\n ) -> Type[Tuple[Any, ...]]: ...\n\nclass _OrderedDictKeysView(KeysView[_KT], Reversible[_KT]):\n def __reversed__(self) -> Iterator[_KT]: ...\n\nclass _OrderedDictItemsView(ItemsView[_KT, _VT], Reversible[Tuple[_KT, _VT]]):\n def __reversed__(self) -> Iterator[Tuple[_KT, _VT]]: ...\n\nclass _OrderedDictValuesView(ValuesView[_VT], Reversible[_VT]):\n def __reversed__(self) -> Iterator[_VT]: ...\n\nclass OrderedDict(Dict[_KT, _VT], Reversible[_KT], Generic[_KT, _VT]):\n def popitem(self, last: bool = ...) -> Tuple[_KT, _VT]: ...\n def move_to_end(self, key: _KT, last: bool = ...) -> None: ...\n def copy(self: _S) -> _S: ...\n def __reversed__(self) -> Iterator[_KT]: ...\n def keys(self) -> _OrderedDictKeysView[_KT]: ...\n def items(self) -> _OrderedDictItemsView[_KT, _VT]: ...\n def values(self) -> _OrderedDictValuesView[_VT]: ...\n", "/src/pyrightconfig.json": "{ \n \"pythonVersion\": \"3.6\",\n \"pythonPlatform\": \"Linux\",\n \"typeCheckingMode\": \"basic\",\n \"typeshedPath\": \"/typeshed/\",\n \"reportMissingModuleSource\": false,\n \"reportWildcardImportFromLibrary\": false,\n \"verboseOutput\": true\n }\n" } } \ No newline at end of file