From 5c239ccd0343c9e95a9c6ddbe04a00dad8a61d03 Mon Sep 17 00:00:00 2001 From: Robert Knight Date: Mon, 22 Apr 2024 15:55:53 +0100 Subject: [PATCH 1/4] Show filtered builtins documentation Also allows links to the builtins from autocomplete and signature help where documentation is available. --- src/documentation/api/apidocs-util.ts | 21 ++++++++++ src/documentation/documentation-hooks.tsx | 6 ++- src/editor/codemirror/CodeMirror.tsx | 38 +++++++++++++++++-- .../language-server/autocompletion.ts | 18 +++++++-- .../language-server/documentation.ts | 9 ++++- .../language-server/signatureHelp.ts | 25 +++++++++--- src/editor/codemirror/language-server/view.ts | 14 +++++-- src/language-server/apidocs.ts | 1 + src/micropython/main/typeshed.ca.json | 4 +- src/micropython/main/typeshed.de.json | 22 +++++------ src/micropython/main/typeshed.en.json | 6 +-- src/micropython/main/typeshed.es-es.json | 16 ++++---- src/micropython/main/typeshed.fr.json | 4 +- src/micropython/main/typeshed.ja.json | 4 +- src/micropython/main/typeshed.ko.json | 4 +- src/micropython/main/typeshed.nl.json | 4 +- src/micropython/main/typeshed.zh-cn.json | 4 +- src/micropython/main/typeshed.zh-tw.json | 4 +- 18 files changed, 148 insertions(+), 56 deletions(-) diff --git a/src/documentation/api/apidocs-util.ts b/src/documentation/api/apidocs-util.ts index 308cf588d..50dcd3f32 100644 --- a/src/documentation/api/apidocs-util.ts +++ b/src/documentation/api/apidocs-util.ts @@ -52,3 +52,24 @@ export const moduleAndApiFromId = (id: string) => { apiId, }; }; + +export const filterOutUndocumentedBuiltins = (input: ApiDocsContent) => { + const recursiveFilter = ( + entries: ApiDocsEntry[] | undefined + ): ApiDocsEntry[] | undefined => { + if (!entries) { + return; + } + return entries.filter((entry) => { + const hasDocstring = !!entry.docString; + if (hasDocstring) { + entry.children = recursiveFilter(entry.children); + } + return hasDocstring; + }); + }; + + input.content.builtins.children = recursiveFilter( + input.content.builtins.children + ); +}; diff --git a/src/documentation/documentation-hooks.tsx b/src/documentation/documentation-hooks.tsx index 03071dd83..739915402 100644 --- a/src/documentation/documentation-hooks.tsx +++ b/src/documentation/documentation-hooks.tsx @@ -17,7 +17,10 @@ import { apiDocs, ApiDocsContent } from "../language-server/apidocs"; import { useLanguageServerClient } from "../language-server/language-server-hooks"; import { useLogging } from "../logging/logging-hooks"; import { useSettings } from "../settings/settings"; -import { pullModulesToTop } from "./api/apidocs-util"; +import { + filterOutUndocumentedBuiltins, + pullModulesToTop, +} from "./api/apidocs-util"; import dragImage from "./drag-image.svg"; import { fetchIdeas } from "./ideas/content"; import { Idea } from "./ideas/model"; @@ -72,6 +75,7 @@ const useApiDocumentation = (): ApiDocsContent | undefined => { if (client) { const docs = await apiDocs(client); pullModulesToTop(docs); + filterOutUndocumentedBuiltins(docs); if (!ignore) { setApiDocs(docs); } diff --git a/src/editor/codemirror/CodeMirror.tsx b/src/editor/codemirror/CodeMirror.tsx index 31d155dd1..0506435fa 100644 --- a/src/editor/codemirror/CodeMirror.tsx +++ b/src/editor/codemirror/CodeMirror.tsx @@ -12,7 +12,7 @@ import { lineNumbers, ViewUpdate, } from "@codemirror/view"; -import { useEffect, useMemo, useRef } from "react"; +import { useCallback, useEffect, useMemo, useRef } from "react"; import { useIntl } from "react-intl"; import { lineNumFromUint8Array } from "../../common/text-util"; import useActionFeedback from "../../common/use-action-feedback"; @@ -40,6 +40,7 @@ import { languageServer } from "./language-server/view"; import { lintGutter } from "./lint/lint"; import { codeStructure } from "./structure-highlighting"; import themeExtensions from "./themeExtensions"; +import { ApiDocsEntry } from "../../language-server/apidocs"; interface CodeMirrorProps { className?: string; @@ -80,7 +81,32 @@ const CodeMirror = ({ const logging = useLogging(); const actionFeedback = useActionFeedback(); const [sessionSettings, setSessionSettings] = useSessionSettings(); - const { apiReferenceMap } = useDocumentation(); + const { apiReferenceMap, api } = useDocumentation(); + + const showLinkToBuiltins = useCallback( + (id: string) => { + const idParts = id.split("."); + + const recursiveFind = ( + entries: ApiDocsEntry[] | undefined, + index: number = 1 + ): ApiDocsEntry | undefined => { + if (!entries) { + return; + } + return entries.find((entry) => { + const match = entry.id === idParts.slice(0, index + 1).join("."); + if (match) { + recursiveFind(entry.children, index + 1); + } + return match; + }); + }; + + return !!recursiveFind(api?.content.builtins.children); + }, + [api?.content.builtins.children] + ); // Reset undo/redo events on file change. useEffect(() => { @@ -141,7 +167,8 @@ const CodeMirror = ({ signatureHelp: { automatic: parameterHelpOption === "automatic", }, - } + }, + showLinkToBuiltins ) : [], codeStructure(options.codeStructureOption), @@ -172,6 +199,7 @@ const CodeMirror = ({ parameterHelpOption, uri, apiReferenceMap, + showLinkToBuiltins, ]); useEffect(() => { // Do this separately as we don't want to destroy the view whenever options needed for initialization change. @@ -199,7 +227,8 @@ const CodeMirror = ({ signatureHelp: { automatic: parameterHelpOption === "automatic", }, - } + }, + showLinkToBuiltins ) : [], codeStructure(options.codeStructureOption), @@ -215,6 +244,7 @@ const CodeMirror = ({ logging, uri, apiReferenceMap, + showLinkToBuiltins, ]); const { location } = selection; diff --git a/src/editor/codemirror/language-server/autocompletion.ts b/src/editor/codemirror/language-server/autocompletion.ts index d2c74e7fa..e6d0f1e25 100644 --- a/src/editor/codemirror/language-server/autocompletion.ts +++ b/src/editor/codemirror/language-server/autocompletion.ts @@ -34,6 +34,7 @@ import { import { nameFromSignature, removeFullyQualifiedName } from "./names"; import { offsetToPosition } from "./positions"; import { escapeRegExp } from "./regexp-util"; +import { ShowLinkToBuiltins } from "./view"; // Used to find the true start of the completion. Doesn't need to exactly match // any language's identifier definition. @@ -44,7 +45,8 @@ type AugmentedCompletion = Completion & { item: CompletionItem }; export const autocompletion = ( intl: IntlShape, logging: Logging, - apiReferenceMap: ApiReferenceMap + apiReferenceMap: ApiReferenceMap, + showLinkToBuiltins: ShowLinkToBuiltins ) => cmAutocompletion({ override: [ @@ -76,7 +78,8 @@ export const autocompletion = ( const documentationResolver = createDocumentationResolver( client, intl, - apiReferenceMap + apiReferenceMap, + showLinkToBuiltins ); const results = await client.completionRequest({ textDocument: { @@ -145,7 +148,8 @@ const createDocumentationResolver = ( client: LanguageServerClient, intl: IntlShape, - apiReferenceMap: ApiReferenceMap + apiReferenceMap: ApiReferenceMap, + showLinkToBuiltins: ShowLinkToBuiltins ) => async (completion: Completion): Promise => { let documentation: string | LSP.MarkupContent | undefined; @@ -171,7 +175,13 @@ const createDocumentationResolver = if (id) { const referenceLink = getLinkToReference(id, apiReferenceMap); code.innerText = removeFullyQualifiedName(code.innerText); - return wrapWithDocumentationButton(intl, node, id, referenceLink); + return wrapWithDocumentationButton( + intl, + node, + id, + referenceLink, + showLinkToBuiltins + ); } } return node; diff --git a/src/editor/codemirror/language-server/documentation.ts b/src/editor/codemirror/language-server/documentation.ts index a3da069fa..8e50a9fd0 100644 --- a/src/editor/codemirror/language-server/documentation.ts +++ b/src/editor/codemirror/language-server/documentation.ts @@ -11,6 +11,7 @@ import { moduleAndApiFromId } from "../../../documentation/api/apidocs-util"; import { ApiReferenceMap } from "../../../documentation/mapping/content"; import { splitDocString } from "./docstrings"; import "./documentation.css"; +import { ShowLinkToBuiltins } from "./view"; export const enum DocSections { Summary = 1 << 0, @@ -118,7 +119,8 @@ export const wrapWithDocumentationButton = ( intl: IntlShape, child: Element, id: string, - referenceLink: string | undefined + referenceLink: string | undefined, + showLinkToBuiltins: ShowLinkToBuiltins ): Element => { const docsAndActions = document.createElement("div"); docsAndActions.style.display = "flex"; @@ -154,7 +156,10 @@ export const wrapWithDocumentationButton = ( // We don't have documentation for builtins yet, // so there is nothing to link to. const { pythonModuleName } = moduleAndApiFromId(id); - if (pythonModuleName !== "builtins") { + if ( + pythonModuleName !== "builtins" || + (pythonModuleName === "builtins" && showLinkToBuiltins(id)) + ) { const apiAnchor = createStyledAnchorElement(); apiAnchor.textContent = intl.formatMessage({ id: "api-tab" }); apiAnchor.onclick = (e) => { diff --git a/src/editor/codemirror/language-server/signatureHelp.ts b/src/editor/codemirror/language-server/signatureHelp.ts index 9903cdf79..bf55a1eb9 100644 --- a/src/editor/codemirror/language-server/signatureHelp.ts +++ b/src/editor/codemirror/language-server/signatureHelp.ts @@ -37,6 +37,7 @@ import { } from "./documentation"; import { nameFromSignature, removeFullyQualifiedName } from "./names"; import { offsetToPosition } from "./positions"; +import { ShowLinkToBuiltins } from "./view"; export const setSignatureHelpRequestPosition = StateEffect.define({}); @@ -121,7 +122,8 @@ const openSignatureHelp: Command = (view: EditorView) => { export const signatureHelp = ( intl: IntlShape, automatic: boolean, - apiReferenceMap: ApiReferenceMap + apiReferenceMap: ApiReferenceMap, + showLinkToBuiltins: ShowLinkToBuiltins ) => { const signatureHelpTooltipField = StateField.define({ create: () => new SignatureHelpState(-1, null), @@ -162,7 +164,9 @@ export const signatureHelp = ( create: () => { const dom = document.createElement("div"); dom.className = "cm-signature-tooltip"; - dom.appendChild(formatSignatureHelp(result, apiReferenceMap)); + dom.appendChild( + formatSignatureHelp(result, apiReferenceMap, showLinkToBuiltins) + ); return { dom }; }, }; @@ -219,7 +223,8 @@ export const signatureHelp = ( const formatSignatureHelp = ( help: SignatureHelp, - apiReferenceMap: ApiReferenceMap + apiReferenceMap: ApiReferenceMap, + showLinkToBuiltins: ShowLinkToBuiltins ): Node => { const { activeSignature: activeSignatureIndex, signatures } = help; // We intentionally do something minimal here to minimise distraction. @@ -253,7 +258,8 @@ export const signatureHelp = ( to, signatureDoc, activeParameterDoc, - apiReferenceMap + apiReferenceMap, + showLinkToBuiltins ); }; @@ -263,7 +269,8 @@ export const signatureHelp = ( to: number, signatureDoc: string | MarkupContent | undefined, activeParameterDoc: string | MarkupContent | undefined, - apiReferenceMap: ApiReferenceMap + apiReferenceMap: ApiReferenceMap, + showLinkToBuiltins: ShowLinkToBuiltins ): Node => { let before = label.substring(0, from); const id = nameFromSignature(before); @@ -301,7 +308,13 @@ export const signatureHelp = ( ); } const referenceLink = getLinkToReference(id, apiReferenceMap); - return wrapWithDocumentationButton(intl, parent, id, referenceLink); + return wrapWithDocumentationButton( + intl, + parent, + id, + referenceLink, + showLinkToBuiltins + ); }; return [ diff --git a/src/editor/codemirror/language-server/view.ts b/src/editor/codemirror/language-server/view.ts index 10de68359..62727d084 100644 --- a/src/editor/codemirror/language-server/view.ts +++ b/src/editor/codemirror/language-server/view.ts @@ -73,6 +73,8 @@ interface Options { }; } +export type ShowLinkToBuiltins = (id: string) => boolean; + /** * Extensions that make use of a language server client. * @@ -88,13 +90,19 @@ export function languageServer( intl: IntlShape, logging: Logging, apiReferenceMap: ApiReferenceMap, - options: Options + options: Options, + showLinkToBuiltins: ShowLinkToBuiltins ) { return [ uriFacet.of(uri), clientFacet.of(client), ViewPlugin.define((view) => new LanguageServerView(view)), - signatureHelp(intl, options.signatureHelp.automatic, apiReferenceMap), - autocompletion(intl, logging, apiReferenceMap), + signatureHelp( + intl, + options.signatureHelp.automatic, + apiReferenceMap, + showLinkToBuiltins + ), + autocompletion(intl, logging, apiReferenceMap, showLinkToBuiltins), ]; } diff --git a/src/language-server/apidocs.ts b/src/language-server/apidocs.ts index 1579f954a..89eec714f 100644 --- a/src/language-server/apidocs.ts +++ b/src/language-server/apidocs.ts @@ -71,6 +71,7 @@ export const apiDocs = async ( // For now, this omits a lot of modules that have stubs // derived from typeshed with no docs. // Note: "audio" is covered under micro:bit. + "builtins", "gc", "log", "machine", diff --git a/src/micropython/main/typeshed.ca.json b/src/micropython/main/typeshed.ca.json index 9cc6a8e8f..b5f6ccaeb 100644 --- a/src/micropython/main/typeshed.ca.json +++ b/src/micropython/main/typeshed.ca.json @@ -34,7 +34,7 @@ "/typeshed/stdlib/ustruct.pyi": "from struct import *\n", "/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": "\"\"\"Pins, imatges, sons, temperatura i volum.\"\"\"\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 \"\"\"Programa l'execuci\u00f3 d'una funci\u00f3 a cada interval especificat pels arguments de temps **nom\u00e9s V2**.\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: Funci\u00f3 a cridar a l'interval previst. Omet quan el fas servir com decorador.\n:param days: (dies) Estableix la marca del dia per la programaci\u00f3\n:param h: Estableix la marca de l'hora per la programaci\u00f3\n:param min: Estableix la marca del minut per la programaci\u00f3\n:param s: Estableix la marca del segon per la programaci\u00f3\n:param ms: Estableix la marca del mil\u00b7lisegon per la programaci\u00f3\"\"\"\n\ndef panic(n: int) -> None:\n \"\"\"Entrar en mode p\u00e0nic. (p\u00e0nic)\n\nExample: ``panic(127)``\n\n:param n: Un nombre enter arbitrari <= 255 per indicar un estat.\n\nRequires restart.\"\"\"\n\ndef reset() -> None:\n \"\"\"Reinicialitza la placa. (reiniciar)\"\"\"\n\n@overload\ndef scale(value: float, from_: Tuple[float, float], to: Tuple[int, int]) -> int:\n \"\"\"Converteix un valor d'un interval a un interval de nombre enter. (escala)\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) Un nombre a convertir.\n:param from_: (des de) Una tupla des d'on definir l'interval a convertir\n:param to: (a) Una tupla que defineix l'interval d'arribada\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 \"\"\"Converteix un valor d'un interval a un altre interval de coma flotant. (escala)\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) Un nombre a convertir.\n:param from_: (des de) Una tupla des d'on definir l'interval a convertir\n:param to: (a) Una tupla que defineix l'interval d'arribada de la conversi\u00f3.\n:return: The ``value`` converted to the ``to`` range.\"\"\"\n\ndef sleep(n: float) -> None:\n \"\"\"Espera per ``n`` mil\u00b7lisegons. (dormir)\n\nExample: ``sleep(1000)``\n\n:param n: El nombre de mil\u00b7lisegons 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 \"\"\"Obt\u00e9 el temps d'execuci\u00f3 de la placa. (temps d'execuci\u00f3)\n\n:return: The number of milliseconds since the board was switched on or restarted.\"\"\"\n\ndef temperature() -> int:\n \"\"\"Obt\u00e9 la temperatura de la micro:bit en graus Celsius. (temperatura)\"\"\"\n\ndef set_volume(v: int) -> None:\n \"\"\"Configura el volum (assigna volum)\n\nExample: ``set_volume(127)``\n\n:param v: un valor entre 0 (baix) i 255 (alt).\n\nOut of range values will be clamped to 0 or 255.\n\n**V2** only.\"\"\"\n ...\n\nclass Button:\n \"\"\"La classe dels botons ``button_a`` i ``button_b``. (bot\u00f3)\"\"\"\n\n def is_pressed(self) -> bool:\n \"\"\"Verifica si el bot\u00f3 est\u00e0 premut. (\u00e9s premut)\n\n:return: ``True`` if the specified button ``button`` is pressed, and ``False`` otherwise.\"\"\"\n ...\n\n def was_pressed(self) -> bool:\n \"\"\"Verifica si el bot\u00f3 ha estat premut d'en\u00e7\u00e0 que el dispositiu va arrancar o l'\u00faltima vegada que aquest m\u00e8tode va ser cridat. (ha estat premut)\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 \"\"\"Obt\u00e9 el total acumulat de pressions dels botons i restableix aquest total\na zero abans de tornar. (obt\u00e9 pitjades)\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'objecte bot\u00f3 esquerre ``Button`` . (bot\u00f3 a)\"\"\"\nbutton_b: Button\n\"\"\"L'objecte el bot\u00f3 dret ``Button``. (bot\u00f3 b)\"\"\"\n\nclass MicroBitDigitalPin:\n \"\"\"Un pin digital.\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 \"\"\"Obt\u00e9 el valor digital del pin. (llegeix 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 \"\"\"Assigna el valor digital del pin. (escriu digital)\n\nExample: ``pin0.write_digital(1)``\n\n:param value: (valor) 1 per posar el pin alt o 0 per posar el pin baix\"\"\"\n ...\n\n def set_pull(self, value: int) -> None:\n \"\"\"Configura les resist\u00e8ncies de pull-up/pull-down un dels tres valors possibles: ``PULL_UP``, ``PULL_DOWN`` o ``NO_PULL``. (configuraci\u00f3 de les resist\u00e8ncies de pull up/down)\n\nExample: ``pin0.set_pull(pin0.PULL_UP)``\n\n:param value: (valor) L'estat del pull-up/pull-down del pin corresponent, per ex. ``pin0.PULL_UP``.\"\"\"\n ...\n\n def get_pull(self) -> int:\n \"\"\"Obt\u00e9 l'estat de pull-up/pull-down d'un pin.\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 \"\"\"Retorna el mode del pin (obt\u00e9 el mode)\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 \"\"\"Genera un senyal PWM al pin, amb el cicle de treball proporcional a ``value``. (escriu anal\u00f2gic)\n\nExample: ``pin0.write_analog(254)``\n\n:param value: (valor) Un nombre enter o de coma flotant entre 0 (cicle de treball del 0%) i 1023 (cicle de treball del 100%).\"\"\"\n\n def set_analog_period(self, period: int) -> None:\n \"\"\"Estableix el per\u00edode del senyal PWM a ``period`` en mil\u00b7lisegons. (configura el per\u00edode amb un valor anal\u00f2gic)\n\nExample: ``pin0.set_analog_period(10)``\n\n:param period: (per\u00edode) El per\u00edode en mil\u00b7lisegons amb un valor m\u00ednim v\u00e0lid d'1\\u202fms\"\"\"\n\n def set_analog_period_microseconds(self, period: int) -> None:\n \"\"\"Estableix el per\u00edode del senyal PWM a ``period`` microsegons. (configura el per\u00edode amb un valor anal\u00f2gic en microsegons)\n\nExample: ``pin0.set_analog_period_microseconds(512)``\n\n:param period: (per\u00edode) El per\u00edode en microsegons amb un valor v\u00e0lid m\u00ednim de 256\\u202f\u00b5s.\"\"\"\n\nclass MicroBitAnalogDigitalPin(MicroBitDigitalPin):\n \"\"\"Un pin amb funcions anal\u00f2giques i digitals.\"\"\"\n\n def read_analog(self) -> int:\n \"\"\"Llegeix el voltatge aplicat al pin. (llegeix anal\u00f2gic)\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 amb caracter\u00edstiques anal\u00f2giques, digitals i t\u00e0ctils.\"\"\"\n CAPACITIVE: int\n RESISTIVE: int\n\n def is_touched(self) -> bool:\n \"\"\"Comprova si el pin est\u00e0 sent tocat. (est\u00e0 tocat)\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 \"\"\"Estableix el mode t\u00e0ctil per al pin. (estableix el mode t\u00e0ctil)\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 corresponent.\"\"\"\n ...\npin0: MicroBitTouchPin\n\"\"\"Pin amb caracter\u00edstiques digitals, anal\u00f2giques i t\u00e0ctils.\"\"\"\npin1: MicroBitTouchPin\n\"\"\"Pin amb caracter\u00edstiques digitals, anal\u00f2giques i t\u00e0ctils.\"\"\"\npin2: MicroBitTouchPin\n\"\"\"Pin amb caracter\u00edstiques digitals, anal\u00f2giques i t\u00e0ctils.\"\"\"\npin3: MicroBitAnalogDigitalPin\n\"\"\"Pin amb caracter\u00edstiques digitals i anal\u00f2giques.\"\"\"\npin4: MicroBitAnalogDigitalPin\n\"\"\"Pin amb caracter\u00edstiques digitals i anal\u00f2giques.\"\"\"\npin5: MicroBitDigitalPin\n\"\"\"Pin amb caracter\u00edstiques digitals.\"\"\"\npin6: MicroBitDigitalPin\n\"\"\"Pin amb caracter\u00edstiques digitals.\"\"\"\npin7: MicroBitDigitalPin\n\"\"\"Pin amb caracter\u00edstiques digitals.\"\"\"\npin8: MicroBitDigitalPin\n\"\"\"Pin amb caracter\u00edstiques digitals.\"\"\"\npin9: MicroBitDigitalPin\n\"\"\"Pin amb caracter\u00edstiques digitals.\"\"\"\npin10: MicroBitAnalogDigitalPin\n\"\"\"Pin amb caracter\u00edstiques digitals i anal\u00f2giques.\"\"\"\npin11: MicroBitDigitalPin\n\"\"\"Pin amb caracter\u00edstiques digitals.\"\"\"\npin12: MicroBitDigitalPin\n\"\"\"Pin amb caracter\u00edstiques digitals.\"\"\"\npin13: MicroBitDigitalPin\n\"\"\"Pin amb caracter\u00edstiques digitals.\"\"\"\npin14: MicroBitDigitalPin\n\"\"\"Pin amb caracter\u00edstiques digitals.\"\"\"\npin15: MicroBitDigitalPin\n\"\"\"Pin amb caracter\u00edstiques digitals.\"\"\"\npin16: MicroBitDigitalPin\n\"\"\"Pin amb caracter\u00edstiques digitals.\"\"\"\npin19: MicroBitDigitalPin\n\"\"\"Pin amb caracter\u00edstiques digitals.\"\"\"\npin20: MicroBitDigitalPin\n\"\"\"Pin amb caracter\u00edstiques digitals.\"\"\"\npin_logo: MicroBitTouchPin\n\"\"\"Un logotip t\u00e0ctil a la part frontal de la micro:bit, que per defecte est\u00e0 establert al mode t\u00e0ctil capacitiu. (pin logotip)\"\"\"\npin_speaker: MicroBitAnalogDigitalPin\n\"\"\"Un pin per adre\u00e7ar-se a l'altaveu micro:bit. (pin altaveu)\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 imatge per mostrar a la pantalla LED de micro:bit. (imatge)\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 \"\"\"Imatge d'un cor. (cor)\"\"\"\n HEART_SMALL: Image\n \"\"\"Imatge d'un cor petit (cor petit)\"\"\"\n HAPPY: Image\n \"\"\"Imatge d'una cara feli\u00e7 (feli\u00e7)\"\"\"\n SMILE: Image\n \"\"\"Imatge d'una cara somrient (somriure)\"\"\"\n SAD: Image\n \"\"\"Imatge d'una cara trista (tristesa)\"\"\"\n CONFUSED: Image\n \"\"\"Imatge de cara confusa. (confusa)\"\"\"\n ANGRY: Image\n \"\"\"Imatge d'una cara enfadada. (enfadat)\"\"\"\n ASLEEP: Image\n \"\"\"Imatge d'una cara dormint. (despert)\"\"\"\n SURPRISED: Image\n \"\"\"Imatge d'una cara de sorpresa (sorpr\u00e8s)\"\"\"\n SILLY: Image\n \"\"\"Imatge d'una cara ximple. (ximple)\"\"\"\n FABULOUS: Image\n \"\"\"Imatge d'una cara amb ulleres de sol. (fabul\u00f3s)\"\"\"\n MEH: Image\n \"\"\"Imatge d'una cara inexpressiva. (BAH avorrit)\"\"\"\n YES: Image\n \"\"\"Imatge d'una marca tic. (s\u00ed)\"\"\"\n NO: Image\n \"\"\"Imatge d'una creu.\"\"\"\n CLOCK12: Image\n \"\"\"Imatge d'una l\u00ednia apuntant les dotze. (les dotze)\"\"\"\n CLOCK11: Image\n \"\"\"Imatge d'una l\u00ednia apuntant les onze. (les onze)\"\"\"\n CLOCK10: Image\n \"\"\"Imatge d'una l\u00ednia apuntant les deu. (les deu)\"\"\"\n CLOCK9: Image\n \"\"\"Imatge d'una l\u00ednia apuntant les nou. (les nou)\"\"\"\n CLOCK8: Image\n \"\"\"Imatge d'una l\u00ednia apuntant les vuit. (les vuit)\"\"\"\n CLOCK7: Image\n \"\"\"Imatge d'una l\u00ednia apuntant les set. (les set)\"\"\"\n CLOCK6: Image\n \"\"\"Imatge amb una l\u00ednia apuntant a les 6 en punt. (les sis)\"\"\"\n CLOCK5: Image\n \"\"\"Imatge amb una l\u00ednia apuntant a les 5 en punt. (les cinc)\"\"\"\n CLOCK4: Image\n \"\"\"Imatge amb una l\u00ednia apuntant a les 4 en punt. (les quatre)\"\"\"\n CLOCK3: Image\n \"\"\"Imatge amb una l\u00ednia apuntant a les 3 en punt. (les tres)\"\"\"\n CLOCK2: Image\n \"\"\"Imatge amb una l\u00ednia apuntant a les 2 en punt. (les dues)\"\"\"\n CLOCK1: Image\n \"\"\"Imatge amb una l\u00ednia apuntant a la 1 en punt. (la una)\"\"\"\n ARROW_N: Image\n \"\"\"Imatge de fletxa apuntant al nord. (fletxa n)\"\"\"\n ARROW_NE: Image\n \"\"\"Imatge de fletxa apuntant al nord-est. (fletxa ne)\"\"\"\n ARROW_E: Image\n \"\"\"Imatge de fletxa apuntant a l'est. (fletxa e)\"\"\"\n ARROW_SE: Image\n \"\"\"Imatge de fletxa apuntant al sud-est. (fletxa se)\"\"\"\n ARROW_S: Image\n \"\"\"Imatge de fletxa apuntant al sud. (fletxa s)\"\"\"\n ARROW_SW: Image\n \"\"\"Imatge de fletxa apuntant al sud-oest. (fletxa so)\"\"\"\n ARROW_W: Image\n \"\"\"Imatge de fletxa apuntant a l'oest. (fletxa o)\"\"\"\n ARROW_NW: Image\n \"\"\"Imatge de fletxa apuntant al nord-oest. (fletxa no)\"\"\"\n TRIANGLE: Image\n \"\"\"Imatge d'un triangle apuntant amunt.\"\"\"\n TRIANGLE_LEFT: Image\n \"\"\"Imatge d'un triangle en la cantonada esquerra. (triangle a l'esquerra)\"\"\"\n CHESSBOARD: Image\n \"\"\"Leds alternatius il\u00b7luminats en un patr\u00f3 d'escacs. (Tauler d'escacs)\"\"\"\n DIAMOND: Image\n \"\"\"Imatge d'un diamant (diamant)\"\"\"\n DIAMOND_SMALL: Image\n \"\"\"Imatge d'un diamant petit (diamant petit)\"\"\"\n SQUARE: Image\n \"\"\"Imatge d'un quadrat (quadrat)\"\"\"\n SQUARE_SMALL: Image\n \"\"\"Imatge d'un quadrat petit (quadrat petit)\"\"\"\n RABBIT: Image\n \"\"\"Imatge d'un conill. (conill)\"\"\"\n COW: Image\n \"\"\"Imatge d'una vaca. (vaca)\"\"\"\n MUSIC_CROTCHET: Image\n \"\"\"Imatge de la nota musical negra (nota musical negra)\"\"\"\n MUSIC_QUAVER: Image\n \"\"\"Imatge de la nota musical corxera (nota musical corxera)\"\"\"\n MUSIC_QUAVERS: Image\n \"\"\"Imatge d'un parell de notes musicals corxeres (nota musical corxera)\"\"\"\n PITCHFORK: Image\n \"\"\"Imatge d'una forca. (forca)\"\"\"\n XMAS: Image\n \"\"\"Imatge d'un arbre de Nadal (nadal)\"\"\"\n PACMAN: Image\n \"\"\"Imatge del personatge de Pac-man a arcade\"\"\"\n TARGET: Image\n \"\"\"Imatge d'objectiu. (diana)\"\"\"\n TSHIRT: Image\n \"\"\"Imatge de samarreta. (Imatge d'una samarreta T-shirt)\"\"\"\n ROLLERSKATE: Image\n \"\"\"Imatge d'un patinet. (patinet)\"\"\"\n DUCK: Image\n \"\"\"Imatge d'un \u00e0nec. (\u00e0nec)\"\"\"\n HOUSE: Image\n \"\"\"Imatge d'una casa. (casa)\"\"\"\n TORTOISE: Image\n \"\"\"Imatge d'una tortuga. (tortuga)\"\"\"\n BUTTERFLY: Image\n \"\"\"Imatge d'una papallona. (papallona)\"\"\"\n STICKFIGURE: Image\n \"\"\"Imatge de figura d'un pal. (imatge d'un pal)\"\"\"\n GHOST: Image\n \"\"\"Imatge d'un fantasma. (fantasma)\"\"\"\n SWORD: Image\n \"\"\"Imatge d'una espasa (espasa)\"\"\"\n GIRAFFE: Image\n \"\"\"Imatge d'una girafa. (girafa)\"\"\"\n SKULL: Image\n \"\"\"Imatge d'un crani. (crani)\"\"\"\n UMBRELLA: Image\n \"\"\"Imatge d'un paraigua, (paraigua)\"\"\"\n SNAKE: Image\n \"\"\"Imatge d'una serp. (serp)\"\"\"\n SCISSORS: Image\n \"\"\"Imatge d'unes tisores. (tisores)\"\"\"\n ALL_CLOCKS: List[Image]\n \"\"\"Una llista que cont\u00e9 totes les imatges CLOCK_ en seq\u00fc\u00e8ncia. (tots els rellotges)\"\"\"\n ALL_ARROWS: List[Image]\n \"\"\"Una llista que cont\u00e9 totes les ARROW_images en seq\u00fc\u00e8ncia. (totes les fletxes)\"\"\"\n\n @overload\n def __init__(self, string: str) -> None:\n \"\"\"Crea una imatge a partir d'una cadena que descrigui quins leds estan encesos.\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 descrivint la imatge.\"\"\"\n ...\n\n @overload\n def __init__(self, width: int=5, height: int=5, buffer: ReadableBuffer=None) -> None:\n \"\"\"Crea una imatge buida amb ``width`` columnes i ``height`` files.\n\n:param width: (amplada) Amplada opcional de la imatge\n:param height: (al\u00e7\u00e0ria) Al\u00e7\u00e0ria opcional de la imatge\n:param buffer: (mem\u00f2ria interm\u00e8dia) Llistes o bytes opcionals d'enters de ``width``\u00d7``height`` dins l'interval de 0 a 9 per inicialitzar la imatge\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 \"\"\"Obt\u00e9 el nombre de columnes (amplada)\n\n:return: The number of columns in the image\"\"\"\n ...\n\n def height(self) -> int:\n \"\"\"Obt\u00e9 el nombre de files. (al\u00e7\u00e0ria)\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 \"\"\"Estableix la brillantor d'un p\u00edxel. (estableix p\u00edxel)\n\nExample: ``my_image.set_pixel(0, 0, 9)``\n\n:param x: El nombre de la columna\n:param y: El nombre de la fila\n:param value: (valor) La brillantor com a nombre enter entre 0 (fosc) i 9 (brillant)\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 \"\"\"Obt\u00e9 la brillantor d'un p\u00edxel. (obt\u00e9 p\u00edxel)\n\nExample: ``my_image.get_pixel(0, 0)``\n\n:param x: El nombre de la columna\n:param y: El nombre de la 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 imatge nova movent-la cap a l'esquerra. (despla\u00e7a a l'esquerra)\n\nExample: ``Image.HEART_SMALL.shift_left(1)``\n\n:param n: El nombre de columnes per despla\u00e7ar-se\n:return: The shifted image\"\"\"\n ...\n\n def shift_right(self, n: int) -> Image:\n \"\"\"Crea una imatge nova movent-la cap a la dreta. (despla\u00e7a a la dreta)\n\nExample: ``Image.HEART_SMALL.shift_right(1)``\n\n:param n: El nombre de columnes per despla\u00e7ar-se\n:return: The shifted image\"\"\"\n ...\n\n def shift_up(self, n: int) -> Image:\n \"\"\"Crea una imatge nova despla\u00e7ant la imatge cap amunt. (despla\u00e7a cap amunt)\n\nExample: ``Image.HEART_SMALL.shift_up(1)``\n\n:param n: El nombre de files per despla\u00e7ar-se\n:return: The shifted image\"\"\"\n ...\n\n def shift_down(self, n: int) -> Image:\n \"\"\"Crea una imatge nova despla\u00e7ant-la cap avall. (despla\u00e7a cap avall)\n\nExample: ``Image.HEART_SMALL.shift_down(1)``\n\n:param n: El nombre de files per despla\u00e7ar-se\n:return: The shifted image\"\"\"\n ...\n\n def crop(self, x: int, y: int, w: int, h: int) -> Image:\n \"\"\"Crea una imatge nova retallant la imatge. (retalla)\n\nExample: ``Image.HEART.crop(1, 1, 3, 3)``\n\n:param x: La columna de despla\u00e7ament del retall\n:param y: La fila de despla\u00e7ament del retall\n:param w: L'amplada del retall\n:param h: L'al\u00e7\u00e0ria del retall\n:return: The new image\"\"\"\n ...\n\n def copy(self) -> Image:\n \"\"\"Crea una c\u00f2pia exacta de la imatge (c\u00f2pia)\n\nExample: ``Image.HEART.copy()``\n\n:return: The new image\"\"\"\n ...\n\n def invert(self) -> Image:\n \"\"\"Crea una imatge nova invertint la brillantor dels p\u00edxels de la imatge\nfont. (inverteix)\n\nExample: ``Image.SMALL_HEART.invert()``\n\n:return: The new image.\"\"\"\n ...\n\n def fill(self, value: int) -> None:\n \"\"\"Assigna la brillantor de tots els p\u00edxels de la imatge (omple)\n\nExample: ``my_image.fill(5)``\n\n:param value: (valor) La nova brillantor com a nombre entre 0 (fosc) i 9 (brillant).\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 una \u00e0rea d'una altra imatge a aquesta imatge.\n\nExample: ``my_image.blit(Image.HEART, 1, 1, 3, 3, 1, 1)``\n\n:param src: (font) La imatge font\n:param x: Despla\u00e7ament de la columna inicial a la imatge d'origen\n:param y: Despla\u00e7ament de la fila inicial a la imatge d'origen\n:param w: El nombre de columnes a copiar\n:param h: El nombre de files a copiar\n:param xdest: El despla\u00e7ament de columna a modificar en aquesta imatge\n:param ydest: El despla\u00e7ament de fila que cal modificar en aquesta imatge\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 \"\"\"Obt\u00e9 una representaci\u00f3 de cadena compacta de la imatge. (repr - Obt\u00e9 una representaci\u00f3 de cadena compacta de la imatge.)\"\"\"\n ...\n\n def __str__(self) -> str:\n \"\"\"Obt\u00e9 una representaci\u00f3 de cadena llegible de la imatge.\"\"\"\n ...\n\n def __add__(self, other: Image) -> Image:\n \"\"\"Crea una imatge nova afegint els valors de brillantor de les dues\nimatges per a cada p\u00edxel. (afegeix)\n\nExample: ``Image.HEART + Image.HAPPY``\n\n:param other: (altre) La imatge a afegir.\"\"\"\n ...\n\n def __sub__(self, other: Image) -> Image:\n \"\"\"Crea una imatge nova restant els valors de brillantor d'una altra imatge d'aquesta imatge.\n\nExample: ``Image.HEART - Image.HEART_SMALL``\n\n:param other: (altre) La imatge a restar.\"\"\"\n ...\n\n def __mul__(self, n: float) -> Image:\n \"\"\"Crea una imatge nova multiplicant la brillantor de cada p\u00edxel per\n``n``.\n\nExample: ``Image.HEART * 0.5``\n\n:param n: El valor per multiplicar.\"\"\"\n ...\n\n def __truediv__(self, n: float) -> Image:\n \"\"\"Crea una imatge nova dividint la brillantor de cada p\u00edxel per\n``n``.\n\nExample: ``Image.HEART / 2``\n\n:param n: El valor del divisor.\"\"\"\n ...\n\nclass SoundEvent:\n LOUD: SoundEvent\n \"\"\"Representa la transici\u00f3 dels esdeveniments de so, des de ``quiet`` a ``loud`` com picant de mans o cridant. (so fort)\"\"\"\n QUIET: SoundEvent\n \"\"\"Representa la transici\u00f3 dels esdeveniments de so, des de ``loud`` a ``quiet`` com parlant o m\u00fasica de fons. (so fluix)\"\"\"\n\nclass Sound:\n \"\"\"Els sons integrats es poden reproduir mitjan\u00e7ant ``audio.play(Sound.NAME)``. (so)\"\"\"\n GIGGLE: Sound\n \"\"\"So de riure (riure)\"\"\"\n HAPPY: Sound\n \"\"\"So feli\u00e7. (feli\u00e7)\"\"\"\n HELLO: Sound\n \"\"\"So de salutaci\u00f3. (hola)\"\"\"\n MYSTERIOUS: Sound\n \"\"\"So misteri\u00f3s. (misteri\u00f3s)\"\"\"\n SAD: Sound\n \"\"\"So trist. (tristesa)\"\"\"\n SLIDE: Sound\n \"\"\"So lliscant (so lliscant)\"\"\"\n SOARING: Sound\n \"\"\"So creixent. (creixent)\"\"\"\n SPRING: Sound\n \"\"\"So primaveral. (primaveral)\"\"\"\n TWINKLE: Sound\n \"\"\"So de centelleig. (centelleig)\"\"\"\n YAWN: Sound\n \"\"\"So de badall. (badall)\"\"\"", "/typeshed/stdlib/microbit/accelerometer.pyi": "\"\"\"Mesura l'acceleraci\u00f3 de la micro:bit i reconeix els gestos. (acceler\u00f2metre)\"\"\"\nfrom typing import Tuple\n\ndef get_x() -> int:\n \"\"\"Obt\u00e9 la mesura de l'acceleraci\u00f3 a l'eix ``x`` en mili-g. (obt\u00e9 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 \"\"\"Obt\u00e9 la mesura de l'acceleraci\u00f3 a l'eix ``y`` en mili-g. (obt\u00e9 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 \"\"\"Obt\u00e9 la mesura de l'acceleraci\u00f3 a l'eix ``z`` en mili-g. (obt\u00e9 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 \"\"\"Obt\u00e9 les mesures d'acceleraci\u00f3 en tots els eixos alhora com una tupla. (obt\u00e9 valors)\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 \"\"\"Obt\u00e9 la mesura de l'acceleraci\u00f3 de tots els eixos combinats, com un nombre enter positiu. Aquest ser\u00e0 la suma Pitag\u00f2rica dels eixos X, Y i Z. (obt\u00e9 la for\u00e7a)\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 \"\"\"Obt\u00e9 el nom del gest actual. (El gest 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 \"\"\"Comprova si el gest nomenat est\u00e0 actiu actualment.\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: (nom) El nom del gest\n:return: ``True`` if the gesture is active, ``False`` otherwise.\"\"\"\n ...\n\ndef was_gesture(name: str) -> bool:\n \"\"\"Comprova si el gest nomenat ha estat actiu des de l'\u00faltima crida.\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: (nom) El nom del gest\n:return: ``True`` if the gesture was active since the last call, ``False`` otherwise.\"\"\"\n\ndef get_gestures() -> Tuple[str, ...]:\n \"\"\"Retorna una tupla de l'historial de gestos. (obt\u00e9 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 \"\"\"Estableix l'interval de la sensibilitat de l'acceler\u00f2metre, en g (gravetat est\u00e0ndard), al valor m\u00e9s proper acceptat pel maquinari, arrodonit a ``2``, ``4``, o ``8``\n\nExample: ``accelerometer.set_range(8)``\n\n:param value: (valor) Nou interval per a l'acceler\u00f2metre, un nombre enter a ``g``.\"\"\"", "/typeshed/stdlib/microbit/audio.pyi": "\"\"\"Reprodueix sons amb la micro:bit (importa ``audio`` per a la compatibilitat amb V1). (\u00e0udio)\"\"\"\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 \"\"\"Reprodueix un so incorporat, un efecte de s\u00f3 o marcs d'\u00e0udio personalitzats.\n\nExample: ``audio.play(Sound.GIGGLE)``\n\n:param source: (origen) Un objecte de ``Sound`` incorporat com ``Sound.GIGGLE``, un ``SoundEffect`` o una data de mostra com un iterable de ``AudioFrame`` .\n:param wait: (espera) Si ``wait`` \u00e9s ``True``, aquesta funci\u00f3 es bloquejar\u00e0 fins que s'acabi el so.\n:param pin: Es pot utilitzar un argument opcional per especificar el pin de sortida per anul\u00b7lar el valor predeterminat de ``pin0``. Si no vols que es reprodueixi cap so, pots utilitzar ``pin=None``.\n:param return_pin: (retorna el pin) Especifica un pin diferent del connector d'expansi\u00f3 per connectar-lo a un altaveu extern en lloc de posar a terra. Aix\u00f2 s'ignora per a la revisi\u00f3 **V2**.\"\"\"\n\ndef is_playing() -> bool:\n \"\"\"Verifica si s'est\u00e0 reproduint un so. (est\u00e0 reproduint)\n\nExample: ``audio.is_playing()``\n\n:return: ``True`` if audio is playing, otherwise ``False``.\"\"\"\n ...\n\ndef stop() -> None:\n \"\"\"Atura tota la reproducci\u00f3 d'\u00e0udio. (atura)\n\nExample: ``audio.stop()``\"\"\"\n ...\n\nclass SoundEffect:\n \"\"\"Un efecte sonor, compost per un conjunt de par\u00e0metres configurats via el constructor o atributs.\"\"\"\n WAVEFORM_SINE: ClassVar[int]\n \"\"\"Opci\u00f3 d'ona sinusoidal pel par\u00e0metre ``waveform``. (forma d'ona sinusoidal)\"\"\"\n WAVEFORM_SAWTOOTH: ClassVar[int]\n \"\"\"Opci\u00f3 d'ona de dent de serra pel par\u00e0metre ``waveform``. (forma d'ona de dent de serra)\"\"\"\n WAVEFORM_TRIANGLE: ClassVar[int]\n \"\"\"Opci\u00f3 d'ona triangular pel par\u00e0metre ``waveform``. (forma d'ona triangular)\"\"\"\n WAVEFORM_SQUARE: ClassVar[int]\n \"\"\"Opci\u00f3 d'ona quadrada pel par\u00e0metre ``waveform``. (forma d'ona quadrada)\"\"\"\n WAVEFORM_NOISE: ClassVar[int]\n \"\"\"Opci\u00f3 d'ona de soroll pel par\u00e0metre ``waveform``. (forma d'ona de soroll)\"\"\"\n SHAPE_LINEAR: ClassVar[int]\n \"\"\"Opci\u00f3 d'ona lineal pel par\u00e0metre ``shape``. (forma lineal)\"\"\"\n SHAPE_CURVE: ClassVar[int]\n \"\"\"Opci\u00f3 d'interpolaci\u00f3 de corba usada pel par\u00e0metre ``shape``. (forma de corba)\"\"\"\n SHAPE_LOG: ClassVar[int]\n \"\"\"Opci\u00f3 d'interpolaci\u00f3 logar\u00edtmica utilitzada pel par\u00e0metre ``shape``. (forma logar\u00edtmica)\"\"\"\n FX_NONE: ClassVar[int]\n \"\"\"Opci\u00f3 de cap efecte utilitzat pel par\u00e0metre ``fx``. (fx cap)\"\"\"\n FX_TREMOLO: ClassVar[int]\n \"\"\"Opci\u00f3 d'efecte tr\u00e8molo utilitzat pel par\u00e0metre ``fx``. (fx tr\u00e9molo)\"\"\"\n FX_VIBRATO: ClassVar[int]\n \"\"\"Opci\u00f3 d'efecte vibrato utilitzat pel par\u00e0metre ``fx``.\"\"\"\n FX_WARBLE: ClassVar[int]\n \"\"\"Opci\u00f3 d'efecte gorjeu utilitzat pel par\u00e0metre ``fx``. (Efecte gorjeu)\"\"\"\n freq_start: int\n \"\"\"Freq\u00fc\u00e8ncia inicial en Hertz (Hz), un nombre entre ``0`` i ``9999`` (freq\u00fc\u00e8ncia inicial)\"\"\"\n freq_end: int\n \"\"\"Freq\u00fc\u00e8ncia final en Hertz (Hz), un nombre entre ``0`` i ``9999`` (frequ\u00e8ncia final)\"\"\"\n duration: int\n \"\"\"Durada del so en mil\u00b7lisegons, un nombre entre ``0`` and ``9999`` (Durada - duraci\u00f3)\"\"\"\n vol_start: int\n \"\"\"Volum inicial, un nombre entre ``0`` and ``255`` (volum inicial)\"\"\"\n vol_end: int\n \"\"\"Valor del volum final, un nombre entre ``0`` and ``255`` (volum final)\"\"\"\n waveform: int\n \"\"\"Tipus de forma d'ona, un d'aquest valors: ``WAVEFORM_SINE``, ``WAVEFORM_SAWTOOTH``, ``WAVEFORM_TRIANGLE``, ``WAVEFORM_SQUARE``, ``WAVEFORM_NOISE`` (randomly generated noise) (forma d'ona)\"\"\"\n fx: int\n \"\"\"Efecte a afegir al so, un dels seg\u00fcents valors: ``FX_TREMOLO``, ``FX_VIBRATO``, ``FX_WARBLE``, or ``FX_NONE`` (efecte)\"\"\"\n shape: int\n \"\"\"El tipus de corba d'interpolaci\u00f3 entre les freq\u00fc\u00e8ncies inicial i final, diferents formes d'ona tenen diferents r\u00e0tios de canvi en la freq\u00fc\u00e8ncia. Un dels seg\u00fcents valors: ``SHAPE_LINEAR``, ``SHAPE_CURVE``, ``SHAPE_LOG`` (forma)\"\"\"\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 \"\"\"Crea un efecte de so nou. (inicial)\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: (freq\u00fc\u00e8ncia inicial) Freq\u00fc\u00e8ncia inicial en Hertz (Hz), un nombre entre ``0`` i ``9999``.\n:param freq_end: (frequ\u00e8ncia final) Freq\u00fc\u00e8ncia final en Hertz (Hz), un nombre entre ``0`` i ``9999``.\n:param duration: (Durada - duraci\u00f3) Duraci\u00f3 del so en mil\u00b7lisegons, un nombre entre ``0`` i ``9999``.\n:param vol_start: (volum inicial) Valor del volum inicial, un nombre entre ``0`` i ``255``.\n:param vol_end: (volum final) Valor del volum final, un nombre entre ``0`` i ``255``.\n:param waveform: (forma d'ona) Tipus de forma d'ona, un d'aquests valors: ``WAVEFORM_SINE``, ``WAVEFORM_SAWTOOTH``, ``WAVEFORM_TRIANGLE``, ``WAVEFORM_SQUARE``, ``WAVEFORM_NOISE`` (soroll generat aleat\u00f2riament).\n:param fx: (efecte) Efecte a afegir al so, un del seg\u00fcents valors: ``FX_TREMOLO``, ``FX_VIBRATO``, ``FX_WARBLE``, or ``FX_NONE``.\n:param shape: (forma) El tipus de corba d'interpolaci\u00f3 entre les freq\u00fc\u00e8ncies inicial i final, diferents formes d'ona tenen diferents r\u00e0tios de canvi en la freq\u00fc\u00e8ncia. Un dels seg\u00fcents valors: ``SHAPE_LINEAR``, ``SHAPE_CURVE``, ``SHAPE_LOG``\"\"\"\n\n def copy(self) -> SoundEffect:\n \"\"\"Crea una c\u00f2pia d'aquest ``SoundEffect``. (c\u00f2pia)\n\nExample: ``sound_2 = sound_1.copy()``\n\n:return: A copy of the SoundEffect.\"\"\"\n\nclass AudioFrame:\n \"\"\"Un objecte ``AudioFrame`` \u00e9s una llista de 32 mostres cadascuna de les quals \u00e9s un byte sense signar\n(nombre enter entre 0 i 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 \"\"\"Sobreposa les dades d'aquest ``AudioFrame`` amb les dades d'una altra inst\u00e0ncia ``AudioFrame`` . (copia desde)\n\nExample: ``my_frame.copyfrom(source_frame)``\n\n:param other: (altre) ``AudioFrame`` inst\u00e0ncia de la qual copiar les dades.\"\"\"\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 ...", @@ -45,7 +45,7 @@ "/typeshed/stdlib/microbit/speaker.pyi": "\"\"\"Controla l'altaveu integrat (nom\u00e9s V2). (altaveu)\"\"\"\n\ndef off() -> None:\n \"\"\"Apaga l'altaveu.\n\nExample: ``speaker.off()``\n\nThis does not disable sound output to an edge connector pin.\"\"\"\n ...\n\ndef on() -> None:\n \"\"\"Enc\u00e9n l'altaveu.\n\nExample: ``speaker.on()``\"\"\"\n ...", "/typeshed/stdlib/microbit/spi.pyi": "\"\"\"Comunica amb dispositius mitjan\u00e7ant el bus d'interf\u00edcie perif\u00e8rica s\u00e8rie (SPI).\"\"\"\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 \"\"\"Inicialitzar la comunicaci\u00f3 SPI.\n\nExample: ``spi.init()``\n\nFor correct communication, the parameters have to be the same on both communicating devices.\n\n:param baudrate: (Velocitat de bauds) La velocitat de comunicaci\u00f3.\n:param bits: L'amplada en bits de cada transfer\u00e8ncia. Actualment nom\u00e9s ``bits=8`` \u00e9s acceptada . Tot i que aix\u00f2 pot canviar en el futur\n:param mode: Determina la combinaci\u00f3 de polaritat i fase del rellotge: `consulta la taula en l\u00ednia `_.\n:param sclk: pin sclk (per defecte 13)\n:param mosi: mosi pin (per defecte 15)\n:param miso: miso pin (per defecte 14)\"\"\"\n ...\n\ndef read(nbytes: int) -> bytes:\n \"\"\"Llegeix bytes (llegeix)\n\nExample: ``spi.read(64)``\n\n:param nbytes: Nombre m\u00e0xim de bytes per llegir.\n:return: The bytes read.\"\"\"\n ...\n\ndef write(buffer: ReadableBuffer) -> None:\n \"\"\"Escriu bytes al bus. (escriu)\n\nExample: ``spi.write(bytes([1, 2, 3]))``\n\n:param buffer: (mem\u00f2ria interm\u00e8dia) Una mem\u00f2ria interm\u00e8dia per a llegir dades.\"\"\"\n ...\n\ndef write_readinto(out: WriteableBuffer, in_: ReadableBuffer) -> None:\n \"\"\"Escriu la mem\u00f2ria interm\u00e8dia ``out`` al bus i llegeix qualsevol resposta a la mem\u00f2ria interm\u00e8dia ``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: La mem\u00f2ria interm\u00e8dia per a escriure qualsevol resposta.\n:param in_: La mem\u00f2ria interm\u00e8dia per a llegir dades.\"\"\"\n ...", "/typeshed/stdlib/microbit/uart.pyi": "\"\"\"Comunica amb un dispositiu mitjan\u00e7ant una interf\u00edcie s\u00e8rie.\"\"\"\nfrom _typeshed import WriteableBuffer\nfrom ..microbit import MicroBitDigitalPin\nfrom typing import Optional, Union\nODD: int\n\"\"\"Paritat senar (senar)\"\"\"\nEVEN: int\n\"\"\"Paritat parella (parell)\"\"\"\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 \"\"\"Inicialitzar la comunicaci\u00f3 en s\u00e8rie.\n\nExample: ``uart.init(115200, tx=pin0, rx=pin1)``\n\n:param baudrate: (Velocitat de bauds) La velocitat de comunicaci\u00f3.\n:param bits: La mida dels bytes que es transmeten. micro:bit nom\u00e9s n'admet 8.\n:param parity: (paritat) Com es verifica la paritat, ``None``, ``uart.ODD`` o ``uart.EVEN``.\n:param stop: (atura) El nombre de bits de parada ha de ser 1 per micro:bit.\n:param tx: Pin transmissor.\n:param rx: Receiving pin.\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 \"\"\"Verifica si hi ha alguna data esperant.\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 \"\"\"Llegeix bytes (llegeix)\n\nExample: ``uart.read()``\n\n:param nbytes: Si s'especifica ``nbytes``, llegeix com a m\u00e0xim tants bytes, en cas contrari llegeix tants bytes com sigui possible\n:return: A bytes object or ``None`` on timeout\"\"\"\n ...\n\ndef readinto(buf: WriteableBuffer, nbytes: Optional[int]=None) -> Optional[int]:\n \"\"\"Llegeix bytes al ``buf``.\n\nExample: ``uart.readinto(input_buffer)``\n\n:param buf: La mem\u00f2ria interm\u00e8dia a on escriure.\n:param nbytes: Si s'especifica ``nbytes``, llegeix com a m\u00e0xim aquests bytes, en cas contrari llegeix ``len(buf)`` bytes.\n:return: number of bytes read and stored into ``buf`` or ``None`` on timeout.\"\"\"\n ...\n\ndef readline() -> Optional[bytes]:\n \"\"\"Llegir una l\u00ednia que acaba en un car\u00e0cter de nova l\u00ednia.\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 \"\"\"Escriu una mem\u00f2ria interm\u00e8dia al bus (escriu)\n\nExample: ``uart.write('hello world')``\n\n:param buf: Un objecte 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", + "/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", "/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.de.json b/src/micropython/main/typeshed.de.json index 9835b2b1c..888956490 100644 --- a/src/micropython/main/typeshed.de.json +++ b/src/micropython/main/typeshed.de.json @@ -8,16 +8,16 @@ "/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 frozenset(AbstractSet[_T_co], Generic[_T_co]):\n @overload\n def __new__(cls: type[Self]) -> Self: ...\n @overload\n def __new__(cls: type[Self], __iterable: Iterable[_T_co]) -> Self: ...\n def copy(self) -> FrozenSet[_T_co]: ...\n def difference(self, *s: Iterable[object]) -> FrozenSet[_T_co]: ...\n def intersection(self, *s: Iterable[object]) -> FrozenSet[_T_co]: ...\n def isdisjoint(self, s: Iterable[_T_co]) -> bool: ...\n def issubset(self, s: Iterable[object]) -> bool: ...\n def issuperset(self, s: Iterable[object]) -> bool: ...\n def symmetric_difference(self, s: Iterable[_T_co]) -> FrozenSet[_T_co]: ...\n def union(self, *s: Iterable[_T_co]) -> FrozenSet[_T_co]: ...\n def __len__(self) -> int: ...\n def __contains__(self, o: object) -> bool: ...\n def __iter__(self) -> Iterator[_T_co]: ...\n def __str__(self) -> str: ...\n def __and__(self, s: AbstractSet[_T_co]) -> FrozenSet[_T_co]: ...\n def __or__(self, s: AbstractSet[_S]) -> FrozenSet[_T_co | _S]: ...\n def __sub__(self, s: AbstractSet[_T_co]) -> FrozenSet[_T_co]: ...\n def __xor__(self, s: AbstractSet[_S]) -> FrozenSet[_T_co | _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 if sys.version_info >= (3, 9):\n def __class_getitem__(cls, item: Any) -> GenericAlias: ...\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": "\"\"\"Steuerung des Garbage Collectors\"\"\"\nfrom typing import overload\n\ndef enable() -> None:\n \"\"\"Automatische Garbage Collection aktivieren.\"\"\"\n ...\n\ndef disable() -> None:\n \"\"\"Automatische Garbage Collection deaktivieren.\n\nHeap memory can still be allocated,\nand garbage collection can still be initiated manually using ``gc.collect``.\"\"\"\n\ndef collect() -> None:\n \"\"\"Garbage Collection ausf\u00fchren.\"\"\"\n ...\n\ndef mem_alloc() -> int:\n \"\"\"Ermittelt die Anzahl der dem Heap-Speicher zugewiesen Bytes.\n\n:return: The number of bytes allocated.\n\nThis function is MicroPython extension.\"\"\"\n ...\n\ndef mem_free() -> int:\n \"\"\"Gibt die Anzahl der Bytes des verf\u00fcgbaren dynamischen Speichers zur\u00fcck. -1 wird zur\u00fcckgegeben, wenn dieser Wert unbekannt ist.\n\n:return: The number of bytes free.\n\nThis function is MicroPython extension.\"\"\"\n ...\n\n@overload\ndef threshold() -> int:\n \"\"\"Den zus\u00e4tzlichen GC-Zuteilungsschwellwert abfragen.\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 \"\"\"Den zus\u00e4tzlichen GC-Schwellenwert festlegen.\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: Die Anzahl der Bytes, nach denen eine Garbage Collection ausgel\u00f6st werden soll.\"\"\"\n ...", - "/typeshed/stdlib/log.pyi": "\"\"\"Zeichne Daten auf deinem micro:bit V2 auf.\"\"\"\nfrom typing import Literal, Mapping, Optional, Union, overload\nMILLISECONDS = 1\n\"\"\"Millisekunden Zeitstempelformat. (millisekunden)\"\"\"\nSECONDS = 10\n\"\"\"Sekunden Zeitstempelformat. (sekunden)\"\"\"\nMINUTES = 600\n\"\"\"Minuten Zeitstempelformat. (minuten)\"\"\"\nHOURS = 36000\n\"\"\"Stunden Zeitstempelformat. (stunden)\"\"\"\nDAYS = 864000\n\"\"\"Tage Zeitstempelformat.\"\"\"\n\ndef set_labels(*labels: str, timestamp: Optional[Literal[1, 10, 36000, 864000]]=SECONDS) -> None:\n \"\"\"Den Logdatei-Header setzen (Beschriftungen festlegen)\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: Eine beliebige Anzahl von Positionsargumenten, die jeweils einem Eintrag in der Kopfzeile des Logs entsprechen.\n:param timestamp: W\u00e4hle die Zeitstempel-Einheit, die automatisch als erste Spalte in jeder Zeile hinzugef\u00fcgt wird. Der Zeitstempel kann einen der folgenden Werte annehmen: ``log.MILLISECONDS``, ``log.SECONDS``, ``log.MINUTES``, ``log.HOURS``, ``log.DAYS`` oder ``None``, um den Zeitstempel zu deaktivieren. Der Standardwert ist ``log.SECONDS``.\"\"\"\n ...\n\n@overload\ndef add(data_dictionary: Optional[Mapping[str, Union[str, int, float]]]) -> None:\n \"\"\"F\u00fcge dem Protokoll eine Datenzeile hinzu, indem du ein Dictionary mit Kopfzeileneintr\u00e4gen und Werten \u00fcbergibst. (hinzuf\u00fcgen)\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: (daten w\u00f6rterbuch) Die zu protokollierenden Daten in Form eines Dictionarys mit einem Schl\u00fcssel f\u00fcr jeden Kopfzeileneintrag.\"\"\"\n ...\n\n@overload\ndef add(**kwargs: Union[str, int, float]) -> None:\n \"\"\"F\u00fcge dem Protokoll eine Datenzeile mit Schl\u00fcsselw\u00f6rtern als Argumenten hinzu. (hinzuf\u00fcgen)\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 \"\"\"L\u00f6scht den Inhalt des Protokolls, einschlie\u00dflich der Kopfzeilen. (l\u00f6schen)\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: (vollst\u00e4ndig) Mit ``True`` wird ein \" vollst\u00e4ndiges\" L\u00f6schen und mit ``False`` die \"schnelle\" L\u00f6schmethode gew\u00e4hlt.\"\"\"\n ...\n\ndef set_mirroring(serial: bool):\n \"\"\"Richte die Spiegelung der Datenprotokollierung auf dem seriellen Ausgang ein. (spiegeln)\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: (seriell) ``True`` aktiviert die Spiegelung von Daten auf dem seriellen Ausgang.\"\"\"\n ...", + "/typeshed/stdlib/log.pyi": "\"\"\"Zeichne Daten auf deinem micro:bit V2 auf.\"\"\"\nfrom typing import Literal, Mapping, Optional, Union, overload\nMILLISECONDS = 1\n\"\"\"Millisekunden Zeitstempelformat. (millisekunden)\"\"\"\nSECONDS = 10\n\"\"\"Sekunden Zeitstempelformat. (sekunden)\"\"\"\nMINUTES = 600\n\"\"\"Minuten Zeitstempelformat. (minuten)\"\"\"\nHOURS = 36000\n\"\"\"Stunden Zeitstempelformat. (stunden)\"\"\"\nDAYS = 864000\n\"\"\"Tage Zeitstempelformat. (tage)\"\"\"\n\ndef set_labels(*labels: str, timestamp: Optional[Literal[1, 10, 36000, 864000]]=SECONDS) -> None:\n \"\"\"Den Logdatei-Header setzen (Beschriftungen festlegen)\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: Eine beliebige Anzahl von Positionsargumenten, die jeweils einem Eintrag in der Kopfzeile des Logs entsprechen.\n:param timestamp: (Zeitstempel) W\u00e4hle die Zeitstempel-Einheit, die automatisch als erste Spalte in jeder Zeile hinzugef\u00fcgt wird. Der Zeitstempel kann einen der folgenden Werte annehmen: ``log.MILLISECONDS``, ``log.SECONDS``, ``log.MINUTES``, ``log.HOURS``, ``log.DAYS`` oder ``None``, um den Zeitstempel zu deaktivieren. Der Standardwert ist ``log.SECONDS``.\"\"\"\n ...\n\n@overload\ndef add(data_dictionary: Optional[Mapping[str, Union[str, int, float]]]) -> None:\n \"\"\"F\u00fcge dem Protokoll eine Datenzeile hinzu, indem du ein Dictionary mit Kopfzeileneintr\u00e4gen und Werten \u00fcbergibst. (hinzuf\u00fcgen)\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: (daten w\u00f6rterbuch) Die zu protokollierenden Daten in Form eines Dictionarys mit einem Schl\u00fcssel f\u00fcr jeden Kopfzeileneintrag.\"\"\"\n ...\n\n@overload\ndef add(**kwargs: Union[str, int, float]) -> None:\n \"\"\"F\u00fcge dem Protokoll eine Datenzeile mit Schl\u00fcsselw\u00f6rtern als Argumenten hinzu. (hinzuf\u00fcgen)\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 \"\"\"L\u00f6scht den Inhalt des Protokolls, einschlie\u00dflich der Kopfzeilen. (l\u00f6schen)\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: (vollst\u00e4ndig) Mit ``True`` wird ein \" vollst\u00e4ndiges\" L\u00f6schen und mit ``False`` die \"schnelle\" L\u00f6schmethode gew\u00e4hlt.\"\"\"\n ...\n\ndef set_mirroring(serial: bool):\n \"\"\"Richte die Spiegelung der Datenprotokollierung auf dem seriellen Ausgang ein. (spiegeln)\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: (seriell) ``True`` aktiviert die Spiegelung von Daten auf dem seriellen Ausgang.\"\"\"\n ...", "/typeshed/stdlib/love.pyi": "def badaboom() -> None: ...\n", "/typeshed/stdlib/machine.pyi": "\"\"\"Low-Level-Utilities. (maschine)\"\"\"\nfrom typing import Any\nfrom .microbit import MicroBitDigitalPin\n\ndef unique_id() -> bytes:\n \"\"\"Liefert eine Byte-Zeichenkette mit einem eindeutigen Bezeichner f\u00fcr ein Board. (Eindeutige ID)\n\nExample: ``machine.unique_id()``\n\n:return: An identifier that varies from one board instance to another.\"\"\"\n ...\n\ndef reset() -> None:\n \"\"\"Setzt das Ger\u00e4t zur\u00fcck, als w\u00fcrde man die externe RESET-Taste dr\u00fcckt. (zur\u00fccksetzen)\n\nExample: ``machine.reset()``\"\"\"\n ...\n\ndef freq() -> int:\n \"\"\"Ermittelt die Taktfrequenz der CPU in Hertz.\n\nExample: ``machine.freq()``\n\n:return: The CPU frequency.\"\"\"\n ...\n\ndef disable_irq() -> Any:\n \"\"\"Deaktiviere Interrupt-Anforderungen. (IRQ deaktivieren)\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 \"\"\"Interrupt-Anfragen wieder aktivieren. (IRQ aktivieren)\n\nExample: ``machine.enable_irq(interrupt_state)``\n\n:param state: Der Wert, der beim letzten Aufruf der Funktion ``disable_irq`` zur\u00fcckgegeben wurde.\"\"\"\n ...\n\ndef time_pulse_us(pin: MicroBitDigitalPin, pulse_level: int, timeout_us: int=1000000) -> int:\n \"\"\"Gibt die Dauer eines Impulses an einem Pin zur\u00fcck. (zeitimpuls us)\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: Der zu verwendende Pin\n:param pulse_level: (pulsstufe) 0, um einen Low-Impuls oder 1, um einen High-Impuls zu messen\n:param timeout_us: Eine Verz\u00f6gerung in Mikrosekunden\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 \"\"\"Die Klasse f\u00fcr die ``mem8``, ``mem16`` und ``mem32`` Speicheranzeigen.\"\"\"\n\n def __getitem__(self, address: int) -> int:\n \"\"\"Greife auf einen Wert im Speicher zu.\n\n:param address: (adresse) Die Speicheradresse.\n:return: The value at that address as an integer.\"\"\"\n ...\n\n def __setitem__(self, address: int, value: int) -> None:\n \"\"\"Setzt einen Wert an der angegebenen Adresse.\n\n:param address: (adresse) Die Speicheradresse.\n:param value: (wert) Der zu setzende Integer-Wert.\"\"\"\n ...\nmem8: mem\n\"\"\"8-Bit (Byte) Ansicht des Speichers.\"\"\"\nmem16: mem\n\"\"\"16-Bit (Byte) Ansicht des Speichers.\"\"\"\nmem32: mem\n\"\"\"32-Bit (Byte) Ansicht des Speichers.\"\"\"", "/typeshed/stdlib/math.pyi": "\"\"\"Mathematische Funktionen.\"\"\"\nfrom typing import Tuple\n\ndef acos(x: float) -> float:\n \"\"\"Berechnet den Arkuskosinus.\n\nExample: ``math.acos(1)``\n\n:param x: Eine Zahl\n:return: The inverse cosine of ``x``\"\"\"\n ...\n\ndef asin(x: float) -> float:\n \"\"\"Berechnet den Arkussinus.\n\nExample: ``math.asin(0)``\n\n:param x: Eine Zahl\n:return: The inverse sine of ``x``\"\"\"\n ...\n\ndef atan(x: float) -> float:\n \"\"\"Berechnet den Arkustangens.\n\nExample: ``math.atan(0)``\n\n:param x: Eine Zahl\n:return: The inverse tangent of ``x``\"\"\"\n ...\n\ndef atan2(y: float, x: float) -> float:\n \"\"\"Berechnet den Hauptwert des Arkustangens von ``y/x``.\n\nExample: ``math.atan2(0, -1)``\n\n:param y: Eine Zahl\n:param x: Eine Zahl\n:return: The principal value of the inverse tangent of ``y/x``\"\"\"\n ...\n\ndef ceil(x: float) -> float:\n \"\"\"Rundet eine Zahl in Richtung positiver Unendlichkeit.\n\nExample: ``math.ceil(0.1)``\n\n:param x: Eine Zahl\n:return: ``x`` rounded towards positive infinity.\"\"\"\n ...\n\ndef copysign(x: float, y: float) -> float:\n \"\"\"Berechne ``x`` mit dem Vorzeichen von ``y``.\n\nExample: ``math.copysign(1, -1)``\n\n:param x: Eine Zahl\n:param y: Die Herkunft des Vorzeichens f\u00fcr den R\u00fcckgabewert\n:return: ``x`` with the sign of ``y``\"\"\"\n ...\n\ndef cos(x: float) -> float:\n \"\"\"Berechnet den Kosinus von ``x``.\n\nExample: ``math.cos(0)``\n\n:param x: Eine Zahl\n:return: The cosine of ``x``\"\"\"\n ...\n\ndef degrees(x: float) -> float:\n \"\"\"Wandelt Bogenma\u00df (Radiant) in Grad um.\n\nExample: ``math.degrees(2 * math.pi)``\n\n:param x: Ein Wert in Radiant\n:return: The value converted to degrees\"\"\"\n ...\n\ndef exp(x: float) -> float:\n \"\"\"Berechnet den Exponentialwert von ``x``.\n\nExample: ``math.exp(1)``\n\n:param x: Eine Zahl\n:return: The exponential of ``x``.\"\"\"\n ...\n\ndef fabs(x: float) -> float:\n \"\"\"Gibt den absoluten Wert von ``x`` zur\u00fcck.\n\nExample: ``math.fabs(-0.1)``\n\n:param x: Eine Zahl\n:return: The absolute value of ``x``\"\"\"\n ...\n\ndef floor(x: float) -> int:\n \"\"\"Rundet eine Zahl in Richtung negativer Unendlichkeit.\n\nExample: ``math.floor(0.9)``\n\n:param x: Eine Zahl\n:return: ``x`` rounded towards negative infinity.\"\"\"\n ...\n\ndef fmod(x: float, y: float) -> float:\n \"\"\"Berechne den Rest von ``x/y``.\n\nExample: ``math.fmod(10, 3)``\n\n:param x: Der Z\u00e4hler\n:param y: Der Nenner\"\"\"\n ...\n\ndef frexp(x: float) -> Tuple[float, int]:\n \"\"\"Zerlegt eine Gleitkommazahl in ihre Mantisse und ihren Exponenten.\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: Eine Flie\u00dfkommazahl\n:return: A tuple of length two containing its mantissa then exponent\"\"\"\n ...\n\ndef isfinite(x: float) -> bool:\n \"\"\"\u00dcberpr\u00fcft, ob ein Wert endlich ist.\n\nExample: ``math.isfinite(float('inf'))``\n\n:param x: Eine Zahl.\n:return: ``True`` if ``x`` is finite, ``False`` otherwise.\"\"\"\n ...\n\ndef isinf(x: float) -> bool:\n \"\"\"\u00dcberpr\u00fcft, ob ein Wert unendlich ist.\n\nExample: ``math.isinf(float('-inf'))``\n\n:param x: Eine Zahl.\n:return: ``True`` if ``x`` is infinite, ``False`` otherwise.\"\"\"\n ...\n\ndef isnan(x: float) -> bool:\n \"\"\"Pr\u00fcft, ob ein Wert keine Zahl (NaN ... Not A Number) ist.\n\nExample: ``math.isnan(float('nan'))``\n\n:param x: Eine Zahl\n:return: ``True`` if ``x`` is not-a-number (NaN), ``False`` otherwise.\"\"\"\n ...\n\ndef ldexp(x: float, exp: int) -> float:\n \"\"\"Berechne ``x * (2**exp)``.\n\nExample: ``math.ldexp(0.5, 2)``\n\n:param x: Eine Zahl\n:param exp: Ganzzahl-Exponent\n:return: ``x * (2**exp)``\"\"\"\n ...\n\ndef log(x: float, base: float=e) -> float:\n \"\"\"Berechnet den Logarithmus von ``x`` zur angegebenen Basis (standardm\u00e4\u00dfig den nat\u00fcrlichen Logarithmus).\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: Eine Zahl\n:param base: Die zu verwendende Basis\n:return: The natural logarithm of ``x``\"\"\"\n ...\n\ndef modf(x: float) -> Tuple[float, float]:\n \"\"\"Berechne die gebrochenen und ganzzahligen Teile von ``x``.\n\nExample: ``fractional, integral = math.modf(1.5)``\n\n:param x: Eine Zahl\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 \"\"\"Gibt ``x`` hoch ``y`` zur\u00fcck.\n\nExample: ``math.pow(4, 0.5)``\n\n:param x: Eine Zahl\n:param y: Der Exponent\n:return: ``x`` to the power of ``y``\"\"\"\n ...\n\ndef radians(x: float) -> float:\n \"\"\"Wandelt Grad in Bogenma\u00df (Radiant) um.\n\nExample: ``math.radians(360)``\n\n:param x: Ein Wert in Grad\n:return: The value converted to radians\"\"\"\n ...\n\ndef sin(x: float) -> float:\n \"\"\"Berechnet den Sinus von ``x``.\n\nExample: ``math.sin(math.pi/2)``\n\n:param x: Eine Zahl\n:return: The sine of ``x``\"\"\"\n ...\n\ndef sqrt(x: float) -> float:\n \"\"\"Berechnet die Quadratwurzel von ``x``.\n\nExample: ``math.sqrt(4)``\n\n:param x: Eine Zahl\n:return: The square root of ``x``\"\"\"\n ...\n\ndef tan(x: float) -> float:\n \"\"\"Berechnet den Tangens von ``x``.\n\nExample: ``math.tan(0)``\n\n:param x: Eine Zahl\n:return: The tangent of ``x``.\"\"\"\n ...\n\ndef trunc(x: float) -> int:\n \"\"\"Rundet eine Zahl gegen 0 ab.\n\nExample: ``math.trunc(-0.9)``\n\n:param x: Eine Zahl\n:return: ``x`` rounded towards zero.\"\"\"\n ...\ne: float\n\"\"\"Basis des nat\u00fcrlichen Logarithmus\"\"\"\npi: float\n\"\"\"Das Verh\u00e4ltnis des Umfangs eines Kreises zu seinem Durchmesser\"\"\"", "/typeshed/stdlib/micropython.pyi": "\"\"\"MicroPython Grundlagen.\"\"\"\nfrom typing import Any, TypeVar, overload\n_T = TypeVar('_T')\n\ndef const(expr: _T) -> _T:\n \"\"\"Wird verwendet, um zu deklarieren, dass der Ausdruck eine Konstante ist, damit der Compiler ihn optimieren kann.\n\nThe use of this function should be as follows::\n\n from micropython import const\n CONST_X = const(123)\n CONST_Y = const(2 * CONST_X + 1)\n\nConstants declared this way are still accessible as global variables from\noutside the module they are declared in. On the other hand, if a constant\nbegins with an underscore then it is hidden, it is not available as a\nglobal variable, and does not take up any memory during execution.\n\n:param expr: Ein konstant bleibender Ausdruck.\"\"\"\n ...\n\n@overload\ndef opt_level() -> int:\n \"\"\"Ermittelt die aktuelle Optimierungsstufe f\u00fcr die Kompilierung von Skripten.\n\nExample: ``micropython.opt_level()``\n\nThe optimisation level controls the following compilation features:\n\n- Assertions: at level 0 assertion statements are enabled and compiled\n into the bytecode; at levels 1 and higher assertions are not compiled.\n\n- Built-in ``__debug__`` variable: at level 0 this variable expands to\n True; at levels 1 and higher it expands to False.\n\n- Source-code line numbers: at levels 0, 1 and 2 source-code line number\n are stored along with the bytecode so that exceptions can report the\n line number they occurred at; at levels 3 and higher line numbers are\n not stored.\n\n:return: An integer representing the current level.\"\"\"\n ...\n\n@overload\ndef opt_level(level: int) -> None:\n \"\"\"Legt die Optimierungsstufe f\u00fcr die nachfolgende Kompilierung von Skripten fest.\n\nExample: ``micropython.opt_level(1)``\n\nThe optimisation level controls the following compilation features:\n\n- Assertions: at level 0 assertion statements are enabled and compiled\n into the bytecode; at levels 1 and higher assertions are not compiled.\n\n- Built-in ``__debug__`` variable: at level 0 this variable expands to\n True; at levels 1 and higher it expands to False.\n\n- Source-code line numbers: at levels 0, 1 and 2 source-code line number\n are stored along with the bytecode so that exceptions can report the\n line number they occurred at; at levels 3 and higher line numbers are\n not stored.\n\nThe default optimisation level is usually level 0.\n\n:param level: Eine ganzzahlige Optimierungsstufe.\"\"\"\n ...\n\ndef mem_info(verbose: Any=None) -> None:\n \"\"\"Gibt Informationen \u00fcber den aktuell verwendeten Speicher zur\u00fcck.\n\nExample: ``micropython.mem_info()``\n\n:param verbose: Wenn das Argument ``verbose`` angegeben wird, werden zus\u00e4tzliche Informationen ausgegeben.\"\"\"\n ...\n\ndef qstr_info(verbose: Any=None) -> None:\n \"\"\"Gibt Informationen zu aktuell eingebetteten Strings zur\u00fcck.\n\nExample: ``micropython.qstr_info()``\n\n:param verbose: Wenn das Argument ``verbose`` angegeben wird, werden zus\u00e4tzliche Informationen ausgegeben.\n\nThe information that is printed is implementation dependent, but currently\nincludes the number of interned strings and the amount of RAM they use. In\nverbose mode it prints out the names of all RAM-interned strings.\"\"\"\n ...\n\ndef stack_use() -> int:\n \"\"\"Gibt einen Integerwert zur\u00fcck, der dem aktuell verwendeten Stack-Speicher entspricht.\n\nExample: ``micropython.stack_use()``\n\nThe absolute value of this is not particularly useful, rather it\nshould be used to compute differences in stack usage at different points.\n\n:return: An integer representing current stack use.\"\"\"\n ...\n\ndef heap_lock() -> None:\n \"\"\"Heap-Speicher sperren.\n\nExample: ``micropython.heap_lock()``\n\nWhen locked no memory allocation can occur and a ``MemoryError`` will be\nraised if any heap allocation is attempted.\"\"\"\n ...\n\ndef heap_unlock() -> None:\n \"\"\"Heap-Speicher entsperren.\n\nExample: ``micropython.heap_unlock()``\n\nWhen locked no memory allocation can occur and a ``MemoryError`` will be\nraised if any heap allocation is attempted.\"\"\"\n ...\n\ndef kbd_intr(chr: int) -> None:\n \"\"\"Zeichen festlegen, das eine ``KeyboardInterrupt``-Exception ausl\u00f6st.\n\nExample: ``micropython.kbd_intr(-1)``\n\n:param chr: Zeichencode, um den Interrupt auszul\u00f6sen, oder -1, um die Erfassung von Ctrl-C zu deaktivieren.\n\nBy default this is set to 3 during script execution, corresponding to Ctrl-C.\nPassing -1 to this function will disable capture of Ctrl-C, and passing 3\nwill restore it.\n\nThis function can be used to prevent the capturing of Ctrl-C on the\nincoming stream of characters that is usually used for the REPL, in case\nthat stream is used for other purposes.\"\"\"\n ...", "/typeshed/stdlib/music.pyi": "\"\"\"Erstelle und spiele Lieder. (Musik)\"\"\"\nfrom typing import Optional, Tuple, Union, List\nfrom .microbit import MicroBitDigitalPin, pin0\nDADADADUM: Tuple[str, ...]\n\"\"\"Melodie: der Anfang von Beethovens 5. Symphonie in c-Moll. (dadadadaam)\"\"\"\nENTERTAINER: Tuple[str, ...]\n\"\"\"Melodie: die ersten Takte des Ragtime-Klassikers \"The Entertainer\" von Scott Joplin. (Entertainer)\"\"\"\nPRELUDE: Tuple[str, ...]\n\"\"\"Melodie: Beginn des ersten Pr\u00e4ludiums in C-Dur der 48 Pr\u00e4ludien und Fugen von J.S. Bach.\"\"\"\nODE: Tuple[str, ...]\n\"\"\"Melodie: Die \u201eOde an die Freude\u201c von Beethovens neunter Symphonie in d-Moll. (Ode)\"\"\"\nNYAN: Tuple[str, ...]\n\"\"\"Melodie: Die Nyan-Katze (http://www.nyan.cat/) (Nyan)\n\nThe composer is unknown. This is fair use for educational porpoises (as they say in New York).\"\"\"\nRINGTONE: Tuple[str, ...]\n\"\"\"Melodie: Etwas das wie ein Handy-Klingelton klingt. (Klingelton)\n\nTo be used to indicate an incoming message.\n\"\"\"\nFUNK: Tuple[str, ...]\n\"\"\"Melodie: eine funkige Basslinie f\u00fcr Geheimagenten und Superschurken. (Funk)\"\"\"\nBLUES: Tuple[str, ...]\n\"\"\"Melodie: ein 12-taktiger Boogie-Woogie-Blues mit Walking Bass. (Blues)\"\"\"\nBIRTHDAY: Tuple[str, ...]\n\"\"\"Melodie: \u201eAlles Gute zum Geburtstag\u2026\u201c (Geburtstag)\n\nFor copyright status see: http://www.bbc.co.uk/news/world-us-canada-34332853\n\"\"\"\nWEDDING: Tuple[str, ...]\n\"\"\"Melodie: der Hochzeitschor aus Wagners Oper \"Lohengrin\". (Hochzeit)\"\"\"\nFUNERAL: Tuple[str, ...]\n\"\"\"Melodie: der \"Trauermarsch\", auch bekannt als Fr\u00e9d\u00e9ric Chopins Klaviersonate Nr. 2 in b-Moll, op. 35. (Beerdigung)\"\"\"\nPUNCHLINE: Tuple[str, ...]\n\"\"\"Melodie: ein lustiges Fragment, das anzeigt, dass ein Scherz gemacht worden ist.\"\"\"\nPYTHON: Tuple[str, ...]\n\"\"\"Melodie: John Philip Sousas Marsch \"Liberty Bell\", auch bekannt als das Thema von \"Monty Python's Flying Circus\" (nach dem die Programmiersprache Python benannt ist).\"\"\"\nBADDY: Tuple[str, ...]\n\"\"\"Melodie: Auftritt eines Stummfilm-B\u00f6sewichts.\"\"\"\nCHASE: Tuple[str, ...]\n\"\"\"Melodie: Stummfilm-Verfolgungsszene.\"\"\"\nBA_DING: Tuple[str, ...]\n\"\"\"Melodie: ein kurzes Signal, um anzuzeigen, dass etwas passiert ist.\"\"\"\nWAWAWAWAA: Tuple[str, ...]\n\"\"\"Melody: Eine sehr traurige Posaune.\"\"\"\nJUMP_UP: Tuple[str, ...]\n\"\"\"Melodie: zur Verwendung in einem Spiel, um eine Aufw\u00e4rtsbewegung zu untermalen.\"\"\"\nJUMP_DOWN: Tuple[str, ...]\n\"\"\"Melodie: zur Verwendung in einem Spiel, um eine Abw\u00e4rtsbewegung zu untermalen.\"\"\"\nPOWER_UP: Tuple[str, ...]\n\"\"\"Melodie: eine Fanfare, die einen Erfolg anzeigt oder dass etwas freigeschalten wurde.\"\"\"\nPOWER_DOWN: Tuple[str, ...]\n\"\"\"Melodie: eine traurige Fanfare, wenn etwas nicht geklappt hat.\"\"\"\n\ndef set_tempo(ticks: int=4, bpm: int=120) -> None:\n \"\"\"Legt das ungef\u00e4hre Tempo f\u00fcr die Wiedergabe fest.\n\nExample: ``music.set_tempo(bpm=120)``\n\n:param ticks: Die Anzahl der Ticks in einem Beat.\n:param bpm: Ein Integerwert, der die Beats pro Minute angibt.\n\nSuggested default values allow the following useful behaviour:\n\n- music.set_tempo() \u2013 reset the tempo to default of ticks = 4, bpm = 120\n- music.set_tempo(ticks=8) \u2013 change the \u201cdefinition\u201d of a beat\n- music.set_tempo(bpm=180) \u2013 just change the tempo\n\nTo work out the length of a tick in milliseconds is very simple arithmetic:\n60000/bpm/ticks_per_beat. For the default values that\u2019s\n60000/120/4 = 125 milliseconds or 1 beat = 500 milliseconds.\"\"\"\n ...\n\ndef get_tempo() -> Tuple[int, int]:\n \"\"\"Gibt das aktuelle Tempo als Tupel von Integerwerten zur\u00fcck: ``(ticks, bpm)``.\n\nExample: ``ticks, beats = music.get_tempo()``\n\n:return: The temp as a tuple with two integer values, the ticks then the beats per minute.\"\"\"\n ...\n\ndef play(music: Union[str, List[str], Tuple[str, ...]], pin: Optional[MicroBitDigitalPin]=pin0, wait: bool=True, loop: bool=False) -> None:\n \"\"\"Spielt Musik.\n\nExample: ``music.play(music.NYAN)``\n\n:param music: (Musik) Musik, die in `einer speziellen Notation `_ angegeben ist\n:param pin: der Ausgangspin zur Verwendung mit einem externen Lautsprecher (Voreinstellung ``pin0``), ``None`` f\u00fcr keinen Ton.\n:param wait: Wenn ``wait`` auf ``True`` gesetzt ist, stoppt diese Funktion die weitere Codeausf\u00fchrung.\n:param loop: Wenn ``loop`` auf ``True`` gesetzt ist, wird die Melodie wiederholt, bis ``stop`` aufgerufen oder der blockierende Aufruf unterbrochen wird.\n\nMany built-in melodies are defined in this module.\"\"\"\n ...\n\ndef pitch(frequency: int, duration: int=-1, pin: Optional[MicroBitDigitalPin]=pin0, wait: bool=True) -> None:\n \"\"\"Musiknoten spielen (Tonh\u00f6he)\n\nExample: ``music.pitch(185, 1000)``\n\n:param frequency: (Frequenz) Eine ganzzahlige Frequenz\n:param duration: (Dauer) Eine Dauer in Millisekunden. Bei negativem Wert erh\u00e4lt man bis zum n\u00e4chsten Aufruf oder einem Aufruf von ``stop`` einen Dauerton.\n:param pin: Optionaler Ausgabepin (Standard ``pin0``).\n:param wait: Wenn ``wait`` auf ``True`` gesetzt ist, stoppt diese Funktion die weitere Codeausf\u00fchrung.\n\nFor example, if the frequency is set to 440 and the length to\n1000 then we hear a standard concert A for one second.\n\nYou can only play one pitch on one pin at any one time.\"\"\"\n ...\n\ndef stop(pin: Optional[MicroBitDigitalPin]=pin0) -> None:\n \"\"\"Stoppt die Musikwiedergabe \u00fcber den eingebauten Lautsprecher sowie jeden Pin, der Sound ausgibt.\n\nExample: ``music.stop()``\n\n:param pin: Ein optionales Argument kann zur Angabe eines Pins angegeben werden, z. B. ``music.stop(pin1)``.\"\"\"\n\ndef reset() -> None:\n \"\"\"Setzt Ticks, bpm, Dauer und Oktave auf ihre Standardwerte zur\u00fcck. (zur\u00fccksetzen)\n\nExample: ``music.reset()``\n\nValues:\n- ``ticks = 4``\n- ``bpm = 120``\n- ``duration = 4``\n- ``octave = 4``\"\"\"\n ...", - "/typeshed/stdlib/neopixel.pyi": "\"\"\"Individuell adressierbare RGB- und RGBW-LED-Streifen.\"\"\"\nfrom .microbit import MicroBitDigitalPin\nfrom typing import Tuple\n\nclass NeoPixel:\n\n def __init__(self, pin: MicroBitDigitalPin, n: int, bpp: int=3) -> None:\n \"\"\"Initialisierung eines neuen Streifens von Neopixel-LEDs, die \u00fcber einen Pin gesteuert werden.\n\nExample: ``np = neopixel.NeoPixel(pin0, 8)``\n\nTo support RGBW neopixels, a third argument can be passed to\n``NeoPixel`` to indicate the number of bytes per pixel (``bpp``).\nFor RGBW, this is is 4 rather than the default of 3 for RGB and GRB.\n\nEach pixel is addressed by a position (starting from 0). Neopixels are\ngiven RGB (red, green, blue) / RGBW (red, green, blue, white) values\nbetween 0-255 as a tuple. For example, in RGB, ``(255,255,255)`` is\nwhite. In RGBW, ``(255,255,255,0)`` or ``(0,0,0,255)`` is white.\n\nSee `the online docs `_ for warnings and other advice.\n\n:param pin: Der Pin, der den Neopixelstreifen steuert.\n:param n: Die Anzahl der Neopixel auf dem Streifen.\n:param bpp: Bytes pro Pixel. F\u00fcr die RGBW Neopixel-Unterst\u00fctzung, m\u00fcssen 4 statt der standardm\u00e4\u00dfigen 3 Bytes pro Pixel f\u00fcr RGB und GRB \u00fcbergeben werden.\"\"\"\n ...\n\n def clear(self) -> None:\n \"\"\"L\u00f6sche alle Pixel.\n\nExample: ``np.clear()``\"\"\"\n ...\n\n def show(self) -> None:\n \"\"\"Die Pixel anzeigen.\n\nExample: ``np.show()``\n\nMust be called for any updates to become visible.\"\"\"\n ...\n\n def write(self) -> None:\n \"\"\"Pixel anzeigen (nur micro:bit V2) (schreiben)\n\nExample: ``np.write()``\n\nMust be called for any updates to become visible.\n\nEquivalent to ``show``.\"\"\"\n ...\n\n def fill(self, colour: Tuple[int, ...]) -> None:\n \"\"\"Alle Pixel mit einem bestimmten RGB/RGBW-Wert f\u00e4rben.\n\nExample: ``np.fill((0, 0, 255))``\n\n:param colour: (Farbe) Ein Tupel mit der gleichen L\u00e4nge wie die Anzahl der Bytes pro Pixel (bpp).\n\nUse in conjunction with ``show()`` to update the neopixels.\"\"\"\n ...\n\n def __setitem__(self, key: int, value: Tuple[int, ...]) -> None:\n \"\"\"Eine Pixelfarbe festlegen.\n\nExample: ``np[0] = (255, 0, 0)``\n\n:param key: Die Pixelnummer.\n:param value: (wert) Die Farbe.\"\"\"\n\n def __getitem__(self, key: int) -> Tuple[int, ...]:\n \"\"\"Eine Pixelfarbe erfassen.\n\nExample: ``r, g, b = np[0]``\n\n:param key: Die Pixelnummer.\n:return: The colour tuple.\"\"\"\n\n def __len__(self) -> int:\n \"\"\"Liefert die L\u00e4nge des Pixelstreifens.\n\nExample: ``len(np)``\"\"\"", + "/typeshed/stdlib/neopixel.pyi": "\"\"\"Individuell adressierbare RGB- und RGBW-LED-Streifen.\"\"\"\nfrom .microbit import MicroBitDigitalPin\nfrom typing import Tuple\n\nclass NeoPixel:\n\n def __init__(self, pin: MicroBitDigitalPin, n: int, bpp: int=3) -> None:\n \"\"\"Initialisierung eines neuen Streifens von Neopixel-LEDs, die \u00fcber einen Pin gesteuert werden.\n\nExample: ``np = neopixel.NeoPixel(pin0, 8)``\n\nTo support RGBW neopixels, a third argument can be passed to\n``NeoPixel`` to indicate the number of bytes per pixel (``bpp``).\nFor RGBW, this is is 4 rather than the default of 3 for RGB and GRB.\n\nEach pixel is addressed by a position (starting from 0). Neopixels are\ngiven RGB (red, green, blue) / RGBW (red, green, blue, white) values\nbetween 0-255 as a tuple. For example, in RGB, ``(255,255,255)`` is\nwhite. In RGBW, ``(255,255,255,0)`` or ``(0,0,0,255)`` is white.\n\nSee `the online docs `_ for warnings and other advice.\n\n:param pin: Der Pin, der den Neopixelstreifen steuert.\n:param n: Die Anzahl der Neopixel auf dem Streifen.\n:param bpp: Bytes pro Pixel. F\u00fcr die RGBW Neopixel-Unterst\u00fctzung, m\u00fcssen 4 statt der standardm\u00e4\u00dfigen 3 Bytes pro Pixel f\u00fcr RGB und GRB \u00fcbergeben werden.\"\"\"\n ...\n\n def clear(self) -> None:\n \"\"\"L\u00f6sche alle Pixel. (l\u00f6schen)\n\nExample: ``np.clear()``\"\"\"\n ...\n\n def show(self) -> None:\n \"\"\"Die Pixel anzeigen.\n\nExample: ``np.show()``\n\nMust be called for any updates to become visible.\"\"\"\n ...\n\n def write(self) -> None:\n \"\"\"Pixel anzeigen (nur micro:bit V2) (schreiben)\n\nExample: ``np.write()``\n\nMust be called for any updates to become visible.\n\nEquivalent to ``show``.\"\"\"\n ...\n\n def fill(self, colour: Tuple[int, ...]) -> None:\n \"\"\"Alle Pixel mit einem bestimmten RGB/RGBW-Wert f\u00e4rben.\n\nExample: ``np.fill((0, 0, 255))``\n\n:param colour: (Farbe) Ein Tupel mit der gleichen L\u00e4nge wie die Anzahl der Bytes pro Pixel (bpp).\n\nUse in conjunction with ``show()`` to update the neopixels.\"\"\"\n ...\n\n def __setitem__(self, key: int, value: Tuple[int, ...]) -> None:\n \"\"\"Eine Pixelfarbe festlegen.\n\nExample: ``np[0] = (255, 0, 0)``\n\n:param key: Die Pixelnummer.\n:param value: (wert) Die Farbe.\"\"\"\n\n def __getitem__(self, key: int) -> Tuple[int, ...]:\n \"\"\"Eine Pixelfarbe erfassen.\n\nExample: ``r, g, b = np[0]``\n\n:param key: Die Pixelnummer.\n:return: The colour tuple.\"\"\"\n\n def __len__(self) -> int:\n \"\"\"Erhalte die L\u00e4nge des Pixelstreifens.\n\nExample: ``len(np)``\"\"\"", "/typeshed/stdlib/os.pyi": "\"\"\"Auf das Dateisystem zugreifen.\"\"\"\nfrom typing import Tuple\nfrom typing import List\n\ndef listdir() -> List[str]:\n \"\"\"Dateien auflisten.\n\nExample: ``os.listdir()``\n\n:return: A list of the names of all the files contained within the local\npersistent on-device file system.\"\"\"\n ...\n\ndef remove(filename: str) -> None:\n \"\"\"Entferne (l\u00f6sche) eine Datei. (Entfernen)\n\nExample: ``os.remove('data.txt')``\n\n:param filename: (Dateiname) Die zu l\u00f6schende Datei.\n\nIf the file does not exist an ``OSError`` exception will occur.\"\"\"\n ...\n\ndef size(filename: str) -> int:\n \"\"\"Gibt die Gr\u00f6\u00dfe einer Datei zur\u00fcck\n\nExample: ``os.size('data.txt')``\n\n:param filename: (Dateiname) Die Datei\n:return: The size in bytes.\n\nIf the file does not exist an ``OSError`` exception will occur.\"\"\"\n\nclass uname_result(Tuple[str, str, str, str, str]):\n \"\"\"Ergebnis von ``os.uname()``\"\"\"\n sysname: str\n \"\"\"Name des Betriebssystems.\"\"\"\n nodename: str\n \"\"\"Name des Rechners im Netz (durch die Implementierung definiert). (Knotenname)\"\"\"\n release: str\n \"\"\"Betriebssystemver\u00f6ffentlichung. (Ver\u00f6ffentlichung)\"\"\"\n version: str\n \"\"\"Betriebssystemversion. (Version)\"\"\"\n machine: str\n \"\"\"Hardware-Kennung. (maschine)\"\"\"\n\ndef uname() -> uname_result:\n \"\"\"Gibt Informationen zum aktuellen Betriebssystem zur\u00fcck.\n\nExample: ``os.uname()``\n\nThe return value is an object with five attributes:\n\n- ``sysname`` - operating system name\n- ``nodename`` - name of machine on network (implementation-defined)\n- ``release`` - operating system release\n- ``version`` - operating system version\n- ``machine`` - hardware identifier\n\nThere is no underlying operating system in MicroPython. As a result the\ninformation returned by the ``uname`` function is mostly useful for\nversioning details.\"\"\"\n ...", "/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": "\"\"\"Kommunikation zwischen micro:bits mit dem integrierten Funk.\"\"\"\nfrom _typeshed import WriteableBuffer\nfrom typing import Optional, Tuple\nRATE_1MBIT: int\n\"\"\"Konstante zur Angabe eines Durchsatzes von 1 MBit pro Sekunde.\"\"\"\nRATE_2MBIT: int\n\"\"\"Konstante zur Angabe eines Durchsatzes von 2 MBit pro Sekunde.\"\"\"\n\ndef on() -> None:\n \"\"\"Schaltet den Funk ein.\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 \"\"\"Schaltet den Funk aus, um Strom und Speicherplatz zu sparen.\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 \"\"\"Konfiguriert den Funk.\n\nExample: ``radio.config(group=42)``\n\nThe default configuration is suitable for most use.\n\n:param length: (default=32) legt die maximale L\u00e4nge einer \u00fcber Funk gesendeten Nachricht in Bytes fest. Sie kann bis zu 251 Bytes lang sein (254 - 3 Bytes f\u00fcr S0, LENGTH und S1-Pr\u00e4ambel).\n:param queue: (default=3) gibt die Anzahl der Nachrichten an, die in der Warteschlange f\u00fcr eingehende Nachrichten gespeichert werden k\u00f6nnen. Wenn in der Warteschlange kein Platz mehr f\u00fcr eingehende Nachrichten ist, wird die eingehende Nachricht verworfen.\n:param channel: (default=7) ein Integer-Wert zwischen 0 und 83 (einschlie\u00dflich), der einen beliebigen \"Kanal\" definiert, auf den der Funk eingestellt ist.\nNachrichten werden \u00fcber diesen Kanal gesendet und nur Nachrichten, die \u00fcber diesen Kanal empfangen werden, werden in die Warteschlange der eingehenden Nachricht aufgenommen. Jeder Schritt ist 1MHz breit, beginnend mit 2400MHz.\n:param power: (default=6) ist ein ganzzahliger Wert von 0 bis 7 (einschlie\u00dflich), der die St\u00e4rke des Signals angibt, das beim Senden einer Nachricht verwendet wird. Je h\u00f6her der Wert, desto st\u00e4rker ist das Signal, aber desto mehr Strom wird vom Ger\u00e4t verbraucht. Die Nummerierung entspricht den Positionen in der folgenden Liste von dBm-Werten (Dezibel Milliwatt): -30, -20, -16, -12, -8, -4, 0, 4.\n:param address: (adresse) (default=0x75626974) ein beliebiger Name, ausgedr\u00fcckt als 32-Bit-Adresse, der verwendet wird, um eingehende Pakete auf der Hardware-Ebene zu filtern und nur diejenigen zu behalten, die mit der eingestellten Adresse \u00fcbereinstimmen. \nDie Standardeinstellung, die von anderen micro:bit-verwandten Plattformen verwendet wird, wird auch hier verwendet.\n:param group: (default=0) ein 8-Bit-Wert (0-255), der zusammen mit ``address`` beim Filtern von Nachrichten verwendet wird. \"address\" ist wie eine Haus-/B\u00fcroadresse und \"group\" ist wie die Person an dieser Adresse, an die die Nachricht gesendet werden soll.\n:param data_rate: (default=``radio.RATE_1MBIT``) zeigt die Geschwindigkeit an, mit der der Datendurchsatz stattfindet.\nKann eine der folgenden Konstanten sein, die im Modul ``radio`` definiert sind: ``RATE_250KBIT``, ``RATE_1MBIT`` oder ``RATE_2MBIT``.\n\nIf ``config`` is not called then the defaults described above are assumed.\"\"\"\n ...\n\ndef reset() -> None:\n \"\"\"Setzt die Einstellungen auf ihre Standardwerte zur\u00fcck. (zur\u00fccksetzen)\n\nExample: ``radio.reset()``\n\nThe defaults as as per the ``config`` function above.\"\"\"\n ...\n\ndef send_bytes(message: bytes) -> None:\n \"\"\"Sendet eine Nachricht bestehend aus Bytes.\n\nExample: ``radio.send_bytes(b'hello')``\n\n:param message: Die zu sendenden Bytes.\"\"\"\n ...\n\ndef receive_bytes() -> Optional[bytes]:\n \"\"\"Empf\u00e4ngt die n\u00e4chste eingehende Nachricht in der Nachrichtenwarteschlange.\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 \"\"\"Kopiert die n\u00e4chste eingehende Nachricht in der Nachrichtenwarteschlange in einen Puffer.\n\nExample: ``radio.receive_bytes_info(buffer)``\n\n:param buffer: (Puffer) Der Zielpuffer. Die Nachricht wird abgeschnitten, wenn sie gr\u00f6\u00dfer als der Puffer ist.\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 \"\"\"Sendet eine Nachricht als String.\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: Der zu sendende String.\"\"\"\n ...\n\ndef receive() -> Optional[str]:\n \"\"\"Funktioniert genauso wie ``receive_bytes``, gibt aber zur\u00fcck, was gesendet wurde.\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 \"\"\"Gibt ein Tupel mit drei Werten zur\u00fcck, die die n\u00e4chste eingehende Nachricht in der Nachrichtenwarteschlange darstellen.\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/radio.pyi": "\"\"\"Kommunikation zwischen micro:bits mit dem integrierten Funk.\"\"\"\nfrom _typeshed import WriteableBuffer\nfrom typing import Optional, Tuple\nRATE_1MBIT: int\n\"\"\"Konstante zur Angabe eines Durchsatzes von 1 MBit pro Sekunde.\"\"\"\nRATE_2MBIT: int\n\"\"\"Konstante zur Angabe eines Durchsatzes von 2 MBit pro Sekunde.\"\"\"\n\ndef on() -> None:\n \"\"\"Schaltet den Funk ein. (an)\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 \"\"\"Schaltet den Funk aus, um Strom und Speicherplatz zu sparen.\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 \"\"\"Konfiguriert den Funk.\n\nExample: ``radio.config(group=42)``\n\nThe default configuration is suitable for most use.\n\n:param length: (default=32) legt die maximale L\u00e4nge einer \u00fcber Funk gesendeten Nachricht in Bytes fest. Sie kann bis zu 251 Bytes lang sein (254 - 3 Bytes f\u00fcr S0, LENGTH und S1-Pr\u00e4ambel).\n:param queue: (default=3) gibt die Anzahl der Nachrichten an, die in der Warteschlange f\u00fcr eingehende Nachrichten gespeichert werden k\u00f6nnen. Wenn in der Warteschlange kein Platz mehr f\u00fcr eingehende Nachrichten ist, wird die eingehende Nachricht verworfen.\n:param channel: (default=7) ein Integer-Wert zwischen 0 und 83 (einschlie\u00dflich), der einen beliebigen \"Kanal\" definiert, auf den der Funk eingestellt ist.\nNachrichten werden \u00fcber diesen Kanal gesendet und nur Nachrichten, die \u00fcber diesen Kanal empfangen werden, werden in die Warteschlange der eingehenden Nachricht aufgenommen. Jeder Schritt ist 1MHz breit, beginnend mit 2400MHz.\n:param power: (default=6) ist ein ganzzahliger Wert von 0 bis 7 (einschlie\u00dflich), der die St\u00e4rke des Signals angibt, das beim Senden einer Nachricht verwendet wird. Je h\u00f6her der Wert, desto st\u00e4rker ist das Signal, aber desto mehr Strom wird vom Ger\u00e4t verbraucht. Die Nummerierung entspricht den Positionen in der folgenden Liste von dBm-Werten (Dezibel Milliwatt): -30, -20, -16, -12, -8, -4, 0, 4.\n:param address: (adresse) (default=0x75626974) ein beliebiger Name, ausgedr\u00fcckt als 32-Bit-Adresse, der verwendet wird, um eingehende Pakete auf der Hardware-Ebene zu filtern und nur diejenigen zu behalten, die mit der eingestellten Adresse \u00fcbereinstimmen. \nDie Standardeinstellung, die von anderen micro:bit-verwandten Plattformen verwendet wird, wird auch hier verwendet.\n:param group: (default=0) ein 8-Bit-Wert (0-255), der zusammen mit ``address`` beim Filtern von Nachrichten verwendet wird. \"address\" ist wie eine Haus-/B\u00fcroadresse und \"group\" ist wie die Person an dieser Adresse, an die die Nachricht gesendet werden soll.\n:param data_rate: (default=``radio.RATE_1MBIT``) zeigt die Geschwindigkeit an, mit der der Datendurchsatz stattfindet.\nKann eine der folgenden Konstanten sein, die im Modul ``radio`` definiert sind: ``RATE_250KBIT``, ``RATE_1MBIT`` oder ``RATE_2MBIT``.\n\nIf ``config`` is not called then the defaults described above are assumed.\"\"\"\n ...\n\ndef reset() -> None:\n \"\"\"Setzt die Einstellungen auf ihre Standardwerte zur\u00fcck. (zur\u00fccksetzen)\n\nExample: ``radio.reset()``\n\nThe defaults as as per the ``config`` function above.\"\"\"\n ...\n\ndef send_bytes(message: bytes) -> None:\n \"\"\"Sendet eine Nachricht bestehend aus Bytes.\n\nExample: ``radio.send_bytes(b'hello')``\n\n:param message: Die zu sendenden Bytes.\"\"\"\n ...\n\ndef receive_bytes() -> Optional[bytes]:\n \"\"\"Empf\u00e4ngt die n\u00e4chste eingehende Nachricht in der Nachrichtenwarteschlange.\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 \"\"\"Kopiert die n\u00e4chste eingehende Nachricht in der Nachrichtenwarteschlange in einen Puffer.\n\nExample: ``radio.receive_bytes_info(buffer)``\n\n:param buffer: (Puffer) Der Zielpuffer. Die Nachricht wird abgeschnitten, wenn sie gr\u00f6\u00dfer als der Puffer ist.\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 \"\"\"Sendet eine Nachricht als String.\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: Der zu sendende String.\"\"\"\n ...\n\ndef receive() -> Optional[str]:\n \"\"\"Funktioniert genauso wie ``receive_bytes``, gibt aber zur\u00fcck, was gesendet wurde.\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 \"\"\"Gibt ein Tupel mit drei Werten zur\u00fcck, die die n\u00e4chste eingehende Nachricht in der Nachrichtenwarteschlange darstellen.\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": "\"\"\"Gibt eine Zufallszahl zur\u00fcck.\"\"\"\nfrom typing import TypeVar, Sequence, Union, overload\n\ndef getrandbits(n: int) -> int:\n \"\"\"Erzeugt einen Integerwert mit ``n`` zuf\u00e4lligen Bits.\n\nExample: ``random.getrandbits(1)``\n\n:param n: Ein Wert zwischen 1-30 (einschlie\u00dflich).\"\"\"\n ...\n\ndef seed(n: int) -> None:\n \"\"\"Initialisiert den Zufallszahlengenerator.\n\nExample: ``random.seed(0)``\n\n:param n: Der Integer-Seed\n\nThis will give you reproducibly deterministic randomness from a given starting\nstate (``n``).\"\"\"\n ...\n\ndef randint(a: int, b: int) -> int:\n \"\"\"W\u00e4hlt eine zuf\u00e4llige Ganzzahl zwischen ``a`` und ``b`` (einschlie\u00dflich) aus.\n\nExample: ``random.randint(0, 9)``\n\n:param a: Anfangswert f\u00fcr den Bereich (inklusiv)\n:param b: Endwert f\u00fcr den Bereich (inklusiv)\n\nAlias for ``randrange(a, b + 1)``.\"\"\"\n ...\n\n@overload\ndef randrange(stop: int) -> int:\n \"\"\"W\u00e4hlt eine zuf\u00e4llige Ganzzahl zwischen Null und ``stop`` (exklusiv) aus.\n\nExample: ``random.randrange(10)``\n\n:param stop: Endwert f\u00fcr den Bereich (exklusiv)\"\"\"\n ...\n\n@overload\ndef randrange(start: int, stop: int, step: int=1) -> int:\n \"\"\"W\u00e4hlt ein zuf\u00e4lliges Element aus ``range(start, stop, step)``.\n\nExample: ``random.randrange(0, 10)``\n\n:param start: Anfang des Bereichs (inklusiv)\n:param stop: Das Ende des Bereichs (exklusiv)\n:param step: Schrittweite\"\"\"\n ...\n_T = TypeVar('_T')\n\ndef choice(seq: Sequence[_T]) -> _T:\n \"\"\"W\u00e4hlt ein zuf\u00e4lliges Element aus der nicht leeren Sequenz ``seq``.\n\nExample: ``random.choice([Image.HAPPY, Image.SAD])``\n\n:param seq: Eine Sequenz.\n\nIf ``seq`` is empty, raises ``IndexError``.\"\"\"\n ...\n\ndef random() -> float:\n \"\"\"Erzeugt eine zuf\u00e4llige Flie\u00dfkommazahl im Bereich [0.0, 1.0).\n\nExample: ``random.random()``\n\n:return: The random floating point number\"\"\"\n ...\n\ndef uniform(a: float, b: float) -> float:\n \"\"\"Gibt eine zuf\u00e4llige Flie\u00dfkommazahl zwischen ``a`` und ``b`` inklusiv aus.\n\nExample: ``random.uniform(0, 9)``\n\n:param a: Anfangswert f\u00fcr den Bereich (inklusiv)\n:param b: Endwert f\u00fcr den Bereich (inklusiv)\"\"\"\n ...", "/typeshed/stdlib/speech.pyi": "\"\"\"Bringe den micro:bit dazu zu Sprechen, zu Singen und andere sprach\u00e4hnliche Ger\u00e4usche zu machen.\"\"\"\nfrom typing import Optional\nfrom .microbit import MicroBitDigitalPin, pin0\n\ndef translate(words: str) -> str:\n \"\"\"\u00dcbersetze englische W\u00f6rter in Sprache.\n\nExample: ``speech.translate('hello world')``\n\n:param words: (W\u00f6rter) Ein String englischer W\u00f6rter.\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 \"\"\"Laute aussprechen.\n\nExample: ``speech.pronounce(' /HEHLOW WERLD')``\n\n:param phonemes: (Phoneme) Die auszusprechenden Phoneme als Zeichenkette\n:param pitch: (Tonh\u00f6he) Eine Zahl, die die Tonh\u00f6he der Stimme angibt\n:param speed: (tempo) Eine Zahl, die die Geschwindigkeit der Stimme angibt\n:param mouth: (Mund) Eine Zahl, die den Mund der Stimme repr\u00e4sentiert\n:param throat: (klang) Eine Zahl, die den Klang der Stimme angibt\n:param pin: Optionales Argument, um den Ausgangspin anzugeben, kann verwendet werden, um den Standardwert von ``pin0`` zu \u00fcberschreiben. Wenn wir keinen Ton \u00fcber die Pins abspielen wollen, k\u00f6nnen wir ``pin=None`` verwenden. nur micro:bit V2.\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 \"\"\"Sage englische W\u00f6rter (sage)\n\nExample: ``speech.say('hello world')``\n\n:param words: (W\u00f6rter) Der zu sagene String\n:param pitch: (Tonh\u00f6he) Eine Zahl, die die Tonh\u00f6he der Stimme angibt\n:param speed: (tempo) Eine Zahl, die die Geschwindigkeit der Stimme angibt\n:param mouth: (Mund) Eine Zahl, die den Mund der Stimme repr\u00e4sentiert\n:param throat: (klang) Eine Zahl, die den Klang der Stimme angibt\n:param pin: Optionales Argument, um den Ausgangspin anzugeben, kann verwendet werden, um den Standardwert von ``pin0`` zu \u00fcberschreiben. Wenn wir keinen Ton \u00fcber die Pins abspielen wollen, k\u00f6nnen wir ``pin=None`` verwenden. nur micro:bit V2.\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 \"\"\"Singe Phoneme\n\nExample: ``speech.sing(' /HEHLOW WERLD')``\n\n:param phonemes: (Phoneme) Der zu singende String\n:param pitch: (Tonh\u00f6he) Eine Zahl, die die Tonh\u00f6he der Stimme angibt\n:param speed: (tempo) Eine Zahl, die die Geschwindigkeit der Stimme angibt\n:param mouth: (Mund) Eine Zahl, die den Mund der Stimme repr\u00e4sentiert\n:param throat: (klang) Eine Zahl, die den Klang der Stimme angibt\n:param pin: Optionales Argument, um den Ausgangspin anzugeben, kann verwendet werden, um den Standardwert von ``pin0`` zu \u00fcberschreiben. Wenn wir keinen Ton \u00fcber die Pins abspielen wollen, k\u00f6nnen wir ``pin=None`` verwenden. nur micro:bit V2.\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": "\"\"\"Packe und entpacke primitive Datentypen. (struktur)\"\"\"\nfrom _typeshed import ReadableBuffer, WriteableBuffer\nfrom typing import Any, Tuple, Union\n\ndef calcsize(fmt: str) -> int:\n \"\"\"Rufe die Anzahl der ben\u00f6tigten Bytes ab, um den angegebenen ``fmt`` zu speichern.\n\nExample: ``struct.calcsize('hf')``\n\n:param fmt: Ein Format-String.\n:return The number of bytes needed to store such a value.\"\"\"\n ...\n\ndef pack(fmt: str, v1: Any, *vn: Any) -> bytes:\n \"\"\"Werte nach einem Format-String packen. (packen)\n\nExample: ``struct.pack('hf', 1, 3.1415)``\n\n:param fmt: Der Formatstring\n:param v1: Der erste Wert.\n:param *vn: Die verbleibenden Werte.\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 \"\"\"Werte nach einem Format-String packen. (packen in)\n\nExample: ``struct.pack_info('hf', buffer, 1, 3.1415)``\n\n:param fmt: Der Formatstring\n:param buffer: (Puffer) Der Buffer, in den geschrieben werden soll.\n:param offset: Der Offset in den Puffer. Kann negativ sein, um vom Ende des Puffers aus zu z\u00e4hlen.\n:param v1: Der erste Wert.\n:param *vn: Die verbleibenden Werte.\"\"\"\n ...\n\ndef unpack(fmt: str, data: ReadableBuffer) -> Tuple[Any, ...]:\n \"\"\"Daten nach einem Format-String entpacken.\n\nExample: ``v1, v2 = struct.unpack('hf', buffer)``\n\n:param fmt: Der Formatstring\n:param data: (Daten) Die Daten.\n:return: A tuple of the unpacked values.\"\"\"\n ...\n\ndef unpack_from(fmt: str, buffer: ReadableBuffer, offset: int=0) -> Tuple:\n \"\"\"Daten aus einem Puffer nach einem Format-String entpacken. (entpacken von)\n\nExample: ``v1, v2 = struct.unpack_from('hf', buffer)``\n\n:param fmt: Der Formatstring\n:param buffer: (Puffer) Der Quellpuffer, von dem gelesen werden soll.\n:param offset: Der Offset in den Puffer. Kann negativ sein, um vom Ende des Puffers aus zu z\u00e4hlen.\n:return: A tuple of the unpacked values.\"\"\"\n ...", @@ -34,18 +34,18 @@ "/typeshed/stdlib/ustruct.pyi": "from struct import *\n", "/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/microbit/__init__.pyi": "\"\"\"Pins, Bilder, T\u00f6ne, Temperatur und Lautst\u00e4rke.\"\"\"\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 \"\"\"Plant die Ausf\u00fchrung einer Funktion in dem durch die Zeitargumente festgelegten Intervall **nur V2**.\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: Funktion, die in dem angegebenen Intervall aufgerufen wird. Bei Verwendung als Dekorator weglassen.\n:param days: Legt den Tag f\u00fcr die Planung fest.\n:param h: Legt die Uhrzeit f\u00fcr die Planung fest.\n:param min: Legt die Minute f\u00fcr die Planung fest.\n:param s: Legt die Sekunde f\u00fcr die Planung fest.\n:param ms: Legt die Millisekunde f\u00fcr die Planung fest.\"\"\"\n\ndef panic(n: int) -> None:\n \"\"\"In einen Panik-Modus wechseln.\n\nExample: ``panic(127)``\n\n:param n: Eine beliebige ganze Zahl <= 255, um einen Status anzugeben.\n\nRequires restart.\"\"\"\n\ndef reset() -> None:\n \"\"\"Board neu starten.\"\"\"\n\n@overload\ndef scale(value: float, from_: Tuple[float, float], to: Tuple[int, int]) -> int:\n \"\"\"Konvertiert einen Wert aus einem Bereich in einen Ganzzahlenbereich.\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: (wert) Eine umzurechnende Zahl.\n:param from_: Ein Tupel, das den Bereich definiert, aus dem konvertiert werden soll.\n:param to: Ein Tupel, das den Bereich definiert, in den konvertiert werden soll.\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 \"\"\"Konvertiert einen Wert von einem Bereich in einen Gleitkommabereich.\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: Eine umzurechnende Zahl.\n:param from_: Ein Tupel, das den Bereich definiert, aus dem konvertiert werden soll.\n:param to: Ein Tupel, das den Bereich definiert, in den konvertiert werden soll.\n:return: The ``value`` converted to the ``to`` range.\"\"\"\n\ndef sleep(n: float) -> None:\n \"\"\"Warte auf ``n`` Millisekunden.\n\nExample: ``sleep(1000)``\n\n:param n: Die Anzahl der zu wartenden Millisekunden\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 \"\"\"Ermittelt die Laufzeit des Boards.\n\n:return: The number of milliseconds since the board was switched on or restarted.\"\"\"\n\ndef temperature() -> int:\n \"\"\"Ermittelt die Temperatur des micro:bit in Grad Celcius.\"\"\"\n\ndef set_volume(v: int) -> None:\n \"\"\"Legt die Lautst\u00e4rke fest.\n\nExample: ``set_volume(127)``\n\n:param v: ein Wert zwischen 0 (niedrig) und 255 (hoch).\n\nOut of range values will be clamped to 0 or 255.\n\n**V2** only.\"\"\"\n ...\n\nclass Button:\n \"\"\"Die Klasse f\u00fcr die Tasten ``button_a`` und ``button_b``.\"\"\"\n\n def is_pressed(self) -> bool:\n \"\"\"\u00dcberpr\u00fcft, ob die Taste gedr\u00fcckt ist.\n\n:return: ``True`` if the specified button ``button`` is pressed, and ``False`` otherwise.\"\"\"\n ...\n\n def was_pressed(self) -> bool:\n \"\"\"\u00dcberpr\u00fcft, ob die Taste seit dem Start des Ger\u00e4ts oder dem letzten Aufruf dieser Methode gedr\u00fcckt wurde.\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 \"\"\"Ermittelt die Gesamtzahl der Tastendr\u00fccke und setzt diese Summe auf Null zur\u00fcck, bevor sie zur\u00fcckgegeben wird.\n\n:return: The number of presses since the device started or the last time this method was called\"\"\"\n ...\nbutton_a: Button\n\"\"\"Das ``Button``-Objekt der linken Taste.\"\"\"\nbutton_b: Button\n\"\"\"Das ``Button``-Objekt der rechten Taste.\"\"\"\n\nclass MicroBitDigitalPin:\n \"\"\"Ein digitaler Pin.\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 \"\"\"Ermittelt den digitalen Wert des Pins.\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 \"\"\"Stellt den digitalen Wert des Pins ein. (digital schreiben)\n\nExample: ``pin0.write_digital(1)``\n\n:param value: (wert) 1, um den Pin zu aktivieren, oder 0, um den Pin zu deaktivieren\"\"\"\n ...\n\n def set_pull(self, value: int) -> None:\n \"\"\"Setze den Status des Pull-Widerstands auf einen von drei m\u00f6glichen Werten: ``PULL_UP``, ``PULL_DOWN`` oder ``NO_PULL``. (setze Pull-Widerstand)\n\nExample: ``pin0.set_pull(pin0.PULL_UP)``\n\n:param value: (wert) Der Status des Pull-Widerstands vom relevanten Pin, z.B. ``pin0.PULL_UP``.\"\"\"\n ...\n\n def get_pull(self) -> int:\n \"\"\"Abrufen des Status des Pull-Widerstands eines Pins. (gib Pull-Widerstand)\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 \"\"\"Gibt den Pin-Modus zur\u00fcck. (gib Pin-Modus)\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 \"\"\"Erzeugt ein PWM-Signal am Pin mit der Einschaltdauer proportional zu ``value``. (analog schreiben)\n\nExample: ``pin0.write_analog(254)``\n\n:param value: (wert) Eine Ganzzahl oder eine Gleitpunktzahl zwischen 0 (0% Einschaltdauer) und 1023 (100% Einschaltdauer).\"\"\"\n\n def set_analog_period(self, period: int) -> None:\n \"\"\"Setzt die Periodendauer des PWM-Signals, das ausgegeben wird, auf ``period`` in Millisekunden. (setze analoge Periodendauer)\n\nExample: ``pin0.set_analog_period(10)``\n\n:param period: (Periodendauer) Der Periodendauer in Millisekunden mit einem Mindestwert von 1ms.\"\"\"\n\n def set_analog_period_microseconds(self, period: int) -> None:\n \"\"\"Setze die Periodendauer f\u00fcr die Ausgabe des PWM-Signals auf ``period`` in Mikrosekunden. (setze analoge Periodendauer)\n\nExample: ``pin0.set_analog_period_microseconds(512)``\n\n:param period: (Periodendauer) Die Periodendauer in Mikrosekunden mit einem Mindestwert von 256\u03bcs.\"\"\"\n\nclass MicroBitAnalogDigitalPin(MicroBitDigitalPin):\n \"\"\"Ein Pin, der analogen und digitalen Signale erlaubt.\"\"\"\n\n def read_analog(self) -> int:\n \"\"\"Einlesen der Spannung, die am Pin anliegt. (analog lesen)\n\nExample: ``pin0.read_analog()``\n\n:return: An integer between 0 (meaning 0V) and 1023 (meaning 3.3V).\"\"\"\n\nclass MicroBitTouchPin(MicroBitAnalogDigitalPin):\n \"\"\"Ein Pin mit analogen, digitalen und Touchfunktionen.\"\"\"\n CAPACITIVE: int\n RESISTIVE: int\n\n def is_touched(self) -> bool:\n \"\"\"\u00dcberpr\u00fcft, ob der Pin ber\u00fchrt wird. (wird ber\u00fchrt)\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 \"\"\"Legt den Touchmodus f\u00fcr den Pin fest. (definiert Ber\u00fchrungsmodus)\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: (wert) ``CAPACITIVE`` oder ``RESISTIVE`` Touchmodus des entsprechenden Pins.\"\"\"\n ...\npin0: MicroBitTouchPin\n\"\"\"Pin mit digitalen, analogen und Touchfunktionen.\"\"\"\npin1: MicroBitTouchPin\n\"\"\"Pin mit digitalen, analogen und Touchfunktionen.\"\"\"\npin2: MicroBitTouchPin\n\"\"\"Pin mit digitalen, analogen und Touchfunktionen.\"\"\"\npin3: MicroBitAnalogDigitalPin\n\"\"\"Pin mit digitalen und analogen Funktionen.\"\"\"\npin4: MicroBitAnalogDigitalPin\n\"\"\"Pin mit digitalen und analogen Funktionen.\"\"\"\npin5: MicroBitDigitalPin\n\"\"\"Pin mit Unterst\u00fctzung f\u00fcr digitale Signale.\"\"\"\npin6: MicroBitDigitalPin\n\"\"\"Pin mit Unterst\u00fctzung f\u00fcr digitale Signale.\"\"\"\npin7: MicroBitDigitalPin\n\"\"\"Pin mit digitalen Funktionen.\"\"\"\npin8: MicroBitDigitalPin\n\"\"\"Pin mit digitalen Funktionen.\"\"\"\npin9: MicroBitDigitalPin\n\"\"\"Pin mit digitalen Funktionen.\"\"\"\npin10: MicroBitAnalogDigitalPin\n\"\"\"Pin mit digitalen und analogen Funktionen.\"\"\"\npin11: MicroBitDigitalPin\n\"\"\"Pin mit digitalen Funktionen.\"\"\"\npin12: MicroBitDigitalPin\n\"\"\"Pin mit digitalen Funktionen.\"\"\"\npin13: MicroBitDigitalPin\n\"\"\"Pin mit digitalen Funktionen.\"\"\"\npin14: MicroBitDigitalPin\n\"\"\"Pin mit digitalen Funktionen.\"\"\"\npin15: MicroBitDigitalPin\n\"\"\"Pin mit digitalen Funktionen.\"\"\"\npin16: MicroBitDigitalPin\n\"\"\"Pin mit digitalen Funktionen.\"\"\"\npin19: MicroBitDigitalPin\n\"\"\"Pin mit digitalen Funktionen.\"\"\"\npin20: MicroBitDigitalPin\n\"\"\"Pin mit digitalen Funktionen.\"\"\"\npin_logo: MicroBitTouchPin\n\"\"\"Ein ber\u00fchrungsempfindlicher Logo-Pin auf der Vorderseite des micro:bit, der standardm\u00e4\u00dfig auf den kapazitiven Touch-Modus eingestellt ist.\"\"\"\npin_speaker: MicroBitAnalogDigitalPin\n\"\"\"Ein Pin zur Ansteuerung des micro:bit Lautsprechers.\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 \"\"\"Ein Bild, das auf dem micro:bit LED-Display angezeigt werden soll.\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 \"\"\"Herz-Bild.\"\"\"\n HEART_SMALL: Image\n \"\"\"Kleines Herz-Bild.\"\"\"\n HAPPY: Image\n \"\"\"Gl\u00fcckliches Gesichtsbild.\"\"\"\n SMILE: Image\n \"\"\"L\u00e4chelndes Gesichtsbild.\"\"\"\n SAD: Image\n \"\"\"Trauriges Gesichtsbild.\"\"\"\n CONFUSED: Image\n \"\"\"Verwirrtes Gesichtsbild.\"\"\"\n ANGRY: Image\n \"\"\"W\u00fctendes Gesichtsbild.\"\"\"\n ASLEEP: Image\n \"\"\"Schlafendes Gesichtsbild.\"\"\"\n SURPRISED: Image\n \"\"\"\u00dcberraschtes Gesichtsbild.\"\"\"\n SILLY: Image\n \"\"\"Albernes Gesichtsbild.\"\"\"\n FABULOUS: Image\n \"\"\"Bild mit Sonnenbrillengesicht. (fabelhaft)\"\"\"\n MEH: Image\n \"\"\"Gleichg\u00fcltiges Gesicht Bild.\"\"\"\n YES: Image\n \"\"\"abgehakt-Bild\"\"\"\n NO: Image\n \"\"\"angekreuzt-Bild\"\"\"\n CLOCK12: Image\n \"\"\"Bild mit Linie, die auf 12 Uhr zeigt.\"\"\"\n CLOCK11: Image\n \"\"\"Bild mit Linie, die auf 11 Uhr zeigt.\"\"\"\n CLOCK10: Image\n \"\"\"Bild mit Linie, die auf 10 Uhr zeigt.\"\"\"\n CLOCK9: Image\n \"\"\"Bild mit Linie, die auf 9 Uhr zeigt.\"\"\"\n CLOCK8: Image\n \"\"\"Bild mit Linie, die auf 8 Uhr zeigt.\"\"\"\n CLOCK7: Image\n \"\"\"Bild mit Linie, die auf 7 Uhr zeigt.\"\"\"\n CLOCK6: Image\n \"\"\"Bild mit Linie, die auf 6 Uhr zeigt.\"\"\"\n CLOCK5: Image\n \"\"\"Bild mit Linie, die auf 5 Uhr zeigt.\"\"\"\n CLOCK4: Image\n \"\"\"Bild mit Linie, die auf 4 Uhr zeigt.\"\"\"\n CLOCK3: Image\n \"\"\"Bild mit Linie, die auf 3 Uhr zeigt.\"\"\"\n CLOCK2: Image\n \"\"\"Bild mit Linie, die auf 2 Uhr zeigt.\"\"\"\n CLOCK1: Image\n \"\"\"Bild mit Linie, die auf 1 Uhr zeigt.\"\"\"\n ARROW_N: Image\n \"\"\"Bild eines Pfeils, der nach Norden zeigt.\"\"\"\n ARROW_NE: Image\n \"\"\"Bild eines Pfeils, der nach Nordosten zeigt.\"\"\"\n ARROW_E: Image\n \"\"\"Bild eines Pfeils, der nach Osten zeigt.\"\"\"\n ARROW_SE: Image\n \"\"\"Bild eines Pfeils, der nach S\u00fcdosten zeigt.\"\"\"\n ARROW_S: Image\n \"\"\"Bild eines Pfeils, der nach S\u00fcden zeigt.\"\"\"\n ARROW_SW: Image\n \"\"\"Bild eines Pfeils, der nach S\u00fcdwesten zeigt.\"\"\"\n ARROW_W: Image\n \"\"\"Bild eines Pfeils, der nach Westen zeigt.\"\"\"\n ARROW_NW: Image\n \"\"\"Bild eines Pfeils, der nach Nordwesten zeigt.\"\"\"\n TRIANGLE: Image\n \"\"\"Bild eines Dreiecks, das nach oben zeigt.\"\"\"\n TRIANGLE_LEFT: Image\n \"\"\"Bild eines Dreiecks in der linken Ecke.\"\"\"\n CHESSBOARD: Image\n \"\"\"Abwechselnd leuchtende LEDs in einem Schachbrettmuster.\"\"\"\n DIAMOND: Image\n \"\"\"Diamant-Bild.\"\"\"\n DIAMOND_SMALL: Image\n \"\"\"Kleines Diamant-Bild.\"\"\"\n SQUARE: Image\n \"\"\"Quadrat-Bild\"\"\"\n SQUARE_SMALL: Image\n \"\"\"Kleines Quadrat-Bild.\"\"\"\n RABBIT: Image\n \"\"\"Kaninchen-Bild.\"\"\"\n COW: Image\n \"\"\"Kuh-Bild.\"\"\"\n MUSIC_CROTCHET: Image\n \"\"\"Viertelnoten-Bild.\"\"\"\n MUSIC_QUAVER: Image\n \"\"\"Achtelnoten-Bild.\"\"\"\n MUSIC_QUAVERS: Image\n \"\"\"Achtelnotenpaar-Bild.\"\"\"\n PITCHFORK: Image\n \"\"\"Heugabel-Bild\"\"\"\n XMAS: Image\n \"\"\"Weihnachtsbaum-Bild.\"\"\"\n PACMAN: Image\n \"\"\"Pac-Man Spielfigurenbild.\"\"\"\n TARGET: Image\n \"\"\"Ziel-Bild\"\"\"\n TSHIRT: Image\n \"\"\"T-Shirt-Bild.\"\"\"\n ROLLERSKATE: Image\n \"\"\"Rollerskate-Bild.\"\"\"\n DUCK: Image\n \"\"\"Ente-Bild\"\"\"\n HOUSE: Image\n \"\"\"Haus-Bild\"\"\"\n TORTOISE: Image\n \"\"\"Schildkr\u00f6te-Bild\"\"\"\n BUTTERFLY: Image\n \"\"\"Schmetterling-Bild.\"\"\"\n STICKFIGURE: Image\n \"\"\"Strichm\u00e4nnchen-Bild.\"\"\"\n GHOST: Image\n \"\"\"Geist-Bild.\"\"\"\n SWORD: Image\n \"\"\"Schwert-Bild\"\"\"\n GIRAFFE: Image\n \"\"\"Giraffe-Bild.\"\"\"\n SKULL: Image\n \"\"\"Sch\u00e4del-Bild.\"\"\"\n UMBRELLA: Image\n \"\"\"Bild eines Schirms.\"\"\"\n SNAKE: Image\n \"\"\"Bild einer Schlange. (Schlange)\"\"\"\n SCISSORS: Image\n \"\"\"BIld einer Schere. (Schere)\"\"\"\n ALL_CLOCKS: List[Image]\n \"\"\"Eine Liste mit allen CLOCK_ Bildern. (alle Uhren)\"\"\"\n ALL_ARROWS: List[Image]\n \"\"\"Eine Liste mit allen ARROW_ Bildern. (alle Pfeile)\"\"\"\n\n @overload\n def __init__(self, string: str) -> None:\n \"\"\"Erstellen Sie ein Bild aus einer Zeichenkette, die beschreibt, welche LEDs leuchten.\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: (Zeichenkette) Eine Zeichenkette, die das Bild beschreibt.\"\"\"\n ...\n\n @overload\n def __init__(self, width: int=5, height: int=5, buffer: ReadableBuffer=None) -> None:\n \"\"\"Erstelle ein leeres Bild mit ``width`` Spalten und ``height`` Zeilen.\n\n:param width: (Breite) Optionale Breite des Bildes\n:param height: (H\u00f6he) Optionale H\u00f6he des Bildes\n:param buffer: (Puffer) Optionales Array oder Bytes von ``width``\u00d7``height`` Ganzzahlen im Bereich 0-9 um das Bild zu initialisieren\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 \"\"\"Ermittelt die Anzahl der Spalten. (Breite)\n\n:return: The number of columns in the image\"\"\"\n ...\n\n def height(self) -> int:\n \"\"\"Ermittelt die Anzahl der Zeilen. (H\u00f6he)\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 \"\"\"Legt die Helligkeit eines Pixels fest. (Pixelwerte setzen)\n\nExample: ``my_image.set_pixel(0, 0, 9)``\n\n:param x: Die Spaltennummer\n:param y: Die Zeilennummer\n:param value: (wert) Die Helligkeit als Ganzzahl zwischen 0 (dunkel) und 9 (hell)\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 \"\"\"Ermittle die Helligkeit eines Pixels. (Pixelwerte holen)\n\nExample: ``my_image.get_pixel(0, 0)``\n\n:param x: Die Spaltennummer\n:param y: Die Zeilennummer\n:return: The brightness as an integer between 0 and 9.\"\"\"\n ...\n\n def shift_left(self, n: int) -> Image:\n \"\"\"Erstellen Sie ein neues Bild, indem Sie das Bild nach links verschieben. (links verschieben)\n\nExample: ``Image.HEART_SMALL.shift_left(1)``\n\n:param n: Die Anzahl der Spalten um die verschoben wird\n:return: The shifted image\"\"\"\n ...\n\n def shift_right(self, n: int) -> Image:\n \"\"\"Erstellen Sie ein neues Bild, indem Sie das Bild nach rechts verschieben. (rechts verschieben)\n\nExample: ``Image.HEART_SMALL.shift_right(1)``\n\n:param n: Die Anzahl der Spalten um die verschoben wird\n:return: The shifted image\"\"\"\n ...\n\n def shift_up(self, n: int) -> Image:\n \"\"\"Erstellen Sie ein neues Bild, indem Sie das Bild nach oben verschoben wird. (nach oben verschieben)\n\nExample: ``Image.HEART_SMALL.shift_up(1)``\n\n:param n: Die Anzahl der Zeilen um die verschoben wird\n:return: The shifted image\"\"\"\n ...\n\n def shift_down(self, n: int) -> Image:\n \"\"\"Erstellen Sie ein neues Bild, indem Sie das Bild nach unten verschoben wird. (nach unten verschieben)\n\nExample: ``Image.HEART_SMALL.shift_down(1)``\n\n:param n: Die Anzahl der Zeilen um die verschoben wird\n:return: The shifted image\"\"\"\n ...\n\n def crop(self, x: int, y: int, w: int, h: int) -> Image:\n \"\"\"Erstellen Sie ein neues Bild, indem das Bild zugeschnitten wird.\n\nExample: ``Image.HEART.crop(1, 1, 3, 3)``\n\n:param x: Die Offset-Spalte des Zuschneidens\n:param y: Die Offset-Zeile des Zuschneidens\n:param w: Die Zuschneide-Breite\n:param h: Die Zuschneide-H\u00f6he\n:return: The new image\"\"\"\n ...\n\n def copy(self) -> Image:\n \"\"\"Erstellt eine exakte Kopie des Bildes. (kopieren)\n\nExample: ``Image.HEART.copy()``\n\n:return: The new image\"\"\"\n ...\n\n def invert(self) -> Image:\n \"\"\"Erstellt ein neues Bild, indem es die Helligkeit der Pixel des Ausgangsbildes invertiert.\n\nExample: ``Image.SMALL_HEART.invert()``\n\n:return: The new image.\"\"\"\n ...\n\n def fill(self, value: int) -> None:\n \"\"\"Legt die Helligkeit f\u00fcr alle Pixel des Bildes fest.\n\nExample: ``my_image.fill(5)``\n\n:param value: Die neue Helligkeit als Zahl zwischen 0 (dunkel) und 9 (hell).\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 \"\"\"Kopiert einen Bereich aus einem anderen Bild in dieses Bild.\n\nExample: ``my_image.blit(Image.HEART, 1, 1, 3, 3, 1, 1)``\n\n:param src: Das Ausgangsbild\n:param x: Der Anfangsspalten-Offset im Ausgangsbild\n:param y: Der Anfangszeilen-Offset im Ausgangsbild\n:param w: Die Anzahl der zu kopierenden Spalten\n:param h: Die Anzahl der zu kopierenden Zeilen\n:param xdest: Der Spalten-Offset, der in diesem Bild ge\u00e4ndert werden soll\n:param ydest: Der Zeilen-Offset, der in diesem Bild ge\u00e4ndert werden soll\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 \"\"\"Liefert eine kompakte Stringrepr\u00e4sentation des Bildes.\"\"\"\n ...\n\n def __str__(self) -> str:\n \"\"\"Liefert eine lesbare String-Repr\u00e4sentation des Bildes.\"\"\"\n ...\n\n def __add__(self, other: Image) -> Image:\n \"\"\"Erstellt ein neues Bild, indem f\u00fcr jedes Pixel die Helligkeitswerte der beiden Bilder addiert werden.\n\nExample: ``Image.HEART + Image.HAPPY``\n\n:param other: Das zu addierende Bild.\"\"\"\n ...\n\n def __sub__(self, other: Image) -> Image:\n \"\"\"Erstellt ein neues Bild, indem f\u00fcr jedes Pixel die Helligkeitswerte der beiden Bilder subtrahiert werden.\n\nExample: ``Image.HEART - Image.HEART_SMALL``\n\n:param other: Das zu subtrahierende Bild.\"\"\"\n ...\n\n def __mul__(self, n: float) -> Image:\n \"\"\"Erstellt ein neues Bild, indem der Helligkeitswert jedes Pixels mit ``n`` multipliziert wird.\n\nExample: ``Image.HEART * 0.5``\n\n:param n: Der Wert, mit dem multipliziert werden soll.\"\"\"\n ...\n\n def __truediv__(self, n: float) -> Image:\n \"\"\"Erstellt ein neues Bild, indem der Helligkeitswert jedes Pixels durch ``n`` dividiert wird.\n\nExample: ``Image.HEART / 2``\n\n:param n: Der Wert, durch den dividiert werden soll.\"\"\"\n ...\n\nclass SoundEvent:\n LOUD: SoundEvent\n \"\"\"Stellt den \u00dcbergang von Klangereignissen von ``quiet`` auf ``loud`` dar; wie beim Klatschen oder Rufen.\"\"\"\n QUIET: SoundEvent\n \"\"\"Stellt den \u00dcbergang von akustischen Ereignissen, wie Sprechen oder Hintergrundmusik, von ``loud`` zu ``quiet`` dar. (stumm)\"\"\"\n\nclass Sound:\n \"\"\"Die eingebauten Kl\u00e4nge k\u00f6nnen mit ``audio.play(Sound.NAME)`` aufgerufen werden.\"\"\"\n GIGGLE: Sound\n \"\"\"Kichern-Sound.\"\"\"\n HAPPY: Sound\n \"\"\"Happy-Sound.\"\"\"\n HELLO: Sound\n \"\"\"Begr\u00fc\u00dfung-Sound\"\"\"\n MYSTERIOUS: Sound\n \"\"\"Geheimnisvoll-Sound\"\"\"\n SAD: Sound\n \"\"\"Traurig-Sound.\"\"\"\n SLIDE: Sound\n \"\"\"Gleitender Ton.\"\"\"\n SOARING: Sound\n \"\"\"Aufsteigender Klang. (aufsteigend)\"\"\"\n SPRING: Sound\n \"\"\"Springfeder Klang (Sppringfeder)\"\"\"\n TWINKLE: Sound\n \"\"\"Funkeln Klang (Funkeln)\"\"\"\n YAWN: Sound\n \"\"\"G\u00e4hnen Klang\"\"\"", - "/typeshed/stdlib/microbit/accelerometer.pyi": "\"\"\"Messen Sie die Beschleunigung des micro:bit und erkennen Sie Gesten. (Beschleunigungssensor)\"\"\"\nfrom typing import Tuple\n\ndef get_x() -> int:\n \"\"\"Erhalte die Beschleunigungsmessung in der ``x`` -Achse in 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 \"\"\"Erhalte die Beschleunigungsmessung in der ``y`` -Achse in 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 \"\"\"Erhalte die Beschleunigungsmessung in der ``z`` -Achse in 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 \"\"\"Erhalten Sie die Beschleunigungsmessungen in allen Achsen auf einmal als Tupel.\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 \"\"\"Erhalte die Beschleunigungsmessung aller Achsen als positive Ganzzahl. Dies ist die euklidische Summe der X-, Y- und Z-Achsen.\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 \"\"\"Erhalte den Namen der aktuellen Geste. (derzeitige Geste)\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 \"\"\"\u00dcberpr\u00fcft, ob die benannte Geste derzeit aktiv ist. (ist Geste)\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: Der Name der Geste.\n:return: ``True`` if the gesture is active, ``False`` otherwise.\"\"\"\n ...\n\ndef was_gesture(name: str) -> bool:\n \"\"\"\u00dcberpr\u00fcft, ob die benannte Geste seit dem letzten Aufruf aktiv war. (war Geste)\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: Der Name der Geste.\n:return: ``True`` if the gesture was active since the last call, ``False`` otherwise.\"\"\"\n\ndef get_gestures() -> Tuple[str, ...]:\n \"\"\"Gibt ein Tupel der vergangenen Gesten zur\u00fcck.\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 \"\"\"Legen Sie den Bereich des Beschleunigungsmessers in g (Fallbeschleunigung) auf den n\u00e4chstgelegenen Wert fest, welcher von der Hardware unterst\u00fctzt wird. Diese sind ``2``, ``4``oder ``8`` g. (Bereich einstellen)\n\nExample: ``accelerometer.set_range(8)``\n\n:param value: (wert) Neuer Bereich f\u00fcr den Beschleunigungssensor, eine Ganzzahl in ``g``.\"\"\"", - "/typeshed/stdlib/microbit/audio.pyi": "\"\"\"T\u00f6ne mit dem micro:bit abspielen (Importiere ``audio`` f\u00fcr V1-Kompatibilit\u00e4t). (Audio)\"\"\"\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 \"\"\"Wiedergeben eines eingebauten Sounds, Soundeffekts oder benutzerdefinierten Aufnahme .\n\nExample: ``audio.play(Sound.GIGGLE)``\n\n:param source: (Quelle) Ein eingebauter ``Sound`` wie ``Sound.GIGGLE``, ein ``SoundEffect`` oder Beispieldaten als Teil eines ``AudioFrame`` Objekts.\n:param wait: Wenn ``wait`` ``True`` ist, wird diese Funktion blockiert, bis der Klang abgeschlossen ist.\n:param pin: Ein optionales Argument f\u00fcr den Ausgabepin kann angegeben werden, um die Standardeinstellung von ``pin0``zu \u00fcberschreiben. Wenn kein Ton wiedergegeben werden soll, kann ``pin=None`` verwendet werden.\n:param return_pin: Bestimmt einen Pin, mit dem der externen Lautsprecher anstatt mit Ground verbunden wird. Dies wird bei der **V2** Revision ignoriert.\"\"\"\n\ndef is_playing() -> bool:\n \"\"\"\u00dcberpr\u00fcfen Sie, ob ein Ton abgespielt wird. (spielt gerade)\n\nExample: ``audio.is_playing()``\n\n:return: ``True`` if audio is playing, otherwise ``False``.\"\"\"\n ...\n\ndef stop() -> None:\n \"\"\"Stoppe jede Audio-Wiedergabe. (Stop)\n\nExample: ``audio.stop()``\"\"\"\n ...\n\nclass SoundEffect:\n \"\"\"Ein Soundeffekt, zusammengestellt aus einer Reihe von Parametern, die \u00fcber den Konstruktor oder durch Attribute konfiguriert werden.\"\"\"\n WAVEFORM_SINE: ClassVar[int]\n \"\"\"Sinuswelle als Parameter f\u00fcr ``waveform``. (Sinuswelle)\"\"\"\n WAVEFORM_SAWTOOTH: ClassVar[int]\n \"\"\"S\u00e4gezahnkurve als Parameter f\u00fcr ``waveform``. (S\u00e4gezahnkurve)\"\"\"\n WAVEFORM_TRIANGLE: ClassVar[int]\n \"\"\"Dreiecksignal als Parameter f\u00fcr ``waveform``. (Dreiecksignal)\"\"\"\n WAVEFORM_SQUARE: ClassVar[int]\n \"\"\"Rechtecksignal als Parameter f\u00fcr ``waveform``. (Rechtecksignal)\"\"\"\n WAVEFORM_NOISE: ClassVar[int]\n \"\"\"Rauschsignal als Parameter f\u00fcr ``waveform``. (Rauschsignal)\"\"\"\n SHAPE_LINEAR: ClassVar[int]\n \"\"\"Lineare Interpolation als Parameter f\u00fcr ``shape``. (lineare Interpolation)\"\"\"\n SHAPE_CURVE: ClassVar[int]\n \"\"\"Kurven-Interpolation als Parameter f\u00fcr ``shape``. (geschwungene Kurve)\"\"\"\n SHAPE_LOG: ClassVar[int]\n \"\"\"Logarithmische Interpolation als Parameter f\u00fcr ``shape``. (logarithmische Interpolation)\"\"\"\n FX_NONE: ClassVar[int]\n \"\"\"Kein Effekt f\u00fcr ``fx`` verwendet. (kein fx)\"\"\"\n FX_TREMOLO: ClassVar[int]\n \"\"\"Tremelo-Effekt als Parameter f\u00fcr ``fx``. (fx Tremolo)\"\"\"\n FX_VIBRATO: ClassVar[int]\n \"\"\"Vibrato-Effekt als Parameter f\u00fcr ``fx``. (fx Vibrato)\"\"\"\n FX_WARBLE: ClassVar[int]\n \"\"\"Triller-Effekt als Parameter f\u00fcr ``fx``. (fx Trillereffekt)\"\"\"\n freq_start: int\n \"\"\"Startfrequenz in Hertz (Hz), eine Zahl zwischen ``0`` und ``9999`` (Startfrequenz)\"\"\"\n freq_end: int\n \"\"\"Endfrequenz in Hertz (Hz), eine Zahl zwischen ``0`` und ``9999`` (Endfrequenz)\"\"\"\n duration: int\n \"\"\"Dauer des Klangs in Millisekunden, eine Zahl zwischen ``0`` und ``9999`` (Dauer)\"\"\"\n vol_start: int\n \"\"\"Startlautst\u00e4rke, eine Zahl zwischen ``0`` und ``255`` (vol Start)\"\"\"\n vol_end: int\n \"\"\"Endlautst\u00e4rke, eine Nummer zwischen ``0`` und ``255`` (vol Ende)\"\"\"\n waveform: int\n \"\"\"Typ der Sinuswelle, einer dieser Werte: ``WAVEFORM_SINE``, ``WAVEFORM_SAWTOOTH``, ``WAVEFORM_TRIANGLE``, ``WAVEFORM_SQUARE``, ``WAVEFORM_NOISE`` (zuf\u00e4llig generiertes Ger\u00e4usch)\"\"\"\n fx: int\n \"\"\"Effekt, der dem Sound hinzugef\u00fcgt werden soll, in Frage kommende Werte: ``FX_TREMOLO``, ``FX_VIBRATO``, ``FX_WARBLE``, oder ``FX_NONE``\"\"\"\n shape: int\n \"\"\"Die Art der Interpolationskurve zwischen der Anfangs- und der Endfrequenz. Verschiedene Wellenformen haben unterschiedliche Frequenz\u00e4nderungsraten. In Frage kommende Werte: ``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 \"\"\"Erstelle einen neuen Soundeffekt.\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: (Startfrequenz) Startfrequenz in Hertz (Hz), eine Zahl zwischen ``0`` und ``9999``.\n:param freq_end: (Endfrequenz) Endfrequenz in Hertz (Hz), eine Zahl zwischen ``0`` und ``9999``.\n:param duration: (Dauer) Dauer des Tons in Millisekunden, eine Zahl zwischen ``0`` und ``9999``.\n:param vol_start: (vol Start) Startlautst\u00e4rke, eine Zahl zwischen ``0`` und ``255``.\n:param vol_end: (vol Ende) Endlautst\u00e4rke, eine Nummer zwischen ``0`` und ``255``.\n:param waveform: Typ der Sinuswelle, einer dieser Werte: ``WAVEFORM_SINE``, ``WAVEFORM_SAWTOOTH``, ``WAVEFORM_TRIANGLE``, ``WAVEFORM_SQUARE``, ``WAVEFORM_NOISE`` (zuf\u00e4llig generiertes Ger\u00e4usch).\n:param fx: Effekt, der dem Sound hinzugef\u00fcgt werden soll, in Frage kommende Werte: ``FX_TREMOLO``, ``FX_VIBRATO``, ``FX_WARBLE``, oder ``FX_NONE``.\n:param shape: Die Art der Interpolationskurve zwischen der Anfangs- und der Endfrequenz. Verschiedene Wellenformen haben unterschiedliche Frequenz\u00e4nderungsraten. In Frage kommende Werte: ``SHAPE_LINEAR``, ``SHAPE_CURVE``, ``SHAPE_LOG``.\"\"\"\n\n def copy(self) -> SoundEffect:\n \"\"\"Erstelle eine Kopie dieses ``SoundEffect``. (kopieren)\n\nExample: ``sound_2 = sound_1.copy()``\n\n:return: A copy of the SoundEffect.\"\"\"\n\nclass AudioFrame:\n \"\"\"Ein ``AudioFrame``-Objekt ist eine Liste von 32 Samples, von denen jedes ein vorzeichenloses Byte ist \n(ganze Zahl zwischen 0 und 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 \"\"\"\u00dcberschreibe die Daten in diesem ``AudioFrame`` mit den Daten einer anderen ``AudioFrame`` Instanz.\n\nExample: ``my_frame.copyfrom(source_frame)``\n\n:param other: ``AudioFrame`` Instanz von der die Daten kopiert werden sollen.\"\"\"\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": "\"\"\"Benutze den eingebauten Kompass. (Kompass)\"\"\"\n\ndef calibrate() -> None:\n \"\"\"Startet den Kalibrierungsprozess.\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 \"\"\"\u00dcberpr\u00fcfe, dass der Kompass kalibriert ist. (ist kalibriert)\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 \"\"\"Setzt die Kalibrierung zur\u00fcck, sodass der Kompass nicht mehr kalibriert ist.\n\nExample: ``compass.clear_calibration()``\"\"\"\n ...\n\ndef get_x() -> int:\n \"\"\"Liefert die Magnetfeldst\u00e4rke der ``x``-Achse.\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 \"\"\"Liefert die Magnetfeldst\u00e4rke der ``y``-Achse.\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 \"\"\"Liefert die Magnetfeldst\u00e4rke der ``z``-Achse.\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 \"\"\"Ermittle die Kompassrichtung. (Ausrichtung)\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 \"\"\"Ermittle die Gr\u00f6\u00dfe des Magnetfelds um das Ger\u00e4t herum.\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": "\"\"\"Texte, Bilder und Animationen auf dem 5x5 LED-Display anzeigen. (Display)\"\"\"\nfrom ..microbit import Image\nfrom typing import Union, overload, Iterable\n\ndef get_pixel(x: int, y: int) -> int:\n \"\"\"Ermittelt die Helligkeit der LED in Spalte ``x`` und Zeile ``y``.\n\nExample: ``display.get_pixel(0, 0)``\n\n:param x: Die Anzeige-Spalte (0..4)\n:param y: Die Anzeigezeile (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 \"\"\"Stellt die Helligkeit der LED in Spalte ``x`` und Zeile ``y`` ein.\n\nExample: ``display.set_pixel(0, 0, 9)``\n\n:param x: Die Anzeige-Spalte (0..4)\n:param y: Die Anzeigezeile (0..4)\n:param value: Die Helligkeit zwischen 0 (aus) und 9 (am hellsten)\"\"\"\n ...\n\ndef clear() -> None:\n \"\"\"Setzt die Helligkeit aller LEDs auf 0 (aus).\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 \"\"\"Zeigt Bilder, Buchstaben oder Ziffern auf der LED-Anzeige an.\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: Eine Zeichenkette, eine Zahl, ein Bild oder eine Liste von Bildern, die angezeigt werden sollen.\n:param delay: Jeder Buchstabe, jede Ziffer oder jedes Bild wird mit einer Verz\u00f6gerung von ``delay`` Millisekunden angezeigt.\n:param wait: Wenn ``wait`` ``True`` ist, wird diese Funktion das Programm so lange anhalten, bis die Animation beendet ist, andernfalls wird die Animation im Hintergrund ausgef\u00fchrt.\n:param loop: Wenn ``loop`` ``True`` ist, wird die Animation endlos wiederholt.\n:param clear: Wenn ``clear`` ``True`` ist, wird die Anzeige nach Beendigung der Sequenz gel\u00f6scht.\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 \"\"\"Scrollt eine Zahl oder einen Text auf dem LED-Display.\n\nExample: ``display.scroll('micro:bit')``\n\n:param text: Die zu scrollende Zeichenkette. Wenn ``text`` ein Integer oder Float ist, wird der Text vorher mit ``str()`` in einen String umgewandelt.\n:param delay: Der Parameter ``delay`` bestimmt, wie schnell der Text gescrollt wird.\n:param wait: Wenn ``wait`` ``True`` ist, wird diese Funktion das Programm anhalten, bis die Animation beendet ist, andernfalls l\u00e4uft die Animation im Hintergrund ab.\n:param loop: Wenn ``loop`` ``True`` ist, wird die Animation endlos wiederholt.\n:param monospace: Wenn ``monospace`` ``True``ist, werden alle Zeichen 5 Pixel breit sein. Zwischen den Zeichen gibt es beim scrollen genau 1 leere Pixelspalte.\n\nThe ``wait``, ``loop`` and ``monospace`` arguments must be specified\nusing their keyword.\"\"\"\n ...\n\ndef on() -> None:\n \"\"\"Das LED-Display einschalten.\n\nExample: ``display.on()``\"\"\"\n ...\n\ndef off() -> None:\n \"\"\"Die LED-Anzeige ausschalten (Deaktivieren des Displays erm\u00f6glicht es dir, die GPIO-Pins f\u00fcr andere Zwecke zu verwenden).\n\nExample: ``display.off()``\"\"\"\n ...\n\ndef is_on() -> bool:\n \"\"\"\u00dcberpr\u00fcfung, ob die LED-Anzeige aktiviert ist.\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 \"\"\"Bestimmt die Lichtintensit\u00e4t.\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 ...", + "/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": "\"\"\"Pins, Bilder, T\u00f6ne, Temperatur und Lautst\u00e4rke.\"\"\"\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 \"\"\"Plant die Ausf\u00fchrung einer Funktion in dem durch die Zeitargumente festgelegten Intervall **nur V2**.\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: Funktion, die in dem angegebenen Intervall aufgerufen wird. Bei Verwendung als Dekorator weglassen.\n:param days: (tage) Legt den Tag f\u00fcr die Planung fest.\n:param h: Legt die Uhrzeit f\u00fcr die Planung fest.\n:param min: Legt die Minute f\u00fcr die Planung fest.\n:param s: Legt die Sekunde f\u00fcr die Planung fest.\n:param ms: Legt die Millisekunde f\u00fcr die Planung fest.\"\"\"\n\ndef panic(n: int) -> None:\n \"\"\"In einen Panik-Modus gehen.\n\nExample: ``panic(127)``\n\n:param n: Eine beliebige ganze Zahl <= 255, um einen Status anzugeben.\n\nRequires restart.\"\"\"\n\ndef reset() -> None:\n \"\"\"Board neu starten.\"\"\"\n\n@overload\ndef scale(value: float, from_: Tuple[float, float], to: Tuple[int, int]) -> int:\n \"\"\"Konvertiert einen Wert aus einem Bereich in einen Ganzzahlenbereich.\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: (wert) Eine umzurechnende Zahl.\n:param from_: Ein Tupel, das den Bereich definiert, aus dem konvertiert werden soll.\n:param to: Ein Tupel, das den Bereich definiert, in den konvertiert werden soll.\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 \"\"\"Konvertiert einen Wert von einem Bereich in einen Gleitkommabereich.\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: (wert) Eine umzurechnende Zahl.\n:param from_: Ein Tupel, das den Bereich definiert, aus dem konvertiert werden soll.\n:param to: Ein Tupel, das den Bereich definiert, in den konvertiert werden soll.\n:return: The ``value`` converted to the ``to`` range.\"\"\"\n\ndef sleep(n: float) -> None:\n \"\"\"Warte auf ``n`` Millisekunden.\n\nExample: ``sleep(1000)``\n\n:param n: Die Anzahl der zu wartenden Millisekunden\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 \"\"\"Ermittelt die Laufzeit des Boards.\n\n:return: The number of milliseconds since the board was switched on or restarted.\"\"\"\n\ndef temperature() -> int:\n \"\"\"Ermittelt die Temperatur des micro:bit in Grad Celcius.\"\"\"\n\ndef set_volume(v: int) -> None:\n \"\"\"Legt die Lautst\u00e4rke fest.\n\nExample: ``set_volume(127)``\n\n:param v: ein Wert zwischen 0 (niedrig) und 255 (hoch).\n\nOut of range values will be clamped to 0 or 255.\n\n**V2** only.\"\"\"\n ...\n\nclass Button:\n \"\"\"Die Klasse f\u00fcr die Tasten ``button_a`` und ``button_b``.\"\"\"\n\n def is_pressed(self) -> bool:\n \"\"\"\u00dcberpr\u00fcft, ob die Taste gedr\u00fcckt ist.\n\n:return: ``True`` if the specified button ``button`` is pressed, and ``False`` otherwise.\"\"\"\n ...\n\n def was_pressed(self) -> bool:\n \"\"\"\u00dcberpr\u00fcft, ob die Taste seit dem Start des Ger\u00e4ts oder dem letzten Aufruf dieser Methode gedr\u00fcckt wurde.\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 \"\"\"Ermittelt die Gesamtzahl der Tastendr\u00fccke und setzt diese Summe auf Null zur\u00fcck, bevor sie zur\u00fcckgegeben wird.\n\n:return: The number of presses since the device started or the last time this method was called\"\"\"\n ...\nbutton_a: Button\n\"\"\"Das ``Button``-Objekt der linken Taste.\"\"\"\nbutton_b: Button\n\"\"\"Das ``Button``-Objekt der rechten Taste.\"\"\"\n\nclass MicroBitDigitalPin:\n \"\"\"Ein digitaler Pin.\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 \"\"\"Ermittelt den digitalen Wert des Pins.\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 \"\"\"Stellt den digitalen Wert des Pins ein. (digital schreiben)\n\nExample: ``pin0.write_digital(1)``\n\n:param value: (wert) 1, um den Pin zu aktivieren, oder 0, um den Pin zu deaktivieren\"\"\"\n ...\n\n def set_pull(self, value: int) -> None:\n \"\"\"Setze den Status des Pull-Widerstands auf einen von drei m\u00f6glichen Werten: ``PULL_UP``, ``PULL_DOWN`` oder ``NO_PULL``. (setze Pull-Widerstand)\n\nExample: ``pin0.set_pull(pin0.PULL_UP)``\n\n:param value: (wert) Der Status des Pull-Widerstands vom relevanten Pin, z.B. ``pin0.PULL_UP``.\"\"\"\n ...\n\n def get_pull(self) -> int:\n \"\"\"Abrufen des Status des Pull-Widerstands eines Pins. (gib Pull-Widerstand)\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 \"\"\"Gibt den Pin-Modus zur\u00fcck. (gib Pin-Modus)\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 \"\"\"Erzeugt ein PWM-Signal am Pin mit der Einschaltdauer proportional zu ``value``. (analog schreiben)\n\nExample: ``pin0.write_analog(254)``\n\n:param value: (wert) Eine Ganzzahl oder eine Gleitpunktzahl zwischen 0 (0% Einschaltdauer) und 1023 (100% Einschaltdauer).\"\"\"\n\n def set_analog_period(self, period: int) -> None:\n \"\"\"Setzt die Periodendauer des PWM-Signals, das ausgegeben wird, auf ``period`` in Millisekunden. (setze analoge Periodendauer)\n\nExample: ``pin0.set_analog_period(10)``\n\n:param period: (Periodendauer) Der Periodendauer in Millisekunden mit einem Mindestwert von 1ms.\"\"\"\n\n def set_analog_period_microseconds(self, period: int) -> None:\n \"\"\"Setze die Periodendauer f\u00fcr die Ausgabe des PWM-Signals auf ``period`` in Mikrosekunden. (setze analoge Periodendauer)\n\nExample: ``pin0.set_analog_period_microseconds(512)``\n\n:param period: (Periodendauer) Die Periodendauer in Mikrosekunden mit einem Mindestwert von 256\u03bcs.\"\"\"\n\nclass MicroBitAnalogDigitalPin(MicroBitDigitalPin):\n \"\"\"Ein Pin, der analogen und digitalen Signale erlaubt.\"\"\"\n\n def read_analog(self) -> int:\n \"\"\"Einlesen der Spannung, die am Pin anliegt. (analog lesen)\n\nExample: ``pin0.read_analog()``\n\n:return: An integer between 0 (meaning 0V) and 1023 (meaning 3.3V).\"\"\"\n\nclass MicroBitTouchPin(MicroBitAnalogDigitalPin):\n \"\"\"Ein Pin mit analogen, digitalen und Touchfunktionen.\"\"\"\n CAPACITIVE: int\n RESISTIVE: int\n\n def is_touched(self) -> bool:\n \"\"\"\u00dcberpr\u00fcft, ob der Pin ber\u00fchrt wird. (wird ber\u00fchrt)\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 \"\"\"Legt den Touchmodus f\u00fcr den Pin fest. (definiert Ber\u00fchrungsmodus)\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: (wert) ``CAPACITIVE`` oder ``RESISTIVE`` Touchmodus des entsprechenden Pins.\"\"\"\n ...\npin0: MicroBitTouchPin\n\"\"\"Pin mit digitalen, analogen und Touchfunktionen.\"\"\"\npin1: MicroBitTouchPin\n\"\"\"Pin mit digitalen, analogen und Touchfunktionen.\"\"\"\npin2: MicroBitTouchPin\n\"\"\"Pin mit digitalen, analogen und Touchfunktionen.\"\"\"\npin3: MicroBitAnalogDigitalPin\n\"\"\"Pin mit digitalen und analogen Funktionen.\"\"\"\npin4: MicroBitAnalogDigitalPin\n\"\"\"Pin mit digitalen und analogen Funktionen.\"\"\"\npin5: MicroBitDigitalPin\n\"\"\"Pin mit Unterst\u00fctzung f\u00fcr digitale Signale.\"\"\"\npin6: MicroBitDigitalPin\n\"\"\"Pin mit Unterst\u00fctzung f\u00fcr digitale Signale.\"\"\"\npin7: MicroBitDigitalPin\n\"\"\"Pin mit digitalen Funktionen.\"\"\"\npin8: MicroBitDigitalPin\n\"\"\"Pin mit digitalen Funktionen.\"\"\"\npin9: MicroBitDigitalPin\n\"\"\"Pin mit digitalen Funktionen.\"\"\"\npin10: MicroBitAnalogDigitalPin\n\"\"\"Pin mit digitalen und analogen Funktionen.\"\"\"\npin11: MicroBitDigitalPin\n\"\"\"Pin mit digitalen Funktionen.\"\"\"\npin12: MicroBitDigitalPin\n\"\"\"Pin mit digitalen Funktionen.\"\"\"\npin13: MicroBitDigitalPin\n\"\"\"Pin mit digitalen Funktionen.\"\"\"\npin14: MicroBitDigitalPin\n\"\"\"Pin mit digitalen Funktionen.\"\"\"\npin15: MicroBitDigitalPin\n\"\"\"Pin mit digitalen Funktionen.\"\"\"\npin16: MicroBitDigitalPin\n\"\"\"Pin mit digitalen Funktionen.\"\"\"\npin19: MicroBitDigitalPin\n\"\"\"Pin mit digitalen Funktionen.\"\"\"\npin20: MicroBitDigitalPin\n\"\"\"Pin mit digitalen Funktionen.\"\"\"\npin_logo: MicroBitTouchPin\n\"\"\"Ein ber\u00fchrungsempfindlicher Logo-Pin auf der Vorderseite des micro:bit, der standardm\u00e4\u00dfig auf den kapazitiven Touch-Modus eingestellt ist.\"\"\"\npin_speaker: MicroBitAnalogDigitalPin\n\"\"\"Ein Pin zur Ansteuerung des micro:bit Lautsprechers.\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 \"\"\"Ein Bild, das auf dem micro:bit LED-Display angezeigt werden soll.\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 \"\"\"Herz-Bild.\"\"\"\n HEART_SMALL: Image\n \"\"\"Kleines Herz-Bild.\"\"\"\n HAPPY: Image\n \"\"\"Gl\u00fcckliches Gesichtsbild.\"\"\"\n SMILE: Image\n \"\"\"L\u00e4chelndes Gesichtsbild.\"\"\"\n SAD: Image\n \"\"\"Trauriges Gesichtsbild.\"\"\"\n CONFUSED: Image\n \"\"\"Verwirrtes Gesichtsbild.\"\"\"\n ANGRY: Image\n \"\"\"W\u00fctendes Gesichtsbild.\"\"\"\n ASLEEP: Image\n \"\"\"Schlafendes Gesichtsbild.\"\"\"\n SURPRISED: Image\n \"\"\"\u00dcberraschtes Gesichtsbild.\"\"\"\n SILLY: Image\n \"\"\"Albernes Gesichtsbild.\"\"\"\n FABULOUS: Image\n \"\"\"Bild mit Sonnenbrillengesicht. (fabelhaft)\"\"\"\n MEH: Image\n \"\"\"Gleichg\u00fcltiges Gesicht Bild.\"\"\"\n YES: Image\n \"\"\"abgehakt-Bild\"\"\"\n NO: Image\n \"\"\"angekreuzt-Bild\"\"\"\n CLOCK12: Image\n \"\"\"Bild mit Linie, die auf 12 Uhr zeigt.\"\"\"\n CLOCK11: Image\n \"\"\"Bild mit Linie, die auf 11 Uhr zeigt.\"\"\"\n CLOCK10: Image\n \"\"\"Bild mit Linie, die auf 10 Uhr zeigt.\"\"\"\n CLOCK9: Image\n \"\"\"Bild mit Linie, die auf 9 Uhr zeigt.\"\"\"\n CLOCK8: Image\n \"\"\"Bild mit Linie, die auf 8 Uhr zeigt.\"\"\"\n CLOCK7: Image\n \"\"\"Bild mit Linie, die auf 7 Uhr zeigt.\"\"\"\n CLOCK6: Image\n \"\"\"Bild mit Linie, die auf 6 Uhr zeigt.\"\"\"\n CLOCK5: Image\n \"\"\"Bild mit Linie, die auf 5 Uhr zeigt.\"\"\"\n CLOCK4: Image\n \"\"\"Bild mit Linie, die auf 4 Uhr zeigt.\"\"\"\n CLOCK3: Image\n \"\"\"Bild mit Linie, die auf 3 Uhr zeigt.\"\"\"\n CLOCK2: Image\n \"\"\"Bild mit Linie, die auf 2 Uhr zeigt.\"\"\"\n CLOCK1: Image\n \"\"\"Bild mit Linie, die auf 1 Uhr zeigt.\"\"\"\n ARROW_N: Image\n \"\"\"Bild eines Pfeils, der nach Norden zeigt.\"\"\"\n ARROW_NE: Image\n \"\"\"Bild eines Pfeils, der nach Nordosten zeigt.\"\"\"\n ARROW_E: Image\n \"\"\"Bild eines Pfeils, der nach Osten zeigt.\"\"\"\n ARROW_SE: Image\n \"\"\"Bild eines Pfeils, der nach S\u00fcdosten zeigt.\"\"\"\n ARROW_S: Image\n \"\"\"Bild eines Pfeils, der nach S\u00fcden zeigt.\"\"\"\n ARROW_SW: Image\n \"\"\"Bild eines Pfeils, der nach S\u00fcdwesten zeigt.\"\"\"\n ARROW_W: Image\n \"\"\"Bild eines Pfeils, der nach Westen zeigt.\"\"\"\n ARROW_NW: Image\n \"\"\"Bild eines Pfeils, der nach Nordwesten zeigt.\"\"\"\n TRIANGLE: Image\n \"\"\"Bild eines Dreiecks, das nach oben zeigt.\"\"\"\n TRIANGLE_LEFT: Image\n \"\"\"Bild eines Dreiecks in der linken Ecke.\"\"\"\n CHESSBOARD: Image\n \"\"\"Abwechselnd leuchtende LEDs in einem Schachbrettmuster.\"\"\"\n DIAMOND: Image\n \"\"\"Diamant-Bild.\"\"\"\n DIAMOND_SMALL: Image\n \"\"\"Kleines Diamant-Bild.\"\"\"\n SQUARE: Image\n \"\"\"Quadrat-Bild\"\"\"\n SQUARE_SMALL: Image\n \"\"\"Kleines Quadrat-Bild.\"\"\"\n RABBIT: Image\n \"\"\"Kaninchen-Bild.\"\"\"\n COW: Image\n \"\"\"Kuh-Bild.\"\"\"\n MUSIC_CROTCHET: Image\n \"\"\"Viertelnoten-Bild.\"\"\"\n MUSIC_QUAVER: Image\n \"\"\"Achtelnoten-Bild.\"\"\"\n MUSIC_QUAVERS: Image\n \"\"\"Achtelnotenpaar-Bild.\"\"\"\n PITCHFORK: Image\n \"\"\"Heugabel-Bild\"\"\"\n XMAS: Image\n \"\"\"Weihnachtsbaum-Bild.\"\"\"\n PACMAN: Image\n \"\"\"Pac-Man Spielfigurenbild.\"\"\"\n TARGET: Image\n \"\"\"Ziel-Bild\"\"\"\n TSHIRT: Image\n \"\"\"T-Shirt-Bild.\"\"\"\n ROLLERSKATE: Image\n \"\"\"Rollerskate-Bild.\"\"\"\n DUCK: Image\n \"\"\"Ente-Bild\"\"\"\n HOUSE: Image\n \"\"\"Haus-Bild\"\"\"\n TORTOISE: Image\n \"\"\"Schildkr\u00f6te-Bild\"\"\"\n BUTTERFLY: Image\n \"\"\"Schmetterling-Bild.\"\"\"\n STICKFIGURE: Image\n \"\"\"Strichm\u00e4nnchen-Bild.\"\"\"\n GHOST: Image\n \"\"\"Geist-Bild.\"\"\"\n SWORD: Image\n \"\"\"Schwert-Bild\"\"\"\n GIRAFFE: Image\n \"\"\"Giraffe-Bild.\"\"\"\n SKULL: Image\n \"\"\"Sch\u00e4del-Bild.\"\"\"\n UMBRELLA: Image\n \"\"\"Bild eines Schirms.\"\"\"\n SNAKE: Image\n \"\"\"Bild einer Schlange. (Schlange)\"\"\"\n SCISSORS: Image\n \"\"\"BIld einer Schere. (Schere)\"\"\"\n ALL_CLOCKS: List[Image]\n \"\"\"Eine Liste mit allen CLOCK_ Bildern. (alle Uhren)\"\"\"\n ALL_ARROWS: List[Image]\n \"\"\"Eine Liste mit allen ARROW_ Bildern. (alle Pfeile)\"\"\"\n\n @overload\n def __init__(self, string: str) -> None:\n \"\"\"Erstellen Sie ein Bild aus einer Zeichenkette, die beschreibt, welche LEDs leuchten.\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: (Zeichenkette) Eine Zeichenkette, die das Bild beschreibt.\"\"\"\n ...\n\n @overload\n def __init__(self, width: int=5, height: int=5, buffer: ReadableBuffer=None) -> None:\n \"\"\"Erstelle ein leeres Bild mit ``width`` Spalten und ``height`` Zeilen.\n\n:param width: (Breite) Optionale Breite des Bildes\n:param height: (H\u00f6he) Optionale H\u00f6he des Bildes\n:param buffer: (Puffer) Optionales Array oder Bytes von ``width``\u00d7``height`` Ganzzahlen im Bereich 0-9 um das Bild zu initialisieren\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 \"\"\"Ermittelt die Anzahl der Spalten. (Breite)\n\n:return: The number of columns in the image\"\"\"\n ...\n\n def height(self) -> int:\n \"\"\"Ermittelt die Anzahl der Zeilen. (H\u00f6he)\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 \"\"\"Legt die Helligkeit eines Pixels fest. (Pixelwerte setzen)\n\nExample: ``my_image.set_pixel(0, 0, 9)``\n\n:param x: Die Spaltennummer\n:param y: Die Zeilennummer\n:param value: (wert) Die Helligkeit als Ganzzahl zwischen 0 (dunkel) und 9 (hell)\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 \"\"\"Ermittle die Helligkeit eines Pixels. (Pixelwerte holen)\n\nExample: ``my_image.get_pixel(0, 0)``\n\n:param x: Die Spaltennummer\n:param y: Die Zeilennummer\n:return: The brightness as an integer between 0 and 9.\"\"\"\n ...\n\n def shift_left(self, n: int) -> Image:\n \"\"\"Erstellen Sie ein neues Bild, indem Sie das Bild nach links verschieben. (links verschieben)\n\nExample: ``Image.HEART_SMALL.shift_left(1)``\n\n:param n: Die Anzahl der Spalten um die verschoben wird\n:return: The shifted image\"\"\"\n ...\n\n def shift_right(self, n: int) -> Image:\n \"\"\"Erstellen Sie ein neues Bild, indem Sie das Bild nach rechts verschieben. (rechts verschieben)\n\nExample: ``Image.HEART_SMALL.shift_right(1)``\n\n:param n: Die Anzahl der Spalten um die verschoben wird\n:return: The shifted image\"\"\"\n ...\n\n def shift_up(self, n: int) -> Image:\n \"\"\"Erstellen Sie ein neues Bild, indem Sie das Bild nach oben verschoben wird. (nach oben verschieben)\n\nExample: ``Image.HEART_SMALL.shift_up(1)``\n\n:param n: Die Anzahl der Zeilen um die verschoben wird\n:return: The shifted image\"\"\"\n ...\n\n def shift_down(self, n: int) -> Image:\n \"\"\"Erstellen Sie ein neues Bild, indem Sie das Bild nach unten verschoben wird. (nach unten verschieben)\n\nExample: ``Image.HEART_SMALL.shift_down(1)``\n\n:param n: Die Anzahl der Zeilen um die verschoben wird\n:return: The shifted image\"\"\"\n ...\n\n def crop(self, x: int, y: int, w: int, h: int) -> Image:\n \"\"\"Erstellen Sie ein neues Bild, indem das Bild zugeschnitten wird.\n\nExample: ``Image.HEART.crop(1, 1, 3, 3)``\n\n:param x: Die Offset-Spalte des Zuschneidens\n:param y: Die Offset-Zeile des Zuschneidens\n:param w: Die Zuschneide-Breite\n:param h: Die Zuschneide-H\u00f6he\n:return: The new image\"\"\"\n ...\n\n def copy(self) -> Image:\n \"\"\"Erstellt eine exakte Kopie des Bildes. (kopieren)\n\nExample: ``Image.HEART.copy()``\n\n:return: The new image\"\"\"\n ...\n\n def invert(self) -> Image:\n \"\"\"Erstellt ein neues Bild, indem es die Helligkeit der Pixel des Ausgangsbildes invertiert.\n\nExample: ``Image.SMALL_HEART.invert()``\n\n:return: The new image.\"\"\"\n ...\n\n def fill(self, value: int) -> None:\n \"\"\"Legt die Helligkeit f\u00fcr alle Pixel des Bildes fest.\n\nExample: ``my_image.fill(5)``\n\n:param value: Die neue Helligkeit als Zahl zwischen 0 (dunkel) und 9 (hell).\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 \"\"\"Kopiert einen Bereich aus einem anderen Bild in dieses Bild.\n\nExample: ``my_image.blit(Image.HEART, 1, 1, 3, 3, 1, 1)``\n\n:param src: Das Ausgangsbild\n:param x: Der Anfangsspalten-Offset im Ausgangsbild\n:param y: Der Anfangszeilen-Offset im Ausgangsbild\n:param w: Die Anzahl der zu kopierenden Spalten\n:param h: Die Anzahl der zu kopierenden Zeilen\n:param xdest: Der Spalten-Offset, der in diesem Bild ge\u00e4ndert werden soll\n:param ydest: Der Zeilen-Offset, der in diesem Bild ge\u00e4ndert werden soll\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 \"\"\"Liefert eine kompakte Stringrepr\u00e4sentation des Bildes.\"\"\"\n ...\n\n def __str__(self) -> str:\n \"\"\"Liefert eine lesbare String-Repr\u00e4sentation des Bildes.\"\"\"\n ...\n\n def __add__(self, other: Image) -> Image:\n \"\"\"Erstellt ein neues Bild, indem f\u00fcr jedes Pixel die Helligkeitswerte der beiden Bilder addiert werden.\n\nExample: ``Image.HEART + Image.HAPPY``\n\n:param other: Das zu addierende Bild.\"\"\"\n ...\n\n def __sub__(self, other: Image) -> Image:\n \"\"\"Erstellt ein neues Bild, indem f\u00fcr jedes Pixel die Helligkeitswerte der beiden Bilder subtrahiert werden.\n\nExample: ``Image.HEART - Image.HEART_SMALL``\n\n:param other: Das zu subtrahierende Bild.\"\"\"\n ...\n\n def __mul__(self, n: float) -> Image:\n \"\"\"Erstellt ein neues Bild, indem der Helligkeitswert jedes Pixels mit ``n`` multipliziert wird.\n\nExample: ``Image.HEART * 0.5``\n\n:param n: Der Wert, mit dem multipliziert werden soll.\"\"\"\n ...\n\n def __truediv__(self, n: float) -> Image:\n \"\"\"Erstellt ein neues Bild, indem der Helligkeitswert jedes Pixels durch ``n`` dividiert wird.\n\nExample: ``Image.HEART / 2``\n\n:param n: Der Wert, durch den dividiert werden soll.\"\"\"\n ...\n\nclass SoundEvent:\n LOUD: SoundEvent\n \"\"\"Stellt den \u00dcbergang von Klangereignissen von ``quiet`` auf ``loud`` dar; wie beim Klatschen oder Rufen.\"\"\"\n QUIET: SoundEvent\n \"\"\"Stellt den \u00dcbergang von akustischen Ereignissen, wie Sprechen oder Hintergrundmusik, von ``loud`` zu ``quiet`` dar. (stumm)\"\"\"\n\nclass Sound:\n \"\"\"Die eingebauten Kl\u00e4nge k\u00f6nnen mit ``audio.play(Sound.NAME)`` aufgerufen werden.\"\"\"\n GIGGLE: Sound\n \"\"\"Kichern-Sound.\"\"\"\n HAPPY: Sound\n \"\"\"Happy-Sound.\"\"\"\n HELLO: Sound\n \"\"\"Begr\u00fc\u00dfung-Sound\"\"\"\n MYSTERIOUS: Sound\n \"\"\"Geheimnisvoll-Sound\"\"\"\n SAD: Sound\n \"\"\"Traurig-Sound.\"\"\"\n SLIDE: Sound\n \"\"\"Gleitender Ton.\"\"\"\n SOARING: Sound\n \"\"\"Aufsteigender Klang. (aufsteigend)\"\"\"\n SPRING: Sound\n \"\"\"Springfeder Klang (Sppringfeder)\"\"\"\n TWINKLE: Sound\n \"\"\"Funkeln Klang (Funkeln)\"\"\"\n YAWN: Sound\n \"\"\"G\u00e4hnen Klang\"\"\"", + "/typeshed/stdlib/microbit/accelerometer.pyi": "\"\"\"Messen Sie die Beschleunigung des micro:bit und erkennen Sie Gesten. (Beschleunigungssensor)\"\"\"\nfrom typing import Tuple\n\ndef get_x() -> int:\n \"\"\"Erhalte die Beschleunigungsmessung in der ``x`` -Achse in Milli-g. (erhalte 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 \"\"\"Erhalte die Beschleunigungsmessung in der ``y`` -Achse in Milli-g. (erhalte 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 \"\"\"Erhalte die Beschleunigungsmessung in der ``z`` -Achse in Milli-g. (erhalte 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 \"\"\"Erhalten Sie die Beschleunigungsmessungen in allen Achsen auf einmal als Tupel. (Werte erhalten)\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 \"\"\"Erhalte die Beschleunigungsmessung aller Achsen als positive Ganzzahl. Dies ist die euklidische Summe der X-, Y- und Z-Achsen. (erhalte St\u00e4rke)\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 \"\"\"Erhalte den Namen der aktuellen Geste. (derzeitige Geste)\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 \"\"\"\u00dcberpr\u00fcft, ob die benannte Geste derzeit aktiv ist. (ist Geste)\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: Der Name der Geste.\n:return: ``True`` if the gesture is active, ``False`` otherwise.\"\"\"\n ...\n\ndef was_gesture(name: str) -> bool:\n \"\"\"\u00dcberpr\u00fcft, ob die benannte Geste seit dem letzten Aufruf aktiv war. (war Geste)\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: Der Name der Geste.\n:return: ``True`` if the gesture was active since the last call, ``False`` otherwise.\"\"\"\n\ndef get_gestures() -> Tuple[str, ...]:\n \"\"\"Gibt ein Tupel der vergangenen Gesten zur\u00fcck. (erhalte Gesten)\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 \"\"\"Legen Sie den Bereich des Beschleunigungsmessers in g (Fallbeschleunigung) auf den n\u00e4chstgelegenen Wert fest, welcher von der Hardware unterst\u00fctzt wird. Diese sind ``2``, ``4``oder ``8`` g. (Bereich einstellen)\n\nExample: ``accelerometer.set_range(8)``\n\n:param value: (wert) Neuer Bereich f\u00fcr den Beschleunigungssensor, eine Ganzzahl in ``g``.\"\"\"", + "/typeshed/stdlib/microbit/audio.pyi": "\"\"\"T\u00f6ne mit dem micro:bit abspielen (Importiere ``audio`` f\u00fcr V1-Kompatibilit\u00e4t). (Audio)\"\"\"\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 \"\"\"Wiedergeben eines eingebauten Sounds, Soundeffekts oder benutzerdefinierten Aufnahme .\n\nExample: ``audio.play(Sound.GIGGLE)``\n\n:param source: (Quelle) Ein eingebauter ``Sound`` wie ``Sound.GIGGLE``, ein ``SoundEffect`` oder Beispieldaten als Teil eines ``AudioFrame`` Objekts.\n:param wait: Wenn ``wait`` ``True`` ist, wird diese Funktion blockiert, bis der Klang abgeschlossen ist.\n:param pin: Ein optionales Argument f\u00fcr den Ausgabepin kann angegeben werden, um die Standardeinstellung von ``pin0``zu \u00fcberschreiben. Wenn kein Ton wiedergegeben werden soll, kann ``pin=None`` verwendet werden.\n:param return_pin: (erhalte Pin) Bestimmt einen Pin, mit dem der externen Lautsprecher anstatt mit Ground verbunden wird. Dies wird bei der **V2** Revision ignoriert.\"\"\"\n\ndef is_playing() -> bool:\n \"\"\"\u00dcberpr\u00fcfen Sie, ob ein Ton abgespielt wird. (spielt gerade)\n\nExample: ``audio.is_playing()``\n\n:return: ``True`` if audio is playing, otherwise ``False``.\"\"\"\n ...\n\ndef stop() -> None:\n \"\"\"Stoppe jede Audio-Wiedergabe. (Stop)\n\nExample: ``audio.stop()``\"\"\"\n ...\n\nclass SoundEffect:\n \"\"\"Ein Soundeffekt, zusammengestellt aus einer Reihe von Parametern, die \u00fcber den Konstruktor oder durch Attribute konfiguriert werden.\"\"\"\n WAVEFORM_SINE: ClassVar[int]\n \"\"\"Sinuswelle als Parameter f\u00fcr ``waveform``. (Sinuswelle)\"\"\"\n WAVEFORM_SAWTOOTH: ClassVar[int]\n \"\"\"S\u00e4gezahnkurve als Parameter f\u00fcr ``waveform``. (S\u00e4gezahnkurve)\"\"\"\n WAVEFORM_TRIANGLE: ClassVar[int]\n \"\"\"Dreiecksignal als Parameter f\u00fcr ``waveform``. (Dreiecksignal)\"\"\"\n WAVEFORM_SQUARE: ClassVar[int]\n \"\"\"Rechtecksignal als Parameter f\u00fcr ``waveform``. (Rechtecksignal)\"\"\"\n WAVEFORM_NOISE: ClassVar[int]\n \"\"\"Rauschsignal als Parameter f\u00fcr ``waveform``. (Rauschsignal)\"\"\"\n SHAPE_LINEAR: ClassVar[int]\n \"\"\"Lineare Interpolation als Parameter f\u00fcr ``shape``. (lineare Interpolation)\"\"\"\n SHAPE_CURVE: ClassVar[int]\n \"\"\"Kurven-Interpolation als Parameter f\u00fcr ``shape``. (geschwungene Kurve)\"\"\"\n SHAPE_LOG: ClassVar[int]\n \"\"\"Logarithmische Interpolation als Parameter f\u00fcr ``shape``. (logarithmische Interpolation)\"\"\"\n FX_NONE: ClassVar[int]\n \"\"\"Kein Effekt f\u00fcr ``fx`` verwendet. (kein fx)\"\"\"\n FX_TREMOLO: ClassVar[int]\n \"\"\"Tremelo-Effekt als Parameter f\u00fcr ``fx``. (fx Tremolo)\"\"\"\n FX_VIBRATO: ClassVar[int]\n \"\"\"Vibrato-Effekt als Parameter f\u00fcr ``fx``. (fx Vibrato)\"\"\"\n FX_WARBLE: ClassVar[int]\n \"\"\"Triller-Effekt als Parameter f\u00fcr ``fx``. (fx Trillereffekt)\"\"\"\n freq_start: int\n \"\"\"Startfrequenz in Hertz (Hz), eine Zahl zwischen ``0`` und ``9999`` (Startfrequenz)\"\"\"\n freq_end: int\n \"\"\"Endfrequenz in Hertz (Hz), eine Zahl zwischen ``0`` und ``9999`` (Endfrequenz)\"\"\"\n duration: int\n \"\"\"Dauer des Klangs in Millisekunden, eine Zahl zwischen ``0`` und ``9999`` (Dauer)\"\"\"\n vol_start: int\n \"\"\"Startlautst\u00e4rke, eine Zahl zwischen ``0`` und ``255`` (vol Start)\"\"\"\n vol_end: int\n \"\"\"Endlautst\u00e4rke, eine Nummer zwischen ``0`` und ``255`` (vol Ende)\"\"\"\n waveform: int\n \"\"\"Typ der Sinuswelle, einer dieser Werte: ``WAVEFORM_SINE``, ``WAVEFORM_SAWTOOTH``, ``WAVEFORM_TRIANGLE``, ``WAVEFORM_SQUARE``, ``WAVEFORM_NOISE`` (zuf\u00e4llig generiertes Ger\u00e4usch)\"\"\"\n fx: int\n \"\"\"Effekt, der dem Sound hinzugef\u00fcgt werden soll, in Frage kommende Werte: ``FX_TREMOLO``, ``FX_VIBRATO``, ``FX_WARBLE``, oder ``FX_NONE``\"\"\"\n shape: int\n \"\"\"Die Art der Interpolationskurve zwischen der Anfangs- und der Endfrequenz. Verschiedene Wellenformen haben unterschiedliche Frequenz\u00e4nderungsraten. In Frage kommende Werte: ``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 \"\"\"Erstelle einen neuen Soundeffekt.\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: (Startfrequenz) Startfrequenz in Hertz (Hz), eine Zahl zwischen ``0`` und ``9999``.\n:param freq_end: (Endfrequenz) Endfrequenz in Hertz (Hz), eine Zahl zwischen ``0`` und ``9999``.\n:param duration: (Dauer) Dauer des Tons in Millisekunden, eine Zahl zwischen ``0`` und ``9999``.\n:param vol_start: (vol Start) Startlautst\u00e4rke, eine Zahl zwischen ``0`` und ``255``.\n:param vol_end: (vol Ende) Endlautst\u00e4rke, eine Nummer zwischen ``0`` und ``255``.\n:param waveform: Typ der Sinuswelle, einer dieser Werte: ``WAVEFORM_SINE``, ``WAVEFORM_SAWTOOTH``, ``WAVEFORM_TRIANGLE``, ``WAVEFORM_SQUARE``, ``WAVEFORM_NOISE`` (zuf\u00e4llig generiertes Ger\u00e4usch).\n:param fx: Effekt, der dem Sound hinzugef\u00fcgt werden soll, in Frage kommende Werte: ``FX_TREMOLO``, ``FX_VIBRATO``, ``FX_WARBLE``, oder ``FX_NONE``.\n:param shape: Die Art der Interpolationskurve zwischen der Anfangs- und der Endfrequenz. Verschiedene Wellenformen haben unterschiedliche Frequenz\u00e4nderungsraten. In Frage kommende Werte: ``SHAPE_LINEAR``, ``SHAPE_CURVE``, ``SHAPE_LOG``.\"\"\"\n\n def copy(self) -> SoundEffect:\n \"\"\"Erstelle eine Kopie dieses ``SoundEffect``. (kopieren)\n\nExample: ``sound_2 = sound_1.copy()``\n\n:return: A copy of the SoundEffect.\"\"\"\n\nclass AudioFrame:\n \"\"\"Ein ``AudioFrame``-Objekt ist eine Liste von 32 Samples, von denen jedes ein vorzeichenloses Byte ist \n(ganze Zahl zwischen 0 und 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 \"\"\"\u00dcberschreibe die Daten in diesem ``AudioFrame`` mit den Daten einer anderen ``AudioFrame`` Instanz.\n\nExample: ``my_frame.copyfrom(source_frame)``\n\n:param other: ``AudioFrame`` Instanz von der die Daten kopiert werden sollen.\"\"\"\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": "\"\"\"Benutze den eingebauten Kompass. (Kompass)\"\"\"\n\ndef calibrate() -> None:\n \"\"\"Startet den Kalibrierungsprozess.\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 \"\"\"\u00dcberpr\u00fcfe, dass der Kompass kalibriert ist. (ist kalibriert)\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 \"\"\"Setzt die Kalibrierung zur\u00fcck, sodass der Kompass nicht mehr kalibriert ist.\n\nExample: ``compass.clear_calibration()``\"\"\"\n ...\n\ndef get_x() -> int:\n \"\"\"Ermittle die Magnetfeldst\u00e4rke der ``x``-Achse. (erhalte 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 \"\"\"Ermittle die Magnetfeldst\u00e4rke der ``y``-Achse. (erhalte 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 \"\"\"Ermittle die Magnetfeldst\u00e4rke der ``z``-Achse. (erhalte 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 \"\"\"Ermittle die Kompassrichtung. (Ausrichtung)\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 \"\"\"Ermittle die Gr\u00f6\u00dfe des Magnetfelds um das Ger\u00e4t herum.\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": "\"\"\"Texte, Bilder und Animationen auf dem 5x5 LED-Display anzeigen. (Display)\"\"\"\nfrom ..microbit import Image\nfrom typing import Union, overload, Iterable\n\ndef get_pixel(x: int, y: int) -> int:\n \"\"\"Ermittle die Helligkeit der LED auf Spalte ``x`` und Zeile ``y``. (Pixelwerte holen)\n\nExample: ``display.get_pixel(0, 0)``\n\n:param x: Die Anzeige-Spalte (0..4)\n:param y: Die Anzeigezeile (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 \"\"\"\u00c4ndere die Helligkeit der LED auf Spalte ``x`` und Zeile ``y``. (Pixelwerte setzen)\n\nExample: ``display.set_pixel(0, 0, 9)``\n\n:param x: Die Anzeige-Spalte (0..4)\n:param y: Die Anzeigezeile (0..4)\n:param value: (wert) Die Helligkeit zwischen 0 (aus) und 9 (am hellsten)\"\"\"\n ...\n\ndef clear() -> None:\n \"\"\"Setzt die Helligkeit aller LEDs auf 0 (aus). (l\u00f6schen)\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 \"\"\"Zeigt Bilder, Buchstaben oder Ziffern auf der LED-Anzeige an.\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: Eine Zeichenkette, Nummer, Bild oder Liste der anzuzeigenden Bilder.\n:param delay: (Verz\u00f6gerung) Jeder Buchstabe, Ziffer oder Bild wird mit ``delay`` Millisekunden zwischen ihnen angezeigt.\n:param wait: Wenn ``wait`` ``True``ist, wird diese Funktion blockiert, bis die Animation beendet ist, andernfalls wird die Animation im Hintergrund stattfinden.\n:param loop: Wenn ``loop`` ``True``ist, wird sich die Animation f\u00fcr immer wiederholen.\n:param clear: (l\u00f6schen) Wenn ``clear`` ``True``ist, wird die Anzeige ausgeschaltet, nachdem die Sequenz beendet ist.\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 \"\"\"Scrollt eine Zahl oder einen Text auf dem LED-Display. (scrollen)\n\nExample: ``display.scroll('micro:bit')``\n\n:param text: Der zu wiederzugebende String. Wenn ``text`` eine Ganzzahl oder ein Float ist, wird er zuerst mit ``str()`` in einen String konvertiert.\n:param delay: (Verz\u00f6gerung) Der ``delay`` -Parameter bestimmt, wie schnell der Text scrollt.\n:param wait: Wenn ``wait`` ``True``ist, wird diese Funktion blockiert, bis die Animation beendet ist, andernfalls wird die Animation im Hintergrund stattfinden.\n:param loop: Wenn ``loop`` ``True``ist, wird sich die Animation f\u00fcr immer wiederholen.\n:param monospace: (Monospace) Wenn ``monospace`` ``True``ist, werden alle Zeichen 5 Pixel breit sein. Zwischen den Zeichen gibt es beim scrollen genau 1 leere Pixelspalte.\n\nThe ``wait``, ``loop`` and ``monospace`` arguments must be specified\nusing their keyword.\"\"\"\n ...\n\ndef on() -> None:\n \"\"\"Schalten Sie das LED-Display ein. (an)\n\nExample: ``display.on()``\"\"\"\n ...\n\ndef off() -> None:\n \"\"\"Schalten Sie die LED-Anzeige aus (das Deaktivieren des Displays erlaubt es Ihnen, die GPIO-Pins f\u00fcr andere Zwecke zu verwenden).\n\nExample: ``display.off()``\"\"\"\n ...\n\ndef is_on() -> bool:\n \"\"\"\u00dcberpr\u00fcfen Sie, ob die LED-Anzeige aktiviert ist. (ist an)\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 \"\"\"Bestimmt die Lichtintensit\u00e4t. (bestimme Licht Intensit\u00e4t)\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 ...", "/typeshed/stdlib/microbit/i2c.pyi": "\"\"\"Kommunikation mit Ger\u00e4ten \u00fcber das I2C-Busprotokoll.\"\"\"\nfrom _typeshed import ReadableBuffer\nfrom ..microbit import MicroBitDigitalPin, pin19, pin20\nfrom typing import List\n\ndef init(freq: int=100000, sda: MicroBitDigitalPin=pin20, scl: MicroBitDigitalPin=pin19) -> None:\n \"\"\"Eine Peripherie neu initialisieren.\n\nExample: ``i2c.init()``\n\n:param freq: Taktfrequenz\n:param sda: ``sda`` Pin (standardm\u00e4\u00dfig 20)\n:param scl: ``scl`` Pin (standardm\u00e4\u00dfig 19)\n\nOn a micro:bit V1 board, changing the I\u00b2C pins from defaults will make\nthe accelerometer and compass stop working, as they are connected\ninternally to those pins. This warning does not apply to the **V2**\nrevision of the micro:bit as this has `separate I\u00b2C lines `_\nfor the motion sensors and the edge connector.\"\"\"\n ...\n\ndef scan() -> List[int]:\n \"\"\"Scannt den Bus nach Ger\u00e4ten.\n\nExample: ``i2c.scan()``\n\n:return: A list of 7-bit addresses corresponding to those devices that responded to the scan.\"\"\"\n ...\n\ndef read(addr: int, n: int, repeat: bool=False) -> bytes:\n \"\"\"Liest Bytes von einem Ger\u00e4t..\n\nExample: ``i2c.read(0x50, 64)``\n\n:param addr: Die 7-Bit-Adresse des Ger\u00e4ts\n:param n: Die Anzahl der zu lesenden Bytes\n:param repeat: (wiederholen) Wenn ``True``wird kein Stop-Bit gesendet\n:return: The bytes read\"\"\"\n ...\n\ndef write(addr: int, buf: ReadableBuffer, repeat: bool=False) -> None:\n \"\"\"Schreibe Bytes auf ein Ger\u00e4t. (schreiben)\n\nExample: ``i2c.write(0x50, bytes([1, 2, 3]))``\n\n:param addr: Die 7-Bit-Adresse des Ger\u00e4ts\n:param buf: Ein Puffer mit den zu schreibenden Bytes\n:param repeat: (wiederholen) Wenn ``True``wird kein Stop-Bit gesendet\"\"\"\n ...", "/typeshed/stdlib/microbit/microphone.pyi": "\"\"\"Reagiere auf Ton mithilfe des integrierten Mikrofons (nur V2). (Mikrofon)\"\"\"\nfrom typing import Optional, Tuple\nfrom ..microbit import SoundEvent\n\ndef current_event() -> Optional[SoundEvent]:\n \"\"\"Abrufen des letzten aufgezeichneten Sound-Ereignisses\n\nExample: ``microphone.current_event()``\n\n:return: The event, ``SoundEvent('loud')`` or ``SoundEvent('quiet')``.\"\"\"\n ...\n\ndef was_event(event: SoundEvent) -> bool:\n \"\"\"\u00dcberpr\u00fcfung, ob seit dem letzten Anruf mindestens einmal ein Ger\u00e4usch geh\u00f6rt wurde.\n\nExample: ``microphone.was_event(SoundEvent.LOUD)``\n\nThis call clears the sound history before returning.\n\n:param event: Das Ereignis, auf das gepr\u00fcft werden soll, z. B. ``SoundEvent.LOUD`` oder ``SoundEvent.QUIET``\n:return: ``True`` if sound was heard at least once since the last call, otherwise ``False``.\"\"\"\n ...\n\ndef is_event(event: SoundEvent) -> bool:\n \"\"\"\u00dcberpr\u00fcfe das zuletzt erkannte Sound-Ereignis.\n\nExample: ``microphone.is_event(SoundEvent.LOUD)``\n\nThis call does not clear the sound event history.\n\n:param event: Das Ereignis, auf das gepr\u00fcft werden soll, z. B. ``SoundEvent.LOUD`` oder ``SoundEvent.QUIET``\n:return: ``True`` if sound was the most recent heard, ``False`` otherwise.\"\"\"\n ...\n\ndef get_events() -> Tuple[SoundEvent, ...]:\n \"\"\"Liefert den Verlauf der Sound-Ereignisse in Form eines Tupels.\n\nExample: ``microphone.get_events()``\n\nThis call clears the sound history before returning.\n\n:return: A tuple of the event history with the most recent event last.\"\"\"\n ...\n\ndef set_threshold(event: SoundEvent, value: int) -> None:\n \"\"\"Legt den Schwellenwert f\u00fcr ein Sound-Ereignis fest.\n\nExample: ``microphone.set_threshold(SoundEvent.LOUD, 250)``\n\nA high threshold means the event will only trigger if the sound is very loud (>= 250 in the example).\n\n:param event: Ein Sound-Ereignis, wie ``SoundEvent.LOUD`` oder ``SoundEvent.QUIET``.\n:param value: (wert) Der Schwellenwert im Bereich 0-255.\"\"\"\n ...\n\ndef sound_level() -> int:\n \"\"\"Ermittle den Schalldruckpegel. (Lautst\u00e4rke)\n\nExample: ``microphone.sound_level()``\n\n:return: A representation of the sound pressure level in the range 0 to 255.\"\"\"\n ...", - "/typeshed/stdlib/microbit/speaker.pyi": "\"\"\"Steuere den integrierten Lautsprecher (nur V2). (Lautsprecher)\"\"\"\n\ndef off() -> None:\n \"\"\"Lautsprecher ausschalten.\n\nExample: ``speaker.off()``\n\nThis does not disable sound output to an edge connector pin.\"\"\"\n ...\n\ndef on() -> None:\n \"\"\"Lautsprecher einschalten.\n\nExample: ``speaker.on()``\"\"\"\n ...", + "/typeshed/stdlib/microbit/speaker.pyi": "\"\"\"Steuere den integrierten Lautsprecher (nur V2). (Lautsprecher)\"\"\"\n\ndef off() -> None:\n \"\"\"Lautsprecher ausschalten.\n\nExample: ``speaker.off()``\n\nThis does not disable sound output to an edge connector pin.\"\"\"\n ...\n\ndef on() -> None:\n \"\"\"Lautsprecher einschalten. (an)\n\nExample: ``speaker.on()``\"\"\"\n ...", "/typeshed/stdlib/microbit/spi.pyi": "\"\"\"Kommunikation mit Ger\u00e4ten \u00fcber die serielle Schnittstelle (SPI).\"\"\"\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-Kommunikation initialisieren.\n\nExample: ``spi.init()``\n\nFor correct communication, the parameters have to be the same on both communicating devices.\n\n:param baudrate: Die \u00dcbertragungsgeschwindigkeit.\n:param bits: Die Breite in Bits jeder \u00dcbertragung. Derzeit wird nur ``bits=8`` unterst\u00fctzt. Dies kann sich jedoch in Zukunft \u00e4ndern.\n:param mode: Legt die Kombination aus Taktpolarit\u00e4t und Phase fest - `siehe Online-Tabelle `_.\n:param sclk: SCLK Pin (standardm\u00e4\u00dfig 13)\n:param mosi: MOSI Pin (standardm\u00e4\u00dfig 15)\n:param miso: miso pin (Voreinstellung 14)\"\"\"\n ...\n\ndef read(nbytes: int) -> bytes:\n \"\"\"Bytes lesen.\n\nExample: ``spi.read(64)``\n\n:param nbytes: Maximum der zu lesenden Bytes.\n:return: The bytes read.\"\"\"\n ...\n\ndef write(buffer: ReadableBuffer) -> None:\n \"\"\"Schreibe Bytes auf den Bus. (schreiben)\n\nExample: ``spi.write(bytes([1, 2, 3]))``\n\n:param buffer: (Puffer) Ein Puffer, von dem Daten gelesen werden.\"\"\"\n ...\n\ndef write_readinto(out: WriteableBuffer, in_: ReadableBuffer) -> None:\n \"\"\"Schreibe den ``out`` Zwischenspeicher (Buffer) auf den Bus und lies jede Antwort in den ``in_`` Buffer.\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: Der Puffer, in den eine Antwort geschrieben werden soll.\n:param in_: Der Puffer, von dem Daten gelesen werden.\"\"\"\n ...", "/typeshed/stdlib/microbit/uart.pyi": "\"\"\"Verbindet mit einem Ger\u00e4t \u00fcber eine serielle Schnittstelle.\"\"\"\nfrom _typeshed import WriteableBuffer\nfrom ..microbit import MicroBitDigitalPin\nfrom typing import Optional, Union\nODD: int\n\"\"\"Ungerade Parit\u00e4t\"\"\"\nEVEN: int\n\"\"\"Gerade Parit\u00e4t (gerade)\"\"\"\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 \"\"\"Initialisiere die serielle Kommunikation.\n\nExample: ``uart.init(115200, tx=pin0, rx=pin1)``\n\n:param baudrate: (Baudrate) Die \u00dcbertragungsgeschwindigkeit.\n:param bits: (Bits) Die Gr\u00f6\u00dfe der Bytes die \u00fcbertragen werden. micro:bit unterst\u00fctzt nur 8.\n:param parity: (Parit\u00e4t) Wie Parit\u00e4t gepr\u00fcft wird, ``None``, ``uart.ODD`` oder ``uart.EVEN``.\n:param stop: (Stop) Die Anzahl der Stopbits, muss 1 f\u00fcr micro:bit sein.\n:param tx: Sendepin.\n:param rx: Empfangspin.\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 \"\"\"\u00dcberpr\u00fcfen Sie, ob irgendwelche Daten warten.\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 \"\"\"Bytes lesen.\n\nExample: ``uart.read()``\n\n:param nbytes: Wenn ``nbytes`` angegeben ist, werden h\u00f6chstens so viele Bytes gelesen. Andernfalls werden so viele Bytes wie m\u00f6glich gelesen.\n:return: A bytes object or ``None`` on timeout\"\"\"\n ...\n\ndef readinto(buf: WriteableBuffer, nbytes: Optional[int]=None) -> Optional[int]:\n \"\"\"Lese Bytes in ``buf``.\n\nExample: ``uart.readinto(input_buffer)``\n\n:param buf: Der Puffer, in den geschrieben werden soll.\n:param nbytes: Wenn ``nbytes`` angegeben ist, werden h\u00f6chstens so viele Bytes gelesen. Andernfalls werden ``len(buf)`` Bytes gelesen.\n:return: number of bytes read and stored into ``buf`` or ``None`` on timeout.\"\"\"\n ...\n\ndef readline() -> Optional[bytes]:\n \"\"\"Liest eine Zeile bis zum Zeilenumbruch.\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 \"\"\"Schreibt einen Puffer auf den Bus. (schreiben)\n\nExample: ``uart.write('hello world')``\n\n:param buf: Ein Byte-Objekt oder ein String.\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", + "/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", "/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.en.json b/src/micropython/main/typeshed.en.json index bc1ca4af5..56826ea8f 100644 --- a/src/micropython/main/typeshed.en.json +++ b/src/micropython/main/typeshed.en.json @@ -5,7 +5,7 @@ "/typeshed/stdlib/antigravity.pyi": "", "/typeshed/stdlib/array.pyi": "from typing import Generic, Iterable, MutableSequence, TypeVar, Union, overload\nfrom typing_extensions import Literal\n\n_IntTypeCode = Literal[\"b\", \"B\", \"h\", \"H\", \"i\", \"I\", \"l\", \"L\", \"q\", \"Q\"]\n_FloatTypeCode = Literal[\"f\", \"d\"]\n_TypeCode = Union[_IntTypeCode, _FloatTypeCode]\n\n_T = TypeVar(\"_T\", int, float)\n\nclass array(MutableSequence[_T], Generic[_T]):\n @overload\n def __init__(\n self: array[int],\n typecode: _IntTypeCode,\n __initializer: Union[bytes, Iterable[_T]] = ...,\n ) -> None: ...\n @overload\n def __init__(\n self: array[float],\n typecode: _FloatTypeCode,\n __initializer: Union[bytes, Iterable[_T]] = ...,\n ) -> None: ...\n @overload\n def __init__(\n self, typecode: str, __initializer: Union[bytes, Iterable[_T]] = ...\n ) -> None: ...\n def append(self, __v: _T) -> None: ...\n def decode(self) -> str: ...\n def extend(self, __bb: Iterable[_T]) -> None: ...\n def __len__(self) -> int: ...\n @overload\n def __getitem__(self, i: int) -> _T: ...\n @overload\n def __getitem__(self, s: slice) -> array[_T]: ...\n @overload # type: ignore # Overrides MutableSequence\n def __setitem__(self, i: int, o: _T) -> None: ...\n @overload\n def __setitem__(self, s: slice, o: array[_T]) -> None: ...\n def __add__(self, x: array[_T]) -> array[_T]: ...\n def __iadd__(self, x: array[_T]) -> array[_T]: ... # type: ignore # Overrides MutableSequence\n\nArrayType = array\n", "/typeshed/stdlib/audio.pyi": "\"\"\"Play sounds using the micro:bit (import ``audio`` for V1 compatibility).\n\"\"\"\n\n# Re-export for V1 compatibility.\nfrom .microbit.audio import (\n is_playing as is_playing,\n play as play,\n stop as stop,\n AudioFrame as AudioFrame,\n SoundEffect as SoundEffect,\n)\n", - "/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 frozenset(AbstractSet[_T_co], Generic[_T_co]):\n @overload\n def __new__(cls: type[Self]) -> Self: ...\n @overload\n def __new__(cls: type[Self], __iterable: Iterable[_T_co]) -> Self: ...\n def copy(self) -> FrozenSet[_T_co]: ...\n def difference(self, *s: Iterable[object]) -> FrozenSet[_T_co]: ...\n def intersection(self, *s: Iterable[object]) -> FrozenSet[_T_co]: ...\n def isdisjoint(self, s: Iterable[_T_co]) -> bool: ...\n def issubset(self, s: Iterable[object]) -> bool: ...\n def issuperset(self, s: Iterable[object]) -> bool: ...\n def symmetric_difference(self, s: Iterable[_T_co]) -> FrozenSet[_T_co]: ...\n def union(self, *s: Iterable[_T_co]) -> FrozenSet[_T_co]: ...\n def __len__(self) -> int: ...\n def __contains__(self, o: object) -> bool: ...\n def __iter__(self) -> Iterator[_T_co]: ...\n def __str__(self) -> str: ...\n def __and__(self, s: AbstractSet[_T_co]) -> FrozenSet[_T_co]: ...\n def __or__(self, s: AbstractSet[_S]) -> FrozenSet[_T_co | _S]: ...\n def __sub__(self, s: AbstractSet[_T_co]) -> FrozenSet[_T_co]: ...\n def __xor__(self, s: AbstractSet[_S]) -> FrozenSet[_T_co | _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 if sys.version_info >= (3, 9):\n def __class_getitem__(cls, item: Any) -> GenericAlias: ...\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/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 \"\"\"Get the type of an object.\n\n Example: ``type(\"hello, world)``\n\n :return: The type of the object passed in.\n \"\"\"\n ...\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 \"\"\"Get an integer from a number or a string.\n \"\"\"\n @overload\n def __new__(\n cls: Type[_T],\n x: str | bytes | SupportsInt | SupportsIndex | _SupportsTrunc = ...,\n ) -> _T:\n \"\"\"Get an integer from a number or a string.\n\n Example: ``int(\"1.2\")``\n\n :return: Zero if no argument is provided, or an ``int`` from a number or string truncated toward zero.\n \"\"\"\n ...\n @overload\n def __new__(\n cls: Type[_T], x: str | bytes | bytearray, base: SupportsIndex\n ) -> _T:\n \"\"\"Get an integer from a number or a string.\n\n Example: ``int(\"8.3\", 2)``\n\n :param base: (default=10) Allowed bases are 0 and 2\u201336.\n :return: Zero if no argument is provided, or an ``int`` from a number or string truncated toward zero.\n \"\"\"\n ...\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 \"\"\"Get a float from a number or a string.\n \"\"\"\n def __new__(\n cls: Type[_T], x: SupportsFloat | SupportsIndex | str | bytes | bytearray = ...\n ) -> _T:\n \"\"\"Convert a string or number to a floating point number, if possible.\n\n Example: ``float(\"1.2\")``\n\n :return: ``0.0`` if no argument is provided, or a ``float`` from a number or string.\n \"\"\"\n ...\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 \"\"\"Get a string version of an object or new empty string.\n \"\"\"\n @overload\n def __new__(cls: Type[_T], object: object = \"\") -> _T:\n \"\"\"Get a string version of an object.\n\n Example: ``string = str(42)``\n \n :param object: (default=\"\") Object to return a string version of.\n :return: A string reprentation of an object.\n \"\"\"\n ...\n @overload\n def __new__(\n cls: Type[_T], object: bytes = b\"\", encoding: str = \"uft-8\", errors: str = \"strict\"\n ) -> _T:\n \"\"\"Get a string version of an object.\n\n Example: ``string = str(42)``\n \n :param object: (default=b\"\") Object to return a string version of as bytes or a bytearray.\n :param encoding: (default=\"uft-8\") Encoding used to decode object.\n :param errors: (default=\"strict\") Something about error handling...\n :return: A string reprentation of an object.\n \"\"\"\n ...\n def count(\n self,\n x: str,\n __start: SupportsIndex | None = ...,\n __end: SupportsIndex | None = ...,\n ) -> int:\n \"\"\"Get the number of non-overlapping occurences of a substring in the string.\n\n The optional ``__start`` and ``__end`` arguments can be used to specify a substring in which to count.\n\n Example: ``count = \"banana\".count(\"na\")``\n \n :param x: The substring to count.\n :param __start: Optional argument to specify the start of the substring in which to count.\n :param __end: Optional argument to specify the end of the substring in which to count.\n :return: The number of non-overlapping occurences of a substring in the string as an ``int``.\n \"\"\"\n ...\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 \"\"\"Check if the string ends with a substring.\n\n The optional ``__start`` and ``__end`` arguments can be used to specify the range to test.\n\n Example: ``ends_with_hello = \"hello, world\".endswith(\"hello\")``\n \n :param __prefix: The prefix to check for.\n :param __start: Optional argument to specify the start of the substring to test.\n :param __end: Optional argument to specify the end of the substring to test.\n :return: ``True`` if the string ends with the substring, otherwise ``False``.\n \"\"\"\n ...\n def find(\n self,\n __sub: str,\n __start: SupportsIndex | None = ...,\n __end: SupportsIndex | None = ...,\n ) -> int:\n \"\"\"Get the lowest index of where the substring is found.\n\n The optional ``__start`` and ``__end`` arguments can be used to specify a substring in which to search.\n\n Example: ``index = \"banana\".find(\"na\")``\n \n :param __sub: The substring to find.\n :param __start: Optional argument to specify the start of the substring in which to search.\n :param __end: Optional argument to specify the end of the substring in which to search.\n :return: The the lowest index of where the substring is found, -1 if not found.\n \"\"\"\n ...\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 \"\"\"Check if all the characters in the string are alphabetical.\n\n Example: ``\"Hello\".isalpha()``\n \n :return: ``True`` if the string is at least one character long and all the characters in the string are alphabetical, otherwise ``False``.\n \"\"\"\n ...\n def isdigit(self) -> bool:\n \"\"\"Check if all the characters in the string are digits.\n\n Example: ``\"123\".isdigit()``\n \n :return: ``True`` if the string is at least one character long and all the characters in the string are digits, otherwise ``False``.\n \"\"\"\n ...\n def islower(self) -> bool:\n \"\"\"Check if all the characters in the string are lower case.\n\n Example: ``\"hello\".islower()``\n \n :return: ``True`` if the string is at least one character long and all the characters in the string are lower case, otherwise ``False``.\n \"\"\"\n ...\n def isspace(self) -> bool:\n \"\"\"Check if all the characters in the string are whitespace characters.\n\n Example: ``\" \".isspace()``\n \n :return: ``True`` if the string is at least one character long and all the characters in the string are whitespace characters, otherwise ``False``.\n \"\"\"\n ...\n def isupper(self) -> bool:\n \"\"\"Check if all the characters in the string are upper case.\n\n Example: ``\"HELLO\".isupper()``\n \n :return: ``True`` if the string is at least one character long and all the characters in the string are upper case, otherwise ``False``.\n \"\"\"\n ...\n def join(self, __iterable: Iterable[str]) -> str: ...\n def lower(self) -> str:\n \"\"\"Get a copy of the string in lower case.\n\n Example: ``as_lower_case = \"HELLO\".lower()``\n \n :return: A copy of the string in lower case.\n \"\"\"\n ...\n def lstrip(self, __chars: str | None = ...) -> str:\n \"\"\"Get a copy of the string with the leading characters removed.\n\n Example: ``stripped = \" hello\".lstrip()``\n \n :param __chars: (default=\" \") The characters to be removed. Defaults to whitespace characters if not provided.\n :return: A copy of the string with the leading characters removed.\n \"\"\"\n ...\n def replace(self, __old: str, __new: str, __count: SupportsIndex = ...) -> str:\n \"\"\"Get a copy of the string with all occurrences of the old substring replaced by new.\n\n Example: ``replaced = \"apple, orange\".replace(\"orange\", \"banana\")``\n \n :param __old: The substring to replace.\n :param __new: The replacement substring.\n :param __count: Optional argument to specify the number of occurences of the old substring that should be replaced.\n :return: A copy of the string with all occurrences of the old substring replaced by new.\n \"\"\"\n ...\n def rfind(\n self,\n __sub: str,\n __start: SupportsIndex | None = ...,\n __end: SupportsIndex | None = ...,\n ) -> int:\n \"\"\"Get the highest index of where the substring is found.\n\n The optional ``__start`` and ``__end`` arguments can be used to specify a substring in which to search.\n\n Example: ``index = \"banana\".rfind(\"na\")``\n\n :param __sub: The substring to find.\n :param __start: Optional argument to specify the start of the substring in which to search.\n :param __end: Optional argument to specify the end of the substring in which to search.\n :return: The the highest index of where the substring is found, -1 if not found.\n \"\"\"\n ...\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 \"\"\"Get a copy of the string with the trailing characters removed.\n\n Example: ``stripped = \"hello \".rstrip()``\n \n :param __chars: (default=\" \") The characters to be removed. Defaults to whitespace characters if not provided.\n :return: A copy of the string with the trailing characters removed.\n \"\"\"\n ...\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 \"\"\"Check if the string starts with a substring.\n\n The optional ``__start`` and ``__end`` arguments can be used to specify the range to test.\n\n Example: ``starts_with_hello = \"hello, world\".startswith(\"hello\")``\n \n :param __prefix: The prefix to check for.\n :param __start: Optional argument to specify the start of the substring to test.\n :param __end: Optional argument to specify the end of the substring to test.\n :return: ``True`` if the string starts with the substring, otherwise ``False``.\n \"\"\"\n ...\n def strip(self, __chars: str | None = ...) -> str:\n \"\"\"Get a copy of the string with the leading and trailing characters removed.\n\n Example: ``stripped = \" hello \".strip()``\n \n :param __chars: (default=\" \") The characters to be removed. Defaults to whitespace characters if not provided.\n :return: A copy of the string with the leading and trailing characters removed.\n \"\"\"\n ...\n def upper(self) -> str:\n \"\"\"Get a copy of the string in upper case.\n\n Example: ``as_upper_case = \"hello\".upper()``\n \n :return: A copy of the string in upper case.\n \"\"\"\n ...\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 frozenset(AbstractSet[_T_co], Generic[_T_co]):\n @overload\n def __new__(cls: type[Self]) -> Self: ...\n @overload\n def __new__(cls: type[Self], __iterable: Iterable[_T_co]) -> Self: ...\n def copy(self) -> FrozenSet[_T_co]: ...\n def difference(self, *s: Iterable[object]) -> FrozenSet[_T_co]: ...\n def intersection(self, *s: Iterable[object]) -> FrozenSet[_T_co]: ...\n def isdisjoint(self, s: Iterable[_T_co]) -> bool: ...\n def issubset(self, s: Iterable[object]) -> bool: ...\n def issuperset(self, s: Iterable[object]) -> bool: ...\n def symmetric_difference(self, s: Iterable[_T_co]) -> FrozenSet[_T_co]: ...\n def union(self, *s: Iterable[_T_co]) -> FrozenSet[_T_co]: ...\n def __len__(self) -> int: ...\n def __contains__(self, o: object) -> bool: ...\n def __iter__(self) -> Iterator[_T_co]: ...\n def __str__(self) -> str: ...\n def __and__(self, s: AbstractSet[_T_co]) -> FrozenSet[_T_co]: ...\n def __or__(self, s: AbstractSet[_S]) -> FrozenSet[_T_co | _S]: ...\n def __sub__(self, s: AbstractSet[_T_co]) -> FrozenSet[_T_co]: ...\n def __xor__(self, s: AbstractSet[_S]) -> FrozenSet[_T_co | _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 if sys.version_info >= (3, 9):\n def __class_getitem__(cls, item: Any) -> GenericAlias: ...\n\nclass list(MutableSequence[_T], Generic[_T]):\n \"\"\"The list data type\n \"\"\"\n @overload\n def __init__(self) -> None: ...\n @overload\n def __init__(self, iterable: Iterable[_T]) -> None: ...\n def clear(self) -> None:\n \"\"\"Remove all items from the list.\n \"\"\"\n ...\n def copy(self) -> list[_T]: ...\n def append(self, __object: _T) -> None:\n \"\"\"Add an item to the end of the list.\n\n Example: ``[1, 2, 3].append(4)``\n \n :param __object: An item to add the end of the list.\n \"\"\"\n ...\n def extend(self, __iterable: Iterable[_T]) -> None: ...\n def pop(self, __index: SupportsIndex = ...) -> _T:\n \"\"\"Remove and return an item from the list.\n\n If no ``index`` is provided, the last item in the list is removed.\n An ``IndexError`` is raised if the ``index`` is outside of the list range.\n\n Example: ``[1, 2, 3, 4].pop()``\n \n :param __index: The index of the item to remove.\n :return: An item from the list.\n \"\"\"\n ...\n def index(\n self, __value: _T, __start: SupportsIndex = ..., __stop: SupportsIndex = ...\n ) -> int: ...\n def count(self, __value: _T) -> int:\n \"\"\"Get the number of times an item appears in the list.\n\n Example: ``[\"a\", \"b\", \"a\"].count(\"a\")``\n \n :param __value: The item to count.\n :return: The number of times an item appears in the list.\n \"\"\"\n ...\n def insert(self, __index: SupportsIndex, __object: _T) -> None:\n \"\"\"Insert an item into the list at a given position.\n\n Example: ``[\"a\", \"b\", \"a\"].insert(2, \"c\")``\n \n :param __index: The position at which to insert the item.\n :param __object: The item to insert.\n \"\"\"\n ...\n def remove(self, __value: _T) -> None:\n \"\"\"Remove the first occurence of a value from the list.\n\n A ``ValueError`` is raised if the ``value`` does not appear in the list.\n\n Example: ``[\"a\", \"b\", \"a\"].remove(\"a\")``\n \n :param __value: The item to remove.\n \"\"\"\n ...\n def reverse(self) -> None:\n \"\"\"Reverses the order of the items in the list, in place.\n\n Example: ``[3, 2, 1].reverse()`\n \"\"\"\n ...\n @overload\n def sort(\n self: list[SupportsLessThanT], *, key: None = None, reverse: bool = False\n ) -> None:\n \"\"\"Sorts the items in the list, in place.\n\n Example: ``[1, 3, 2].sort()`\n\n :param key: A function used to specify the comparison between items in the list.\n :param reverse: A ``bool`` used to reverse the sorting order.\n \"\"\"\n ...\n @overload\n def sort(\n self, *, key: Callable[[_T], SupportsLessThan], reverse: bool = False\n ) -> None:\n \"\"\"Sorts the items in the list, in place.\n\n Example: ``['Watermelon', 'avocado'].sort(str.lower)``\n\n :param key: A function used to specify the comparison between items in the list.\n :param reverse: A ``bool`` used to reverse the sorting order.\n \"\"\"\n ...\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 \"\"\"Get a range of values from 0 up tp the stop parameter.\n\n Example: ``rangeTimesTwo = [x * 2 for x in range(5)]``\n \n :param stop: An integer to determine the end of the range (exclusive).\n :return: A range object\n \"\"\"\n ...\n @overload\n def __init__(\n self, start: SupportsIndex, stop: SupportsIndex, step: SupportsIndex = ...\n ) -> None:\n \"\"\"Get a range of values from 0 up tp the stop parameter.\n\n Example: ``rangeTimesTwo = [x * 2 for x in range(1, 11, 2)]``\n \n :param start: (default=0) An integer to determine the start of the range (inclusive).\n :param stop: An integer to determine the end of the range (exclusive).\n :param step: (default=1) The increment for each value in the range.\n :return: A range object\n \"\"\"\n ...\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:\n \"\"\"Get the absolute value of a number.\n\n Example: ``abs(-42)``\n\n :param __x: A number.\n :return: The length of or number of items in an object. \n \"\"\" \n ...\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 \"\"\"Get a Unicode string representation of an integer.\n\n Example: ``chr(97)``\n\n :param __i: An integer within the range 0..1,114,111.\n :return: A Unicode string representation of a number within a valid range. \n \"\"\" \n ...\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(request: object) -> None:\n \"\"\"Starts interactive help or provides help for the request object, if valid.\n\n Example: ``help(\"print\")``\n \"\"\"\n ...\ndef hex(__number: int | SupportsIndex) -> str:\n \"\"\"Get the hexadecimal representation of an integer.\n\n Example: ``hex(42)``\n \n :return: The hexadecimal representation of an integer as a string.\n \"\"\"\n ...\ndef id(__obj: object) -> int: ...\ndef input(prompt: object = \"\") -> str:\n \"\"\"Get user input as a string.\n\n Example: ``prompt(\"Enter your name: \")``\n\n :param prompt: (default=\"\") Text prompt seen by users.\n :return: The length of or number of items in an object.\n \"\"\"\n ...\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:\n \"\"\"Get the length of, or number of items in an object.\n\n Example: ``len(\"Hello, world\")``\n\n :param __obj: A sequence (such as a string, bytes, tuple, list, or range) or a collection (such as a dictionary, set, or frozen set).\n :return: The length of or number of items in an object.\n \"\"\" \n ...\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:\n \"\"\"Get an integer representation of a Unicode character.\n\n Example: ``ord(\"a\")``\n\n :param __c: A Unicode character.\n :return: The length of or number of items in an object.\n \"\"\"\n ...\ndef print(\n *values: object,\n sep: str | None = \" \",\n end: str | None = \"\\n\",\n file: SupportsWrite[str] | None = None,\n flush: bool = False,\n) -> None:\n \"\"\"Prints values to a stream or standard output, typically the serial console.\n\n Example: ``print(\"Hello, world\")``\n\n :param *values: Arguments or literals to print.\n :param sep: (default=\" \") A string separator inserted between values.\n :param end: (default=\"\\n\") A string appended after the last value.\n :param file: (default=None) A file-like object (stream).\n :param flush: (default=False) Whether to forcibly flush the stream.\n \"\"\"\n ...\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 \"\"\"Round a number to the nearest integer.\n\n Example: ``round(42.42)``\n\n :param number: A number to round to the nearest integer.\n :return: Round a number to the nearest integer.\n \"\"\"\n ...\n@overload\ndef round(number: SupportsRound[Any], ndigits: None) -> int:\n \"\"\"Round a number to the nearest integer.\n\n Example: ``round(42.42, None)``\n\n :param number: A number to round to the nearest integer.\n :param ndigits: The number of decimal digits to round to.\n :return: Round a number to the nearest integer.\n \"\"\"\n ...\n@overload\ndef round(number: SupportsRound[_T], ndigits: SupportsIndex) -> _T:\n \"\"\"Round a number to the nearest integer.\n\n Example: ``round(42.42, 1)``\n\n :param number: A number to round to the number of decimal digits specified.\n :param ndigits: The number of decimal digits to round to.\n :return: The input number rounded to the number of decimal digits specified.\n \"\"\"\n ...\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": "\"\"\"Control the garbage collector\"\"\"\n\nfrom typing import overload\n\ndef enable() -> None:\n \"\"\"Enable automatic garbage collection.\"\"\"\n ...\n\ndef disable() -> None:\n \"\"\"Disable automatic garbage collection.\n\n Heap memory can still be allocated,\n and garbage collection can still be initiated manually using ``gc.collect``.\"\"\"\n\ndef collect() -> None:\n \"\"\"Run a garbage collection.\"\"\"\n ...\n\ndef mem_alloc() -> int:\n \"\"\"Get the number of bytes of heap RAM that are allocated.\n\n :return: The number of bytes allocated.\n\n This function is MicroPython extension.\n \"\"\"\n ...\n\ndef mem_free() -> int:\n \"\"\"Get the number of bytes of available heap RAM, or -1 if this amount is not known.\n\n :return: The number of bytes free.\n\n This function is MicroPython extension.\n \"\"\"\n ...\n\n@overload\ndef threshold() -> int:\n \"\"\"Query the additional GC allocation threshold.\n\n :return: The GC allocation threshold.\n\n This function is a MicroPython extension. CPython has a similar\n function - ``set_threshold()``, but due to different GC\n implementations, its signature and semantics are different.\n \"\"\"\n ...\n\n@overload\ndef threshold(amount: int) -> None:\n \"\"\"Set the additional GC allocation threshold.\n\n Normally, a collection is triggered only when a new allocation\n cannot be satisfied, i.e. on an out-of-memory (OOM) condition.\n If this function is called, in addition to OOM, a collection\n will be triggered each time after ``amount`` bytes have been\n allocated (in total, since the previous time such an amount of bytes\n have been allocated). ``amount`` is usually specified as less than the\n full heap size, with the intention to trigger a collection earlier than when the\n heap becomes exhausted, and in the hope that an early collection will prevent\n excessive memory fragmentation. This is a heuristic measure, the effect\n of which will vary from application to application, as well as\n the optimal value of the ``amount`` parameter.\n\n A value of -1 means a disabled allocation threshold.\n\n This function is a MicroPython extension. CPython has a similar\n function - ``set_threshold()``, but due to different GC\n implementations, its signature and semantics are different.\n\n :param amount: The number of bytes after which a garbage collection should be triggered.\n \"\"\"\n ...\n", "/typeshed/stdlib/log.pyi": "\"\"\"Log data to your micro:bit V2.\"\"\"\n\nfrom typing import Literal, Mapping, Optional, Union, overload\n\nMILLISECONDS = 1\n\"\"\"Milliseconds timestamp format.\"\"\"\n\nSECONDS = 10\n\"\"\"Seconds timestamp format.\"\"\"\n\nMINUTES = 600\n\"\"\"Minutes timestamp format.\"\"\"\n\nHOURS = 36000\n\"\"\"Hours timestamp format.\"\"\"\n\nDAYS = 864000\n\"\"\"Days timestamp format.\"\"\"\n\ndef set_labels(\n *labels: str, timestamp: Optional[Literal[1, 10, 36000, 864000]] = SECONDS\n) -> None:\n \"\"\"Set up the log file header.\n\n Example: ``log.set_labels('X', 'Y', 'Z', timestamp=log.MINUTES)``\n\n Ideally this function should be called a single time, before any data is\n logged, to configure the data table header once.\n\n If a log file already exists when the program starts, or if this function\n is called multiple times, it will check the labels already defined in the\n log file. If this function call contains any new labels not already\n present, it will generate a new header row with the additional columns.\n\n By default the first column contains a timestamp for each row. The time\n unit 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: 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\n@overload\ndef add(\n data_dictionary: Optional[Mapping[str, Union[str, int, float]]],\n) -> None:\n \"\"\"Add a data row to the log by passing a dictionary of headers and values.\n\n Example: ``log.add({ 'temp': temperature() })``\n\n Each call to this function adds a row to the log.\n\n New labels not previously specified via the set_labels function, or by a\n previous call to this function, will trigger a new header entry to be added\n to the log with the extra labels.\n\n Labels previously specified and not present in a call to this function will\n be 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\n@overload\ndef add(**kwargs: Union[str, int, float]) -> None:\n \"\"\"Add a data row to the log using keyword arguments.\n\n Example: ``log.add(temp=temperature())``\n\n Each call to this function adds a row to the log.\n\n New labels not previously specified via the set_labels function, or by a\n previous call to this function, will trigger a new header entry to be added\n to the log with the extra labels.\n\n Labels previously specified and not present in a call to this function will\n be skipped with an empty value in the log row.\n \"\"\"\n ...\n\ndef delete(full=False):\n \"\"\"Deletes the contents of the log, including headers.\n\n Example: ``log.delete()``\n\n To add the log headers again the ``set_labels`` function should to be called after this function.\n\n There are two erase modes; \u201cfull\u201d completely removes the data from the physical storage,\n and \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 ...\n\ndef set_mirroring(serial: bool):\n \"\"\"Configure mirroring of the data logging activity to the serial output.\n\n Example: ``log.set_mirroring(True)``\n\n Serial 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 \"\"\"\n ...\n", @@ -34,7 +34,7 @@ "/typeshed/stdlib/ustruct.pyi": "from struct import *\n", "/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": "\"\"\"Pins, images, sounds, temperature and volume.\n\"\"\"\n\nfrom typing import Any, Callable, List, Optional, Tuple, Union, overload\n\nfrom _typeshed import ReadableBuffer\n\n# V2 only\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(\n callback: Optional[Callable[[], None]] = None,\n days: int = 0,\n h: int = 0,\n min: int = 0,\n s: int = 0,\n ms: int = 0,\n) -> Callable[[Callable[[], None]], Callable[[], None]]:\n \"\"\"Schedule to run a function at the interval specified by the time arguments **V2 only**.\n\n Example: ``run_every(my_logging, min=5)``\n\n ``run_every`` can be used in two ways:\n\n As 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\n As 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\n Each argument corresponds to a different time unit and they are additive.\n So ``run_every(min=1, s=30)`` schedules the callback every minute and a half.\n\n When an exception is thrown inside the callback function it deschedules the\n function. 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 \"\"\"\n\ndef panic(n: int) -> None:\n \"\"\"Enter a panic mode.\n\n Example: ``panic(127)``\n\n :param n: An arbitrary integer <= 255 to indicate a status.\n\n Requires restart.\n \"\"\"\n\ndef reset() -> None:\n \"\"\"Restart the board.\"\"\"\n\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\n Example: ``volume = scale(accelerometer.get_x(), from_=(-2000, 2000), to=(0, 255))``\n\n For example, to convert an accelerometer X value to a speaker volume.\n\n If 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\n floating 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\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\n Example: ``temp_fahrenheit = scale(30, from_=(0.0, 100.0), to=(32.0, 212.0))``\n\n For example, to convert temperature from a Celsius scale to Fahrenheit.\n\n If 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\n floating point number.\n If 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 \"\"\"\n\ndef sleep(n: float) -> None:\n \"\"\"Wait for ``n`` milliseconds.\n\n Example: ``sleep(1000)``\n\n :param n: The number of milliseconds to wait\n\n One second is 1000 milliseconds, so::\n\n microbit.sleep(1000)\n\n will pause the execution for one second.\n \"\"\"\n\ndef running_time() -> int:\n \"\"\"Get the running time of the board.\n\n :return: The number of milliseconds since the board was switched on or restarted.\n \"\"\"\n\ndef temperature() -> int:\n \"\"\"Get the temperature of the micro:bit in degrees Celsius.\"\"\"\n\ndef set_volume(v: int) -> None:\n \"\"\"Sets the volume.\n\n Example: ``set_volume(127)``\n\n :param v: a value between 0 (low) and 255 (high).\n\n Out of range values will be clamped to 0 or 255.\n\n **V2** only.\n \"\"\"\n ...\n\nclass Button:\n \"\"\"The class for the buttons ``button_a`` and ``button_b``.\"\"\"\n\n def is_pressed(self) -> bool:\n \"\"\"Check if the button is pressed.\n\n :return: ``True`` if the specified button ``button`` is pressed, and ``False`` otherwise.\n \"\"\"\n ...\n def was_pressed(self) -> bool:\n \"\"\"Check if the button was pressed since the device started or the last time this method was called.\n\n Calling this method will clear the press state so\n that 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 \"\"\"Get the running total of button presses, and resets this total\n to zero before returning.\n\n :return: The number of presses since the device started or the last time this method was called\n \"\"\"\n ...\n\nbutton_a: Button\n\"\"\"The left button ``Button`` object.\"\"\"\n\nbutton_b: Button\n\"\"\"The right button ``Button`` object.\"\"\"\n\nclass MicroBitDigitalPin:\n \"\"\"A digital pin.\n\n Some pins support analog and touch features using the ``MicroBitAnalogDigitalPin`` and ``MicroBitTouchPin`` subclasses.\n \"\"\"\n\n NO_PULL: int\n PULL_UP: int\n PULL_DOWN: int\n def read_digital(self) -> int:\n \"\"\"Get the digital value of the pin.\n\n Example: ``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 \"\"\"Set the digital value of the pin.\n\n Example: ``pin0.write_digital(1)``\n\n :param value: 1 to set the pin high or 0 to set the pin low\"\"\"\n ...\n def set_pull(self, value: int) -> None:\n \"\"\"Set the pull state to one of three possible values: ``PULL_UP``, ``PULL_DOWN`` or ``NO_PULL``.\n\n Example: ``pin0.set_pull(pin0.PULL_UP)``\n\n :param value: The pull state from the relevant pin, e.g. ``pin0.PULL_UP``.\n \"\"\"\n ...\n def get_pull(self) -> int:\n \"\"\"Get the pull state on a pin.\n\n Example: ``pin0.get_pull()``\n\n :return: ``NO_PULL``, ``PULL_DOWN``, or ``PULL_UP``\n\n These are set using the ``set_pull()`` method or automatically configured\n when a pin mode requires it.\n \"\"\"\n ...\n def get_mode(self) -> str:\n \"\"\"Returns the pin mode.\n\n Example: ``pin0.get_mode()``\n\n When a pin is used for a specific function, like\n writing a digital value, or reading an analog value, the pin mode\n changes.\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 \"\"\"Output a PWM signal on the pin, with the duty cycle proportional to ``value``.\n\n Example: ``pin0.write_analog(254)``\n\n :param value: An integer or a floating point number between 0 (0% duty cycle) and 1023 (100% duty).\n \"\"\"\n def set_analog_period(self, period: int) -> None:\n \"\"\"Set the period of the PWM signal being output to ``period`` in milliseconds.\n\n Example: ``pin0.set_analog_period(10)``\n\n :param period: The period in milliseconds with a minimum valid value of 1ms.\n \"\"\"\n def set_analog_period_microseconds(self, period: int) -> None:\n \"\"\"Set the period of the PWM signal being output to ``period`` in microseconds.\n\n Example: ``pin0.set_analog_period_microseconds(512)``\n\n :param period: The period in microseconds with a minimum valid value of 256\u00b5s.\n \"\"\"\n\nclass MicroBitAnalogDigitalPin(MicroBitDigitalPin):\n \"\"\"A pin with analog and digital features.\"\"\"\n\n def read_analog(self) -> int:\n \"\"\"Read the voltage applied to the pin.\n\n Example: ``pin0.read_analog()``\n\n :return: An integer between 0 (meaning 0V) and 1023 (meaning 3.3V).\n \"\"\"\n\nclass MicroBitTouchPin(MicroBitAnalogDigitalPin):\n \"\"\"A pin with analog, digital and touch features.\"\"\"\n\n CAPACITIVE: int\n RESISTIVE: int\n def is_touched(self) -> bool:\n \"\"\"Check if the pin is being touched.\n\n Example: ``pin0.is_touched()``\n\n The default touch mode for the pins on the edge connector is ``resistive``.\n The default for the logo pin **V2** is ``capacitive``.\n\n **Resistive touch**\n This test is done by measuring how much resistance there is between the\n pin and ground. A low resistance gives a reading of ``True``. To get\n a reliable reading using a finger you may need to touch the ground pin\n with another part of your body, for example your other hand.\n\n **Capacitive touch**\n This test is done by interacting with the electric field of a capacitor\n using a finger as a conductor. `Capacitive touch\n `_\n does 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 \"\"\"Set the touch mode for the pin.\n\n Example: ``pin0.set_touch_mode(pin0.CAPACITIVE)``\n\n The 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`` or ``RESISTIVE`` from the relevant pin.\n \"\"\"\n ...\n\npin0: MicroBitTouchPin\n\"\"\"Pin with digital, analog and touch features.\"\"\"\n\npin1: MicroBitTouchPin\n\"\"\"Pin with digital, analog and touch features.\"\"\"\n\npin2: MicroBitTouchPin\n\"\"\"Pin with digital, analog and touch features.\"\"\"\n\npin3: MicroBitAnalogDigitalPin\n\"\"\"Pin with digital and analog features.\"\"\"\n\npin4: MicroBitAnalogDigitalPin\n\"\"\"Pin with digital and analog features.\"\"\"\n\npin5: MicroBitDigitalPin\n\"\"\"Pin with digital features.\"\"\"\n\npin6: MicroBitDigitalPin\n\"\"\"Pin with digital features.\"\"\"\n\npin7: MicroBitDigitalPin\n\"\"\"Pin with digital features.\"\"\"\n\npin8: MicroBitDigitalPin\n\"\"\"Pin with digital features.\"\"\"\n\npin9: MicroBitDigitalPin\n\"\"\"Pin with digital features.\"\"\"\n\npin10: MicroBitAnalogDigitalPin\n\"\"\"Pin with digital and analog features.\"\"\"\n\npin11: MicroBitDigitalPin\n\"\"\"Pin with digital features.\"\"\"\n\npin12: MicroBitDigitalPin\n\"\"\"Pin with digital features.\"\"\"\n\npin13: MicroBitDigitalPin\n\"\"\"Pin with digital features.\"\"\"\n\npin14: MicroBitDigitalPin\n\"\"\"Pin with digital features.\"\"\"\n\npin15: MicroBitDigitalPin\n\"\"\"Pin with digital features.\"\"\"\n\npin16: MicroBitDigitalPin\n\"\"\"Pin with digital features.\"\"\"\n\npin19: MicroBitDigitalPin\n\"\"\"Pin with digital features.\"\"\"\n\npin20: MicroBitDigitalPin\n\"\"\"Pin with digital features.\"\"\"\n\npin_logo: MicroBitTouchPin\n\"\"\"A touch sensitive logo pin on the front of the micro:bit, which by default is set to capacitive touch mode.\"\"\"\n\npin_speaker: MicroBitAnalogDigitalPin\n\"\"\"A pin to address the micro:bit speaker.\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 \"\"\"An image to show on the micro:bit LED display.\n\n Given an image object it's possible to display it via the ``display`` API::\n\n display.show(Image.HAPPY)\n \"\"\"\n\n HEART: Image\n \"\"\"Heart image.\"\"\"\n\n HEART_SMALL: Image\n \"\"\"Small heart image.\"\"\"\n\n HAPPY: Image\n \"\"\"Happy face image.\"\"\"\n\n SMILE: Image\n \"\"\"Smiling mouth image.\"\"\"\n\n SAD: Image\n \"\"\"Sad face image.\"\"\"\n\n CONFUSED: Image\n \"\"\"Confused face image.\"\"\"\n\n ANGRY: Image\n \"\"\"Angry face image.\"\"\"\n\n ASLEEP: Image\n \"\"\"Sleeping face image.\"\"\"\n\n SURPRISED: Image\n \"\"\"Surprised face image.\"\"\"\n\n SILLY: Image\n \"\"\"Silly face image.\"\"\"\n\n FABULOUS: Image\n \"\"\"Sunglasses face image.\"\"\"\n\n MEH: Image\n \"\"\"Unimpressed face image.\"\"\"\n\n YES: Image\n \"\"\"Tick image.\"\"\"\n\n NO: Image\n \"\"\"Cross image.\"\"\"\n\n CLOCK12: Image\n \"\"\"Image with line pointing to 12 o'clock.\"\"\"\n\n CLOCK11: Image\n \"\"\"Image with line pointing to 11 o'clock.\"\"\"\n\n CLOCK10: Image\n \"\"\"Image with line pointing to 10 o'clock.\"\"\"\n\n CLOCK9: Image\n \"\"\"Image with line pointing to 9 o'clock.\"\"\"\n\n CLOCK8: Image\n \"\"\"Image with line pointing to 8 o'clock.\"\"\"\n\n CLOCK7: Image\n \"\"\"Image with line pointing to 7 o'clock.\"\"\"\n\n CLOCK6: Image\n \"\"\"Image with line pointing to 6 o'clock.\"\"\"\n\n CLOCK5: Image\n \"\"\"Image with line pointing to 5 o'clock.\"\"\"\n\n CLOCK4: Image\n \"\"\"Image with line pointing to 4 o'clock.\"\"\"\n\n CLOCK3: Image\n \"\"\"Image with line pointing to 3 o'clock.\"\"\"\n\n CLOCK2: Image\n \"\"\"Image with line pointing to 2 o'clock.\"\"\"\n\n CLOCK1: Image\n \"\"\"Image with line pointing to 1 o'clock.\"\"\"\n\n ARROW_N: Image\n \"\"\"Image of arrow pointing north.\"\"\"\n\n ARROW_NE: Image\n \"\"\"Image of arrow pointing north east.\"\"\"\n\n ARROW_E: Image\n \"\"\"Image of arrow pointing east.\"\"\"\n\n ARROW_SE: Image\n \"\"\"Image of arrow pointing south east.\"\"\"\n\n ARROW_S: Image\n \"\"\"Image of arrow pointing south.\"\"\"\n\n ARROW_SW: Image\n \"\"\"Image of arrow pointing south west.\"\"\"\n\n ARROW_W: Image\n \"\"\"Image of arrow pointing west.\"\"\"\n\n ARROW_NW: Image\n \"\"\"Image of arrow pointing north west.\"\"\"\n\n TRIANGLE: Image\n \"\"\"Image of a triangle pointing up.\"\"\"\n\n TRIANGLE_LEFT: Image\n \"\"\"Image of a triangle in the left corner.\"\"\"\n\n CHESSBOARD: Image\n \"\"\"Alternate LEDs lit in a chessboard pattern.\"\"\"\n\n DIAMOND: Image\n \"\"\"Diamond image.\"\"\"\n\n DIAMOND_SMALL: Image\n \"\"\"Small diamond image.\"\"\"\n\n SQUARE: Image\n \"\"\"Square image.\"\"\"\n\n SQUARE_SMALL: Image\n \"\"\"Small square image.\"\"\"\n\n RABBIT: Image\n \"\"\"Rabbit image.\"\"\"\n\n COW: Image\n \"\"\"Cow image.\"\"\"\n\n MUSIC_CROTCHET: Image\n \"\"\"Crotchet note image.\"\"\"\n\n MUSIC_QUAVER: Image\n \"\"\"Quaver note image.\"\"\"\n\n MUSIC_QUAVERS: Image\n \"\"\"Pair of quavers note image.\"\"\"\n\n PITCHFORK: Image\n \"\"\"Pitchfork image.\"\"\"\n\n XMAS: Image\n \"\"\"Christmas tree image.\"\"\"\n\n PACMAN: Image\n \"\"\"Pac-Man arcade character image.\"\"\"\n\n TARGET: Image\n \"\"\"Target image.\"\"\"\n\n TSHIRT: Image\n \"\"\"T-shirt image.\"\"\"\n\n ROLLERSKATE: Image\n \"\"\"Rollerskate image.\"\"\"\n\n DUCK: Image\n \"\"\"Duck image.\"\"\"\n\n HOUSE: Image\n \"\"\"House image.\"\"\"\n\n TORTOISE: Image\n \"\"\"Tortoise image.\"\"\"\n\n BUTTERFLY: Image\n \"\"\"Butterfly image.\"\"\"\n\n STICKFIGURE: Image\n \"\"\"Stick figure image.\"\"\"\n\n GHOST: Image\n \"\"\"Ghost image.\"\"\"\n\n SWORD: Image\n \"\"\"Sword image.\"\"\"\n\n GIRAFFE: Image\n \"\"\"Giraffe image.\"\"\"\n\n SKULL: Image\n \"\"\"Skull image.\"\"\"\n\n UMBRELLA: Image\n \"\"\"Umbrella image.\"\"\"\n\n SNAKE: Image\n \"\"\"Snake image.\"\"\"\n\n SCISSORS: Image\n \"\"\"Scissors image.\"\"\"\n\n ALL_CLOCKS: List[Image]\n \"\"\"A list containing all the CLOCK_ images in sequence.\"\"\"\n\n ALL_ARROWS: List[Image]\n \"\"\"A list containing all the ARROW_ images in sequence.\"\"\"\n @overload\n def __init__(self, string: str) -> None:\n \"\"\"Create an image from a string describing which LEDs are lit.\n\n ``string`` has to consist of digits 0-9 arranged into lines,\n describing the image, for example::\n\n image = Image(\"90009:\"\n \"09090:\"\n \"00900:\"\n \"09090:\"\n \"90009\")\n\n will create a 5\u00d75 image of an X. The end of a line is indicated by a\n colon. It's also possible to use newlines (\\\\n) insead of the colons.\n\n :param string: The string describing the image.\n \"\"\"\n ...\n @overload\n def __init__(\n self, width: int = 5, height: int = 5, buffer: ReadableBuffer = None\n ) -> None:\n \"\"\"Create an empty image with ``width`` columns and ``height`` rows.\n\n :param width: Optional width of the image\n :param height: Optional height of the image\n :param buffer: Optional array or bytes of ``width``\u00d7``height`` integers in range 0-9 to initialize the image\n\n Examples::\n\n Image(2, 2, b'\\x08\\x08\\x08\\x08')\n Image(2, 2, bytearray([9,9,9,9]))\n\n These create 2 x 2 pixel images at full brightness.\n \"\"\"\n ...\n def width(self) -> int:\n \"\"\"Get the number of columns.\n\n :return: The number of columns in the image\n \"\"\"\n ...\n def height(self) -> int:\n \"\"\"Get the number of rows.\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 \"\"\"Set the brightness of a pixel.\n\n Example: ``my_image.set_pixel(0, 0, 9)``\n\n :param x: The column number\n :param y: The row number\n :param value: The brightness as an integer between 0 (dark) and 9 (bright)\n\n This method will raise an exception when called on any of the built-in\n read-only images, like ``Image.HEART``.\n \"\"\"\n ...\n def get_pixel(self, x: int, y: int) -> int:\n \"\"\"Get the brightness of a pixel.\n\n Example: ``my_image.get_pixel(0, 0)``\n\n :param x: The column number\n :param y: The row number\n :return: The brightness as an integer between 0 and 9.\n \"\"\"\n ...\n def shift_left(self, n: int) -> Image:\n \"\"\"Create a new image by shifting the picture left.\n\n Example: ``Image.HEART_SMALL.shift_left(1)``\n\n :param n: The number of columns to shift by\n :return: The shifted image\n \"\"\"\n ...\n def shift_right(self, n: int) -> Image:\n \"\"\"Create a new image by shifting the picture right.\n\n Example: ``Image.HEART_SMALL.shift_right(1)``\n\n :param n: The number of columns to shift by\n :return: The shifted image\n \"\"\"\n ...\n def shift_up(self, n: int) -> Image:\n \"\"\"Create a new image by shifting the picture up.\n\n Example: ``Image.HEART_SMALL.shift_up(1)``\n\n :param n: The number of rows to shift by\n :return: The shifted image\n \"\"\"\n ...\n def shift_down(self, n: int) -> Image:\n \"\"\"Create a new image by shifting the picture down.\n\n Example: ``Image.HEART_SMALL.shift_down(1)``\n\n :param n: The number of rows to shift by\n :return: The shifted image\n \"\"\"\n ...\n def crop(self, x: int, y: int, w: int, h: int) -> Image:\n \"\"\"Create a new image by cropping the picture.\n\n Example: ``Image.HEART.crop(1, 1, 3, 3)``\n\n :param x: The crop offset column\n :param y: The crop offset row\n :param w: The crop width\n :param h: The crop height\n :return: The new image\n \"\"\"\n ...\n def copy(self) -> Image:\n \"\"\"Create an exact copy of the image.\n\n Example: ``Image.HEART.copy()``\n\n :return: The new image\n \"\"\"\n ...\n def invert(self) -> Image:\n \"\"\"Create a new image by inverting the brightness of the pixels in the\n source image.\n\n Example: ``Image.SMALL_HEART.invert()``\n\n :return: The new image.\n \"\"\"\n ...\n def fill(self, value: int) -> None:\n \"\"\"Set the brightness of all the pixels in the image.\n\n Example: ``my_image.fill(5)``\n\n :param value: The new brightness as a number between 0 (dark) and 9 (bright).\n\n This method will raise an exception when called on any of the built-in\n read-only images, like ``Image.HEART``.\n \"\"\"\n ...\n def blit(\n self,\n src: Image,\n x: int,\n y: int,\n w: int,\n h: int,\n xdest: int = 0,\n ydest: int = 0,\n ) -> None:\n \"\"\"Copy an area from another image into this image.\n\n Example: ``my_image.blit(Image.HEART, 1, 1, 3, 3, 1, 1)``\n\n :param src: The source image\n :param x: The starting column offset in the source image\n :param y: The starting row offset in the source image\n :param w: The number of columns to copy\n :param h: The number of rows to copy\n :param xdest: The column offset to modify in this image\n :param ydest: The row offset to modify in this image\n\n Pixels outside the source image are treated as having a brightness of 0.\n\n ``shift_left()``, ``shift_right()``, ``shift_up()``, ``shift_down()``\n and ``crop()`` can are all implemented by using ``blit()``.\n\n For 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 \"\"\"Get a compact string representation of the image.\"\"\"\n ...\n def __str__(self) -> str:\n \"\"\"Get a readable string representation of the image.\"\"\"\n ...\n def __add__(self, other: Image) -> Image:\n \"\"\"Create a new image by adding the brightness values from the two\n images for each pixel.\n\n Example: ``Image.HEART + Image.HAPPY``\n\n :param other: The image to add.\n \"\"\"\n ...\n def __sub__(self, other: Image) -> Image:\n \"\"\"Create a new image by subtracting the brightness values of the\n other image from this image.\n\n Example: ``Image.HEART - Image.HEART_SMALL``\n\n :param other: The image to subtract.\n \"\"\"\n ...\n def __mul__(self, n: float) -> Image:\n \"\"\"Create a new image by multiplying the brightness of each pixel by\n ``n``.\n\n Example: ``Image.HEART * 0.5``\n\n :param n: The value to multiply by.\n \"\"\"\n ...\n def __truediv__(self, n: float) -> Image:\n \"\"\"Create a new image by dividing the brightness of each pixel by\n ``n``.\n\n Example: ``Image.HEART / 2``\n\n :param n: The value to divide by.\n \"\"\"\n ...\n\nclass SoundEvent:\n LOUD: SoundEvent\n \"\"\"Represents the transition of sound events, from ``quiet`` to ``loud`` like clapping or shouting.\"\"\"\n\n QUIET: SoundEvent\n \"\"\"Represents the transition of sound events, from ``loud`` to ``quiet`` like speaking or background music.\"\"\"\n\nclass Sound:\n \"\"\"The built-in sounds can be called using ``audio.play(Sound.NAME)``.\"\"\"\n\n GIGGLE: Sound\n \"\"\"Giggling sound.\"\"\"\n\n HAPPY: Sound\n \"\"\"Happy sound.\"\"\"\n\n HELLO: Sound\n \"\"\"Greeting sound.\"\"\"\n\n MYSTERIOUS: Sound\n \"\"\"Mysterious sound.\"\"\"\n\n SAD: Sound\n \"\"\"Sad sound.\"\"\"\n\n SLIDE: Sound\n \"\"\"Sliding sound.\"\"\"\n\n SOARING: Sound\n \"\"\"Soaring sound.\"\"\"\n\n SPRING: Sound\n \"\"\"Spring sound.\"\"\"\n\n TWINKLE: Sound\n \"\"\"Twinkling sound.\"\"\"\n\n YAWN: Sound\n \"\"\"Yawning sound.\"\"\"\n", "/typeshed/stdlib/microbit/accelerometer.pyi": "\"\"\"Measure the acceleration of the micro:bit and recognise gestures.\n\"\"\"\n\nfrom typing import Tuple\n\ndef get_x() -> int:\n \"\"\"Get the acceleration measurement in the ``x`` axis in milli-g.\n\n Example: ``accelerometer.get_x()``\n\n :return: A positive or negative integer depending on direction in the range +/- 2000mg.\n \"\"\"\n ...\n\ndef get_y() -> int:\n \"\"\"Get the acceleration measurement in the ``y`` axis in milli-g.\n\n Example: ``accelerometer.get_y()``\n\n :return: A positive or negative integer depending on direction in the range +/- 2000mg.\n \"\"\"\n ...\n\ndef get_z() -> int:\n \"\"\"Get the acceleration measurement in the ``z`` axis in milli-g.\n\n Example: ``accelerometer.get_z()``\n\n :return: A positive or negative integer depending on direction in the range +/- 2000mg.\n \"\"\"\n ...\n\ndef get_values() -> Tuple[int, int, int]:\n \"\"\"Get the acceleration measurements in all axes at once as a tuple.\n\n Example: ``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 ...\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\n Example: ``accelerometer.get_strength()``\n\n :return: The combined acceleration strength of all the axes, in milli-g.\n \"\"\"\n ...\n\ndef current_gesture() -> str:\n \"\"\"Get the name of the current gesture.\n\n Example: ``accelerometer.current_gesture()``\n\n MicroPython understands the following gesture names: ``\"up\"``, ``\"down\"``,\n ``\"left\"``, ``\"right\"``, ``\"face up\"``, ``\"face down\"``, ``\"freefall\"``,\n ``\"3g\"``, ``\"6g\"``, ``\"8g\"``, ``\"shake\"``. Gestures are always\n represented as strings.\n\n :return: The current gesture\n \"\"\"\n ...\n\ndef is_gesture(name: str) -> bool:\n \"\"\"Check if the named gesture is currently active.\n\n Example: ``accelerometer.is_gesture('shake')``\n\n MicroPython understands the following gesture names: ``\"up\"``, ``\"down\"``,\n ``\"left\"``, ``\"right\"``, ``\"face up\"``, ``\"face down\"``, ``\"freefall\"``,\n ``\"3g\"``, ``\"6g\"``, ``\"8g\"``, ``\"shake\"``. Gestures are always\n represented as strings.\n\n :param name: The gesture name.\n :return: ``True`` if the gesture is active, ``False`` otherwise.\n \"\"\"\n ...\n\ndef was_gesture(name: str) -> bool:\n \"\"\"Check if the named gesture was active since the last call.\n\n Example: ``accelerometer.was_gesture('shake')``\n\n MicroPython understands the following gesture names: ``\"up\"``, ``\"down\"``,\n ``\"left\"``, ``\"right\"``, ``\"face up\"``, ``\"face down\"``, ``\"freefall\"``,\n ``\"3g\"``, ``\"6g\"``, ``\"8g\"``, ``\"shake\"``. Gestures are always\n represented as strings.\n\n :param name: The gesture name.\n :return: ``True`` if the gesture was active since the last call, ``False`` otherwise.\n \"\"\"\n\ndef get_gestures() -> Tuple[str, ...]:\n \"\"\"Return a tuple of the gesture history.\n\n Example: ``accelerometer.get_gestures()``\n\n Clears the gesture history before returning.\n\n Gestures are not updated in the background so there needs to be constant\n calls to some accelerometer method to do the gesture detection. Usually\n gestures 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 ...\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\n Example: ``accelerometer.set_range(8)``\n\n :param value: New range for the accelerometer, an integer in ``g``.\n \"\"\"\n", "/typeshed/stdlib/microbit/audio.pyi": "\"\"\"Play sounds using the micro:bit (import ``audio`` for V1 compatibility).\n\"\"\"\n\nfrom ..microbit import MicroBitDigitalPin, Sound, pin0\nfrom typing import ClassVar, Iterable, Union\n\ndef play(\n source: Union[Iterable[AudioFrame], Sound, SoundEffect],\n wait: bool = True,\n pin: MicroBitDigitalPin = pin0,\n return_pin: Union[MicroBitDigitalPin, None] = None,\n) -> None:\n \"\"\"Play a built-in sound, sound effect or custom audio frames.\n\n Example: ``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: If ``wait`` is ``True``, this function will block until the sound is complete.\n :param pin: An optional argument to specify the output pin can be used to override the default of ``pin0``. If we do not want any sound to play we can use ``pin=None``.\n :param return_pin: Specifies a differential edge connector pin to connect to an external speaker instead of ground. This is ignored for the **V2** revision.\n \"\"\"\n\ndef is_playing() -> bool:\n \"\"\"Check whether a sound is playing.\n\n Example: ``audio.is_playing()``\n\n :return: ``True`` if audio is playing, otherwise ``False``.\"\"\"\n ...\n\ndef stop() -> None:\n \"\"\"Stop all audio playback.\n\n Example: ``audio.stop()``\n \"\"\"\n ...\n\nclass SoundEffect:\n \"\"\"A sound effect, composed by a set of parameters configured via the constructor or attributes.\"\"\"\n\n WAVEFORM_SINE: ClassVar[int]\n \"\"\"Sine wave option used for the ``waveform`` parameter.\"\"\"\n\n WAVEFORM_SAWTOOTH: ClassVar[int]\n \"\"\"Sawtooth wave option used for the ``waveform`` parameter.\"\"\"\n\n WAVEFORM_TRIANGLE: ClassVar[int]\n \"\"\"Triangle wave option used for the ``waveform`` parameter.\"\"\"\n\n WAVEFORM_SQUARE: ClassVar[int]\n \"\"\"Square wave option used for the ``waveform`` parameter.\"\"\"\n\n WAVEFORM_NOISE: ClassVar[int]\n \"\"\"Noise option used for the ``waveform`` parameter.\"\"\"\n\n SHAPE_LINEAR: ClassVar[int]\n \"\"\"Linear interpolation option used for the ``shape`` parameter.\"\"\"\n\n SHAPE_CURVE: ClassVar[int]\n \"\"\"Curve interpolation option used for the ``shape`` parameter.\"\"\"\n\n SHAPE_LOG: ClassVar[int]\n \"\"\"Logarithmic interpolation option used for the ``shape`` parameter.\"\"\"\n\n FX_NONE: ClassVar[int]\n \"\"\"No effect option used for the ``fx`` parameter.\"\"\"\n\n FX_TREMOLO: ClassVar[int]\n \"\"\"Tremolo effect option used for the ``fx`` parameter.\"\"\"\n\n FX_VIBRATO: ClassVar[int]\n \"\"\"Vibrato effect option used for the ``fx`` parameter.\"\"\"\n\n FX_WARBLE: ClassVar[int]\n \"\"\"Warble effect option used for the ``fx`` parameter.\"\"\"\n\n freq_start: int\n \"\"\"Start frequency in Hertz (Hz), a number between ``0`` and ``9999``\"\"\"\n\n freq_end: int\n \"\"\"End frequency in Hertz (Hz), a number between ``0`` and ``9999``\"\"\"\n\n duration: int\n \"\"\"Duration of the sound in milliseconds, a number between ``0`` and ``9999``\"\"\"\n\n vol_start: int\n \"\"\"Start volume value, a number between ``0`` and ``255``\"\"\"\n\n vol_end: int\n \"\"\"End volume value, a number between ``0`` and ``255``\"\"\"\n\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\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\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__(\n self,\n freq_start: int = 500,\n freq_end: int = 2500,\n duration: int = 500,\n vol_start: int = 255,\n vol_end: int = 0,\n waveform: int = WAVEFORM_SQUARE,\n fx: int = FX_NONE,\n shape: int = SHAPE_LOG,\n ):\n \"\"\"Create a new sound effect.\n\n Example: ``my_effect = SoundEffect(duration=1000)``\n\n All the parameters are optional, with default values as shown above, and\n they can all be modified via attributes of the same name. For example, we\n can first create an effect ``my_effect = SoundEffect(duration=1000)``,\n and 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\n Example: ``sound_2 = sound_1.copy()``\n\n :return: A copy of the SoundEffect.\n \"\"\"\n\nclass AudioFrame:\n \"\"\"An ``AudioFrame`` object is a list of 32 samples each of which is a unsigned byte\n (whole number between 0 and 255).\n\n It takes just over 4 ms to play a single frame.\n\n Example::\n\n frame = AudioFrame()\n for i in range(len(frame)):\n frame[i] = 252 - i * 8\n \"\"\"\n\n def copyfrom(self, other: AudioFrame) -> None:\n \"\"\"Overwrite the data in this ``AudioFrame`` with the data from another ``AudioFrame`` instance.\n\n Example: ``my_frame.copyfrom(source_frame)``\n\n :param other: ``AudioFrame`` instance from which to copy the data.\n \"\"\"\n def __len__(self) -> int: ...\n def __setitem__(self, key: int, value: int) -> None: ...\n def __getitem__(self, key: int) -> int: ...\n", @@ -45,7 +45,7 @@ "/typeshed/stdlib/microbit/speaker.pyi": "\"\"\"Control the built-in speaker (V2 only).\n\"\"\"\n\ndef off() -> None:\n \"\"\"Turn the speaker off.\n\n Example: ``speaker.off()``\n\n This does not disable sound output to an edge connector pin.\n \"\"\"\n ...\n\ndef on() -> None:\n \"\"\"Turn the speaker on.\n\n Example: ``speaker.on()``\n \"\"\"\n ...\n", "/typeshed/stdlib/microbit/spi.pyi": "\"\"\"Communicate with devices using the serial peripheral interface (SPI) bus.\n\"\"\"\n\nfrom _typeshed import ReadableBuffer, WriteableBuffer\nfrom ..microbit import pin13, pin14, pin15, MicroBitDigitalPin\n\ndef init(\n baudrate: int = 1000000,\n bits: int = 8,\n mode: int = 0,\n sclk: MicroBitDigitalPin = pin13,\n mosi: MicroBitDigitalPin = pin15,\n miso: MicroBitDigitalPin = pin14,\n) -> None:\n \"\"\"Initialize SPI communication.\n\n Example: ``spi.init()``\n\n For correct communication, the parameters have to be the same on both communicating devices.\n\n :param baudrate: The speed of communication.\n :param bits: The width in bits of each transfer. Currently only ``bits=8`` is supported. However, this may change in the future.\n :param mode: Determines the combination of clock polarity and phase - `see online table `_.\n :param sclk: sclk pin (default 13)\n :param mosi: mosi pin (default 15)\n :param miso: miso pin (default 14)\n \"\"\"\n ...\n\ndef read(nbytes: int) -> bytes:\n \"\"\"Read bytes.\n\n Example: ``spi.read(64)``\n\n :param nbytes: Maximum number of bytes to read.\n :return: The bytes read.\n \"\"\"\n ...\n\ndef write(buffer: ReadableBuffer) -> None:\n \"\"\"Write bytes to the bus.\n\n Example: ``spi.write(bytes([1, 2, 3]))``\n\n :param buffer: A buffer to read data from.\n \"\"\"\n ...\n\ndef write_readinto(out: WriteableBuffer, in_: ReadableBuffer) -> None:\n \"\"\"Write the ``out`` buffer to the bus and read any response into the ``in_`` buffer.\n\n Example: ``spi.write_readinto(out_buffer, in_buffer)``\n\n The length of the buffers should be the same. The buffers can be the same object.\n\n :param out: The buffer to write any response to.\n :param in_: The buffer to read data from.\n \"\"\"\n ...\n", "/typeshed/stdlib/microbit/uart.pyi": "\"\"\"Communicate with a device using a serial interface.\n\"\"\"\n\nfrom _typeshed import WriteableBuffer\nfrom ..microbit import MicroBitDigitalPin\nfrom typing import Optional, Union\n\nODD: int\n\"\"\"Odd parity\"\"\"\n\nEVEN: int\n\"\"\"Even parity\"\"\"\n\ndef init(\n baudrate: int = 9600,\n bits: int = 8,\n parity: Optional[int] = None,\n stop: int = 1,\n tx: Optional[MicroBitDigitalPin] = None,\n rx: Optional[MicroBitDigitalPin] = None,\n) -> None:\n \"\"\"Initialize serial communication.\n\n Example: ``uart.init(115200, tx=pin0, rx=pin1)``\n\n :param baudrate: The speed of communication.\n :param bits: The size of bytes being transmitted. micro:bit only supports 8.\n :param parity: How parity is checked, ``None``, ``uart.ODD`` or ``uart.EVEN``.\n :param stop: The number of stop bits, has to be 1 for micro:bit.\n :param tx: Transmitting pin.\n :param rx: Receiving pin.\n\n Initializing the UART on external pins will cause the Python console on\n USB to become unaccessible, as it uses the same hardware. To bring the\n console back you must reinitialize the UART without passing anything for\n ``tx`` or ``rx`` (or passing ``None`` to these arguments). This means\n that calling ``uart.init(115200)`` is enough to restore the Python console.\n\n For more details see `the online documentation `_.\n \"\"\"\n ...\n\ndef any() -> bool:\n \"\"\"Check if any data is waiting.\n\n Example: ``uart.any()``\n\n :return: ``True`` if any data is waiting, else ``False``.\n \"\"\"\n ...\n\ndef read(nbytes: Optional[int] = None) -> Optional[bytes]:\n \"\"\"Read bytes.\n\n Example: ``uart.read()``\n\n :param nbytes: If ``nbytes`` is specified then read at most that many bytes, otherwise read as many bytes as possible\n :return: A bytes object or ``None`` on timeout\n \"\"\"\n ...\n\ndef readinto(buf: WriteableBuffer, nbytes: Optional[int] = None) -> Optional[int]:\n \"\"\"Read bytes into the ``buf``.\n\n Example: ``uart.readinto(input_buffer)``\n\n :param buf: The buffer to write to.\n :param nbytes: If ``nbytes`` is specified then read at most that many bytes, otherwise read ``len(buf)`` bytes.\n :return: number of bytes read and stored into ``buf`` or ``None`` on timeout.\n \"\"\"\n ...\n\ndef readline() -> Optional[bytes]:\n \"\"\"Read a line, ending in a newline character.\n\n Example: ``uart.readline()``\n\n :return: The line read or ``None`` on timeout. The newline character is included in the returned bytes.\n \"\"\"\n ...\n\ndef write(buf: Union[bytes, str]) -> Optional[int]:\n \"\"\"Write a buffer to the bus.\n\n Example: ``uart.write('hello world')``\n\n :param buf: A bytes object or a string.\n :return: The number of bytes written, or ``None`` on timeout.\n\n Examples::\n\n uart.write('hello world')\n uart.write(b'hello world')\n uart.write(bytes([1, 2, 3]))\n \"\"\"\n ...\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/_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", "/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.es-es.json b/src/micropython/main/typeshed.es-es.json index 391c800ce..cb8739093 100644 --- a/src/micropython/main/typeshed.es-es.json +++ b/src/micropython/main/typeshed.es-es.json @@ -8,13 +8,13 @@ "/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 frozenset(AbstractSet[_T_co], Generic[_T_co]):\n @overload\n def __new__(cls: type[Self]) -> Self: ...\n @overload\n def __new__(cls: type[Self], __iterable: Iterable[_T_co]) -> Self: ...\n def copy(self) -> FrozenSet[_T_co]: ...\n def difference(self, *s: Iterable[object]) -> FrozenSet[_T_co]: ...\n def intersection(self, *s: Iterable[object]) -> FrozenSet[_T_co]: ...\n def isdisjoint(self, s: Iterable[_T_co]) -> bool: ...\n def issubset(self, s: Iterable[object]) -> bool: ...\n def issuperset(self, s: Iterable[object]) -> bool: ...\n def symmetric_difference(self, s: Iterable[_T_co]) -> FrozenSet[_T_co]: ...\n def union(self, *s: Iterable[_T_co]) -> FrozenSet[_T_co]: ...\n def __len__(self) -> int: ...\n def __contains__(self, o: object) -> bool: ...\n def __iter__(self) -> Iterator[_T_co]: ...\n def __str__(self) -> str: ...\n def __and__(self, s: AbstractSet[_T_co]) -> FrozenSet[_T_co]: ...\n def __or__(self, s: AbstractSet[_S]) -> FrozenSet[_T_co | _S]: ...\n def __sub__(self, s: AbstractSet[_T_co]) -> FrozenSet[_T_co]: ...\n def __xor__(self, s: AbstractSet[_S]) -> FrozenSet[_T_co | _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 if sys.version_info >= (3, 9):\n def __class_getitem__(cls, item: Any) -> GenericAlias: ...\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": "\"\"\"Controlar el recolector de basura (rb)\"\"\"\nfrom typing import overload\n\ndef enable() -> None:\n \"\"\"Activar la recolecci\u00f3n autom\u00e1tica de basura. (habilitado)\"\"\"\n ...\n\ndef disable() -> None:\n \"\"\"Desactiva la recolecci\u00f3n autom\u00e1tica de basura. (deshabilitar)\n\nHeap memory can still be allocated,\nand garbage collection can still be initiated manually using ``gc.collect``.\"\"\"\n\ndef collect() -> None:\n \"\"\"Ejecuta una recolecci\u00f3n de basura. (recoger)\"\"\"\n ...\n\ndef mem_alloc() -> int:\n \"\"\"Obtiene el n\u00famero de bytes asignados a la RAM din\u00e1mica. (memoria asignada)\n\n:return: The number of bytes allocated.\n\nThis function is MicroPython extension.\"\"\"\n ...\n\ndef mem_free() -> int:\n \"\"\"Obtiene el n\u00famero de bytes de la RAM din\u00e1mica disponible o -1 si se desconoce esta cantidad. (memoria libre)\n\n:return: The number of bytes free.\n\nThis function is MicroPython extension.\"\"\"\n ...\n\n@overload\ndef threshold() -> int:\n \"\"\"Consulta el umbral de asignaci\u00f3n de GC (recolector de basura) adicional. (l\u00edmite)\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 \"\"\"Establece el umbral de asignaci\u00f3n de GC (recolector de basura) adicional. (l\u00edmite)\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: (cantidad) N\u00famero de bytes despu\u00e9s de los cuales se debe activar una recolecci\u00f3n de basura.\"\"\"\n ...", - "/typeshed/stdlib/log.pyi": "\"\"\"Registra datos en el micro:bit V2. (registrar)\"\"\"\nfrom typing import Literal, Mapping, Optional, Union, overload\nMILLISECONDS = 1\n\"\"\"Formato de marca temporal en milisegundos. (milisegundos)\"\"\"\nSECONDS = 10\n\"\"\"Formato de marca temporal en segundos. (segundos)\"\"\"\nMINUTES = 600\n\"\"\"Formato de marca temporal en minutos. (minutos)\"\"\"\nHOURS = 36000\n\"\"\"Formato de marca temporal en horas. (horas)\"\"\"\nDAYS = 864000\n\"\"\"Formato de marca temporal en d\u00edas. (d\u00edas)\"\"\"\n\ndef set_labels(*labels: str, timestamp: Optional[Literal[1, 10, 36000, 864000]]=SECONDS) -> None:\n \"\"\"Configura la cabecera del archivo de registro. (configurar etiquetas)\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: (*Etiquetas) Cualquier n\u00famero de argumentos posicionales, cada uno correspondiente a una entrada en el encabezado del registro.\n:param timestamp: (marca de tiempo) Selecciona la unidad de marca de tiempo que se a\u00f1adir\u00e1 autom\u00e1ticamente como la primera columna de cada fila. Los valores de la marca de tiempo pueden ser ``log.MILLISECONDS``, ``log.SECONDS``, ``log.MINUTES``, ``log.HOURS``, ``log.DAYS`` o ``None`` para desactivar la marca de tiempo. El valor por defecto es ``log.SECONDS``.\"\"\"\n ...\n\n@overload\ndef add(data_dictionary: Optional[Mapping[str, Union[str, int, float]]]) -> None:\n \"\"\"A\u00f1ade una fila de datos al registro pasando un diccionario de cabeceras y valores. (a\u00f1adir)\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: (diccionario de datos) Los datos que se registrar\u00e1n como un diccionario con una clave para cada cabecera.\"\"\"\n ...\n\n@overload\ndef add(**kwargs: Union[str, int, float]) -> None:\n \"\"\"A\u00f1ade una fila de datos al registro usando argumentos de palabra clave. (a\u00f1adir)\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 \"\"\"Elimina el contenido del registro, incluyendo las cabeceras. (eliminar)\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: (completo) ``True`` selecciona un borrador \u201ccompleto\u201d y ``False`` selecciona el m\u00e9todo de borrado \u201cr\u00e1pido\u201d.\"\"\"\n ...\n\ndef set_mirroring(serial: bool):\n \"\"\"Configura la duplicaci\u00f3n de la actividad de registro de datos en la salida serie. (configurar replicaci\u00f3n)\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: (serie) ``True`` habilita la reproducci\u00f3n de datos en la salida de serie.\"\"\"\n ...", + "/typeshed/stdlib/log.pyi": "\"\"\"Registra datos en el micro:bit V2. (registrar)\"\"\"\nfrom typing import Literal, Mapping, Optional, Union, overload\nMILLISECONDS = 1\n\"\"\"Formato de marca temporal en milisegundos. (milisegundos)\"\"\"\nSECONDS = 10\n\"\"\"Formato de marca temporal en segundos. (segundos)\"\"\"\nMINUTES = 600\n\"\"\"Formato de marca temporal en minutos. (minutos)\"\"\"\nHOURS = 36000\n\"\"\"Formato de marca temporal en horas. (horas)\"\"\"\nDAYS = 864000\n\"\"\"Formato de marca temporal en d\u00edas. (d\u00edas)\"\"\"\n\ndef set_labels(*labels: str, timestamp: Optional[Literal[1, 10, 36000, 864000]]=SECONDS) -> None:\n \"\"\"Configura la cabecera del archivo de registro. (configurar etiquetas)\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: (*Etiquetas) Cualquier n\u00famero de argumentos posicionales, cada uno correspondiente a una entrada en el encabezado del registro.\n:param timestamp: (marca de tiempo) Seleccione la unidad de marca de tiempo que se a\u00f1adir\u00e1 autom\u00e1ticamente como la primera columna de cada fila. Los valores de la marca de tiempo pueden ser ``log.MILLISECONDS``, ``log.SECONDS``, ``log.MINUTES``, ``log.HOURS``, ``log.DAYS`` o ``None`` para desactivar la marca de tiempo. El valor por defecto es ``log.SECONDS``.\"\"\"\n ...\n\n@overload\ndef add(data_dictionary: Optional[Mapping[str, Union[str, int, float]]]) -> None:\n \"\"\"A\u00f1ade una fila de datos al registro pasando un diccionario de cabeceras y valores. (a\u00f1adir)\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: (diccionario de datos) Los datos a registrar como un diccionario con una clave para cada cabecera.\"\"\"\n ...\n\n@overload\ndef add(**kwargs: Union[str, int, float]) -> None:\n \"\"\"A\u00f1ade una fila de datos al registro usando argumentos de palabra clave. (a\u00f1adir)\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 \"\"\"Elimina el contenido del registro, incluyendo las cabeceras. (eliminar)\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: (completo) ``True`` selecciona un borrador \u201ccompleto\u201d y ``False`` selecciona el m\u00e9todo de borrado \u201cr\u00e1pido\u201d.\"\"\"\n ...\n\ndef set_mirroring(serial: bool):\n \"\"\"Configure la duplicaci\u00f3n de la actividad de registro de datos en la salida en serie. (configurar replicaci\u00f3n)\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: (serie) ``True`` habilita la reproducci\u00f3n de datos en la salida de serie.\"\"\"\n ...", "/typeshed/stdlib/love.pyi": "def badaboom() -> None: ...\n", "/typeshed/stdlib/machine.pyi": "\"\"\"Utilidades de bajo nivel. (m\u00e1quina)\"\"\"\nfrom typing import Any\nfrom .microbit import MicroBitDigitalPin\n\ndef unique_id() -> bytes:\n \"\"\"Obtiene una cadena de bytes con un identificador \u00fanico de una placa. (id \u00fanico)\n\nExample: ``machine.unique_id()``\n\n:return: An identifier that varies from one board instance to another.\"\"\"\n ...\n\ndef reset() -> None:\n \"\"\"Restablece el dispositivo de una forma similar a pulsar el bot\u00f3n externo RESET. (restablecer)\n\nExample: ``machine.reset()``\"\"\"\n ...\n\ndef freq() -> int:\n \"\"\"Obtiene la frecuencia de la CPU en hercios. (frec)\n\nExample: ``machine.freq()``\n\n:return: The CPU frequency.\"\"\"\n ...\n\ndef disable_irq() -> Any:\n \"\"\"Desactiva las solicitudes de interrupci\u00f3n. (desactivar irq)\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 \"\"\"Reactiva las solicitudes de interrupci\u00f3n. (activar irq)\n\nExample: ``machine.enable_irq(interrupt_state)``\n\n:param state: (estado) Valor devuelto por la llamada m\u00e1s reciente a la funci\u00f3n ``disable_irq``.\"\"\"\n ...\n\ndef time_pulse_us(pin: MicroBitDigitalPin, pulse_level: int, timeout_us: int=1000000) -> int:\n \"\"\"Cronometra el estado de un pin. (cronometrar estado us)\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: Pin a usar\n:param pulse_level: (nivel de estado) 0 para cronometrar un estado bajo o 1 para un estado alto\n:param timeout_us: (tiempo de espera us) Tiempo de espera en microsegundos\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 \"\"\"Clase para las vistas de memoria ``mem8``, ``mem16`` y ``mem32``.\"\"\"\n\n def __getitem__(self, address: int) -> int:\n \"\"\"Accede a un valor de la memoria. (obtener elemento)\n\n:param address: (direcci\u00f3n) La direcci\u00f3n de memoria.\n:return: The value at that address as an integer.\"\"\"\n ...\n\n def __setitem__(self, address: int, value: int) -> None:\n \"\"\"Establece un valor en la direcci\u00f3n dada. (configurar elemento)\n\n:param address: (direcci\u00f3n) La direcci\u00f3n de memoria.\n:param value: (valor) El valor entero a establecer.\"\"\"\n ...\nmem8: mem\n\"\"\"Vista de memoria de 8 bits (byte).\"\"\"\nmem16: mem\n\"\"\"Vista de memoria de 16 bits.\"\"\"\nmem32: mem\n\"\"\"Vista de memoria de 32 bits.\"\"\"", "/typeshed/stdlib/math.pyi": "\"\"\"Funciones matem\u00e1ticas. (matem\u00e1ticas)\"\"\"\nfrom typing import Tuple\n\ndef acos(x: float) -> float:\n \"\"\"Calcula el inverso del coseno.\n\nExample: ``math.acos(1)``\n\n:param x: Un n\u00famero\n:return: The inverse cosine of ``x``\"\"\"\n ...\n\ndef asin(x: float) -> float:\n \"\"\"Calcula el inverso del seno. (asen)\n\nExample: ``math.asin(0)``\n\n:param x: Un n\u00famero\n:return: The inverse sine of ``x``\"\"\"\n ...\n\ndef atan(x: float) -> float:\n \"\"\"Calcula el inverso de la tangente.\n\nExample: ``math.atan(0)``\n\n:param x: Un n\u00famero\n:return: The inverse tangent of ``x``\"\"\"\n ...\n\ndef atan2(y: float, x: float) -> float:\n \"\"\"Calcula el valor principal del inverso de la tangente de ``y/x``.\n\nExample: ``math.atan2(0, -1)``\n\n:param y: Un n\u00famero\n:param x: Un n\u00famero\n:return: The principal value of the inverse tangent of ``y/x``\"\"\"\n ...\n\ndef ceil(x: float) -> float:\n \"\"\"Redondea un n\u00famero hacia el infinito positivo. (hacia arriba)\n\nExample: ``math.ceil(0.1)``\n\n:param x: Un n\u00famero\n:return: ``x`` rounded towards positive infinity.\"\"\"\n ...\n\ndef copysign(x: float, y: float) -> float:\n \"\"\"Calcula ``x`` con el signo de ``y``.\n\nExample: ``math.copysign(1, -1)``\n\n:param x: Un n\u00famero\n:param y: Procedencia del signo para el valor que devuelve\n:return: ``x`` with the sign of ``y``\"\"\"\n ...\n\ndef cos(x: float) -> float:\n \"\"\"Calcula el coseno de ``x``.\n\nExample: ``math.cos(0)``\n\n:param x: Un n\u00famero\n:return: The cosine of ``x``\"\"\"\n ...\n\ndef degrees(x: float) -> float:\n \"\"\"Convierte radianes a grados. (grados)\n\nExample: ``math.degrees(2 * math.pi)``\n\n:param x: Un valor en radianes\n:return: The value converted to degrees\"\"\"\n ...\n\ndef exp(x: float) -> float:\n \"\"\"Calcular el exponencial de ``x``.\n\nExample: ``math.exp(1)``\n\n:param x: Un n\u00famero\n:return: The exponential of ``x``.\"\"\"\n ...\n\ndef fabs(x: float) -> float:\n \"\"\"Devuelve el valor absoluto de ``x``.\n\nExample: ``math.fabs(-0.1)``\n\n:param x: Un n\u00famero\n:return: The absolute value of ``x``\"\"\"\n ...\n\ndef floor(x: float) -> int:\n \"\"\"Redondea un n\u00famero hacia el infinito negativo. (hacia abajo)\n\nExample: ``math.floor(0.9)``\n\n:param x: Un n\u00famero\n:return: ``x`` rounded towards negative infinity.\"\"\"\n ...\n\ndef fmod(x: float, y: float) -> float:\n \"\"\"Calcula el resto de ``x/y``.\n\nExample: ``math.fmod(10, 3)``\n\n:param x: El numerador\n:param y: El denominador\"\"\"\n ...\n\ndef frexp(x: float) -> Tuple[float, int]:\n \"\"\"Descompone un n\u00famero de coma flotante en su mantisa y exponente.\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 n\u00famero de coma flotante\n:return: A tuple of length two containing its mantissa then exponent\"\"\"\n ...\n\ndef isfinite(x: float) -> bool:\n \"\"\"Comprueba si un valor es finito. (esfinito)\n\nExample: ``math.isfinite(float('inf'))``\n\n:param x: Un n\u00famero.\n:return: ``True`` if ``x`` is finite, ``False`` otherwise.\"\"\"\n ...\n\ndef isinf(x: float) -> bool:\n \"\"\"Compruebe si un valor es infinito. (esinf)\n\nExample: ``math.isinf(float('-inf'))``\n\n:param x: Un n\u00famero.\n:return: ``True`` if ``x`` is infinite, ``False`` otherwise.\"\"\"\n ...\n\ndef isnan(x: float) -> bool:\n \"\"\"Comprueba si un valor no es un n\u00famero (NaN, not-a-number en ingl\u00e9s). (esnan)\n\nExample: ``math.isnan(float('nan'))``\n\n:param x: Un n\u00famero\n:return: ``True`` if ``x`` is not-a-number (NaN), ``False`` otherwise.\"\"\"\n ...\n\ndef ldexp(x: float, exp: int) -> float:\n \"\"\"Calcula ``x * (2**exp)``.\n\nExample: ``math.ldexp(0.5, 2)``\n\n:param x: Un n\u00famero\n:param exp: Exponente entero\n:return: ``x * (2**exp)``\"\"\"\n ...\n\ndef log(x: float, base: float=e) -> float:\n \"\"\"Calcula el logaritmo de ``x`` en la base dada (por defecto, el logaritmo natural). (registrar)\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 n\u00famero\n:param base: La base a usar\n:return: The natural logarithm of ``x``\"\"\"\n ...\n\ndef modf(x: float) -> Tuple[float, float]:\n \"\"\"Calcula la parte fraccionaria y entera de ``x``.\n\nExample: ``fractional, integral = math.modf(1.5)``\n\n:param x: Un n\u00famero\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 \"\"\"Devuelve ``x`` elevado a ``y``.\n\nExample: ``math.pow(4, 0.5)``\n\n:param x: Un n\u00famero\n:param y: El exponente\n:return: ``x`` to the power of ``y``\"\"\"\n ...\n\ndef radians(x: float) -> float:\n \"\"\"Convierte grados a radianes. (radianes)\n\nExample: ``math.radians(360)``\n\n:param x: Un valor en grados\n:return: The value converted to radians\"\"\"\n ...\n\ndef sin(x: float) -> float:\n \"\"\"Calcula el seno de ``x``. (sen)\n\nExample: ``math.sin(math.pi/2)``\n\n:param x: Un n\u00famero\n:return: The sine of ``x``\"\"\"\n ...\n\ndef sqrt(x: float) -> float:\n \"\"\"Calcula la ra\u00edz cuadrada de ``x``.\n\nExample: ``math.sqrt(4)``\n\n:param x: Un n\u00famero\n:return: The square root of ``x``\"\"\"\n ...\n\ndef tan(x: float) -> float:\n \"\"\"Calcula la tangente de ``x``.\n\nExample: ``math.tan(0)``\n\n:param x: Un n\u00famero\n:return: The tangent of ``x``.\"\"\"\n ...\n\ndef trunc(x: float) -> int:\n \"\"\"Redondea un n\u00famero hacia 0.\n\nExample: ``math.trunc(-0.9)``\n\n:param x: Un n\u00famero\n:return: ``x`` rounded towards zero.\"\"\"\n ...\ne: float\n\"\"\"Base del logaritmo natural\"\"\"\npi: float\n\"\"\"La relaci\u00f3n entre la longitud de una circunferencia y su di\u00e1metro\"\"\"", "/typeshed/stdlib/micropython.pyi": "\"\"\"Componentes internos de MicroPython.\"\"\"\nfrom typing import Any, TypeVar, overload\n_T = TypeVar('_T')\n\ndef const(expr: _T) -> _T:\n \"\"\"Se usa para declarar que la expresi\u00f3n es una constante para que el compilador pueda\noptimizarla.\n\nThe use of this function should be as follows::\n\n from micropython import const\n CONST_X = const(123)\n CONST_Y = const(2 * CONST_X + 1)\n\nConstants declared this way are still accessible as global variables from\noutside the module they are declared in. On the other hand, if a constant\nbegins with an underscore then it is hidden, it is not available as a\nglobal variable, and does not take up any memory during execution.\n\n:param expr: Una expresi\u00f3n constante.\"\"\"\n ...\n\n@overload\ndef opt_level() -> int:\n \"\"\"Obtiene el nivel actual de optimizaci\u00f3n para la compilaci\u00f3n de scripts. (nivel de opt)\n\nExample: ``micropython.opt_level()``\n\nThe optimisation level controls the following compilation features:\n\n- Assertions: at level 0 assertion statements are enabled and compiled\n into the bytecode; at levels 1 and higher assertions are not compiled.\n\n- Built-in ``__debug__`` variable: at level 0 this variable expands to\n True; at levels 1 and higher it expands to False.\n\n- Source-code line numbers: at levels 0, 1 and 2 source-code line number\n are stored along with the bytecode so that exceptions can report the\n line number they occurred at; at levels 3 and higher line numbers are\n not stored.\n\n:return: An integer representing the current level.\"\"\"\n ...\n\n@overload\ndef opt_level(level: int) -> None:\n \"\"\"Establece el nivel de optimizaci\u00f3n para la posterior compilaci\u00f3n de scripts. (nivel de opt)\n\nExample: ``micropython.opt_level(1)``\n\nThe optimisation level controls the following compilation features:\n\n- Assertions: at level 0 assertion statements are enabled and compiled\n into the bytecode; at levels 1 and higher assertions are not compiled.\n\n- Built-in ``__debug__`` variable: at level 0 this variable expands to\n True; at levels 1 and higher it expands to False.\n\n- Source-code line numbers: at levels 0, 1 and 2 source-code line number\n are stored along with the bytecode so that exceptions can report the\n line number they occurred at; at levels 3 and higher line numbers are\n not stored.\n\nThe default optimisation level is usually level 0.\n\n:param level: (nivel) Un entero que representa el nivel de optimizaci\u00f3n.\"\"\"\n ...\n\ndef mem_info(verbose: Any=None) -> None:\n \"\"\"Imprime informaci\u00f3n sobre la memoria usada en este momento. (info de mem)\n\nExample: ``micropython.mem_info()``\n\n:param verbose: Si se pasa el argumento ``verbose``, se imprime informaci\u00f3n adicional.\"\"\"\n ...\n\ndef qstr_info(verbose: Any=None) -> None:\n \"\"\"Imprime informaci\u00f3n sobre las cadenas internadas en este momento. (info de cad actual)\n\nExample: ``micropython.qstr_info()``\n\n:param verbose: Si se pasa el argumento ``verbose``, se imprime informaci\u00f3n adicional.\n\nThe information that is printed is implementation dependent, but currently\nincludes the number of interned strings and the amount of RAM they use. In\nverbose mode it prints out the names of all RAM-interned strings.\"\"\"\n ...\n\ndef stack_use() -> int:\n \"\"\"Devuelve un entero que representa la cantidad de pila que se est\u00e1 usando en este momento. (pila usada)\n\nExample: ``micropython.stack_use()``\n\nThe absolute value of this is not particularly useful, rather it\nshould be used to compute differences in stack usage at different points.\n\n:return: An integer representing current stack use.\"\"\"\n ...\n\ndef heap_lock() -> None:\n \"\"\"Bloquea el mont\u00f3n. (bloquear mont\u00f3n)\n\nExample: ``micropython.heap_lock()``\n\nWhen locked no memory allocation can occur and a ``MemoryError`` will be\nraised if any heap allocation is attempted.\"\"\"\n ...\n\ndef heap_unlock() -> None:\n \"\"\"Desbloquea el mont\u00f3n. (desbloquear el mont\u00f3n)\n\nExample: ``micropython.heap_unlock()``\n\nWhen locked no memory allocation can occur and a ``MemoryError`` will be\nraised if any heap allocation is attempted.\"\"\"\n ...\n\ndef kbd_intr(chr: int) -> None:\n \"\"\"Establece qu\u00e9 car\u00e1cter lanzar\u00e1 una excepci\u00f3n ``KeyboardInterrupt``. (intr tecl)\n\nExample: ``micropython.kbd_intr(-1)``\n\n:param chr: (car) C\u00f3digo de car\u00e1cter que lanzar\u00e1 la interrupci\u00f3n o -1 para desactivar la captura de Ctrl + C.\n\nBy default this is set to 3 during script execution, corresponding to Ctrl-C.\nPassing -1 to this function will disable capture of Ctrl-C, and passing 3\nwill restore it.\n\nThis function can be used to prevent the capturing of Ctrl-C on the\nincoming stream of characters that is usually used for the REPL, in case\nthat stream is used for other purposes.\"\"\"\n ...", "/typeshed/stdlib/music.pyi": "\"\"\"Crear y reproducir melod\u00edas. (m\u00fasica)\"\"\"\nfrom typing import Optional, Tuple, Union, List\nfrom .microbit import MicroBitDigitalPin, pin0\nDADADADUM: Tuple[str, ...]\n\"\"\"Melod\u00eda: apertura de la \"Sinfon\u00eda n.\u00ba 5 en do menor\" de Beethoven.\"\"\"\nENTERTAINER: Tuple[str, ...]\n\"\"\"Melod\u00eda: fragmento inicial del cl\u00e1sico Ragtime de Scott Joplin \u201cThe Entertainer\u201d.\"\"\"\nPRELUDE: Tuple[str, ...]\n\"\"\"Melod\u00eda: apertura del primer \"Preludio en do mayor\" de los 48 Preludios y Fugas de J. S. Bach. (preludio)\"\"\"\nODE: Tuple[str, ...]\n\"\"\"Melod\u00eda: tema \u201cOda a la alegr\u00eda\u201d de la \"Sinfon\u00eda n.\u00ba 9 en re menor\" de Beethoven. (oda)\"\"\"\nNYAN: Tuple[str, ...]\n\"\"\"Melod\u00eda: el tema de Nyan Cat (http://www.nyan.cat/).\n\nThe composer is unknown. This is fair use for educational porpoises (as they say in New York).\"\"\"\nRINGTONE: Tuple[str, ...]\n\"\"\"Melod\u00eda: algo que suena como un tono de llamada de un tel\u00e9fono m\u00f3vil. (tono de llamada)\n\nTo be used to indicate an incoming message.\n\"\"\"\nFUNK: Tuple[str, ...]\n\"\"\"Melod\u00eda: una l\u00ednea de bajo funky para agentes secretos y maestros criminales.\"\"\"\nBLUES: Tuple[str, ...]\n\"\"\"Melod\u00eda: \"walking bass\" con un blues boogie-woogie de 12 compases.\"\"\"\nBIRTHDAY: Tuple[str, ...]\n\"\"\"Melod\u00eda: \u201cCumplea\u00f1os feliz\u201d (cumplea\u00f1os)\n\nFor copyright status see: http://www.bbc.co.uk/news/world-us-canada-34332853\n\"\"\"\nWEDDING: Tuple[str, ...]\n\"\"\"Melod\u00eda: coro nupcial de la \u00f3pera de Wagner \"Lohengrin\". (boda)\"\"\"\nFUNERAL: Tuple[str, ...]\n\"\"\"Melod\u00eda: \u201cMarcha f\u00fanebre\u201d, conocida tambi\u00e9n como \"Sonata para piano n.\u00ba 2 en si bemol menor, Op. 35\" de Fr\u00e9d\u00e9ric Chopin.\"\"\"\nPUNCHLINE: Tuple[str, ...]\n\"\"\"Melod\u00eda: un fragmento divertido que representa que se ha hecho un chiste. (remate)\"\"\"\nPYTHON: Tuple[str, ...]\n\"\"\"Melod\u00eda: la marcha de John Philip Sousa \u201cLiberty Bell\u201d, tambi\u00e9n conocida por ser el tema del \u201cMonty Python Flying Circus\u201d (de donde obtiene su nombre el lenguaje de programaci\u00f3n Python).\"\"\"\nBADDY: Tuple[str, ...]\n\"\"\"Melod\u00eda: entrada de un malote en la \u00e9poca del cine mudo. (malote)\"\"\"\nCHASE: Tuple[str, ...]\n\"\"\"Melod\u00eda: escena de persecuci\u00f3n en la \u00e9poca del cine mudo. (persecuci\u00f3n)\"\"\"\nBA_DING: Tuple[str, ...]\n\"\"\"Melod\u00eda: una se\u00f1al corta para indicar que algo ha pasado.\"\"\"\nWAWAWAWAA: Tuple[str, ...]\n\"\"\"Melod\u00eda: un tromb\u00f3n muy triste.\"\"\"\nJUMP_UP: Tuple[str, ...]\n\"\"\"Melod\u00eda: para usar en un juego, indicando un movimiento ascendente. (saltar arriba)\"\"\"\nJUMP_DOWN: Tuple[str, ...]\n\"\"\"Melod\u00eda: para usar en un juego, indicando un movimiento descendente. (saltar abajo)\"\"\"\nPOWER_UP: Tuple[str, ...]\n\"\"\"Melod\u00eda: una fanfarria para indicar un logro desbloqueado. (subida de potencia)\"\"\"\nPOWER_DOWN: Tuple[str, ...]\n\"\"\"Melod\u00eda: una fanfarria triste para indicar un logro perdido. (bajada de potencia)\"\"\"\n\ndef set_tempo(ticks: int=4, bpm: int=120) -> None:\n \"\"\"Establece el ritmo aproximado de la reproducci\u00f3n. (configurar tempo)\n\nExample: ``music.set_tempo(bpm=120)``\n\n:param ticks: (tics) El n\u00famero de tics que constituyen un ritmo.\n:param bpm: Un entero que determina el n\u00famero de compases por minuto.\n\nSuggested default values allow the following useful behaviour:\n\n- music.set_tempo() \u2013 reset the tempo to default of ticks = 4, bpm = 120\n- music.set_tempo(ticks=8) \u2013 change the \u201cdefinition\u201d of a beat\n- music.set_tempo(bpm=180) \u2013 just change the tempo\n\nTo work out the length of a tick in milliseconds is very simple arithmetic:\n60000/bpm/ticks_per_beat. For the default values that\u2019s\n60000/120/4 = 125 milliseconds or 1 beat = 500 milliseconds.\"\"\"\n ...\n\ndef get_tempo() -> Tuple[int, int]:\n \"\"\"Obtiene el ritmo actual como una tupla de enteros: ``(ticks, bpm)``. (obtener tempo)\n\nExample: ``ticks, beats = music.get_tempo()``\n\n:return: The temp as a tuple with two integer values, the ticks then the beats per minute.\"\"\"\n ...\n\ndef play(music: Union[str, List[str], Tuple[str, ...]], pin: Optional[MicroBitDigitalPin]=pin0, wait: bool=True, loop: bool=False) -> None:\n \"\"\"Reproduce m\u00fasica. (reproducir)\n\nExample: ``music.play(music.NYAN)``\n\n:param music: (m\u00fasica) m\u00fasica especificada en `una notaci\u00f3n especial `_\n:param pin: pin de salida para usar con un altavoz externo (por defecto ``pin0``), ``None`` para que no haya sonido.\n:param wait: (esperar) Si ``wait`` se configura como ``True`` (verdadero), esta funci\u00f3n estar\u00e1 bloqueando.\n:param loop: (bucle) Si ``loop`` se configura como ``True`` (verdadero), la melod\u00eda se repite hasta que se llama a ``stop`` o se interrumpe la llamada de bloqueo.\n\nMany built-in melodies are defined in this module.\"\"\"\n ...\n\ndef pitch(frequency: int, duration: int=-1, pin: Optional[MicroBitDigitalPin]=pin0, wait: bool=True) -> None:\n \"\"\"Reproduce una nota. (tono)\n\nExample: ``music.pitch(185, 1000)``\n\n:param frequency: (frecuencia) Una frecuencia entera\n:param duration: (duraci\u00f3n) La duraci\u00f3n en milisegundos. Si es negativa, el sonido continuar\u00e1 hasta la siguiente llamada o una llamada a ``stop``.\n:param pin: Pin de salida opcional (por defecto, ``pin0``).\n:param wait: (esperar) Si ``wait`` se configura como ``True`` (verdadero), esta funci\u00f3n estar\u00e1 bloqueando.\n\nFor example, if the frequency is set to 440 and the length to\n1000 then we hear a standard concert A for one second.\n\nYou can only play one pitch on one pin at any one time.\"\"\"\n ...\n\ndef stop(pin: Optional[MicroBitDigitalPin]=pin0) -> None:\n \"\"\"Detiene la reproducci\u00f3n de toda la m\u00fasica en el altavoz integrado y en cualquier pin que est\u00e9 emitiendo sonido. (detener)\n\nExample: ``music.stop()``\n\n:param pin: Se puede proporcionar un argumento opcional para especificar un pin; por ejemplo, ``music.stop(pin1)``.\"\"\"\n\ndef reset() -> None:\n \"\"\"Restablece los valores de \"ticks\", \"bpm\", \"duration\" y \"octave\" a sus valores por defecto. (restablecer)\n\nExample: ``music.reset()``\n\nValues:\n- ``ticks = 4``\n- ``bpm = 120``\n- ``duration = 4``\n- ``octave = 4``\"\"\"\n ...", - "/typeshed/stdlib/neopixel.pyi": "\"\"\"Tiras de LED RGB y RGBW accesibles individualmente.\"\"\"\nfrom .microbit import MicroBitDigitalPin\nfrom typing import Tuple\n\nclass NeoPixel:\n\n def __init__(self, pin: MicroBitDigitalPin, n: int, bpp: int=3) -> None:\n \"\"\"Inicializa una nueva tira de LED NeoPixel controlada a trav\u00e9s de un pin.\n\nExample: ``np = neopixel.NeoPixel(pin0, 8)``\n\nTo support RGBW neopixels, a third argument can be passed to\n``NeoPixel`` to indicate the number of bytes per pixel (``bpp``).\nFor RGBW, this is is 4 rather than the default of 3 for RGB and GRB.\n\nEach pixel is addressed by a position (starting from 0). Neopixels are\ngiven RGB (red, green, blue) / RGBW (red, green, blue, white) values\nbetween 0-255 as a tuple. For example, in RGB, ``(255,255,255)`` is\nwhite. In RGBW, ``(255,255,255,0)`` or ``(0,0,0,255)`` is white.\n\nSee `the online docs `_ for warnings and other advice.\n\n:param pin: El pin que controla la tira NeoPixel.\n:param n: El n\u00famero de LED NeoPixel de la tira.\n:param bpp: Bytes por p\u00edxel. Para compatibilidad de neop\u00edxeles RGBW, pasa 4 en lugar del valor predeterminado de 3 para RGB y GRB.\"\"\"\n ...\n\n def clear(self) -> None:\n \"\"\"Borrar todos los p\u00edxeles. (borrar)\n\nExample: ``np.clear()``\"\"\"\n ...\n\n def show(self) -> None:\n \"\"\"Muestra los p\u00edxeles. (mostrar)\n\nExample: ``np.show()``\n\nMust be called for any updates to become visible.\"\"\"\n ...\n\n def write(self) -> None:\n \"\"\"Muestra los p\u00edxeles (solo micro:bit V2). (escribir)\n\nExample: ``np.write()``\n\nMust be called for any updates to become visible.\n\nEquivalent to ``show``.\"\"\"\n ...\n\n def fill(self, colour: Tuple[int, ...]) -> None:\n \"\"\"Colorea todos los p\u00edxeles con un valor RGB/RGBW dado (solo micro:bit V2). (llenar)\n\nExample: ``np.fill((0, 0, 255))``\n\n:param colour: (color) Una tupla de la misma longitud que el n\u00famero de bytes por p\u00edxel (bpp).\n\nUse in conjunction with ``show()`` to update the neopixels.\"\"\"\n ...\n\n def __setitem__(self, key: int, value: Tuple[int, ...]) -> None:\n \"\"\"Establece el color de un p\u00edxel. (configurar elemento)\n\nExample: ``np[0] = (255, 0, 0)``\n\n:param key: (clave) El n\u00famero de p\u00edxel.\n:param value: (valor) El color.\"\"\"\n\n def __getitem__(self, key: int) -> Tuple[int, ...]:\n \"\"\"Obtiene el color de un p\u00edxel. (obtener elemento)\n\nExample: ``r, g, b = np[0]``\n\n:param key: (clave) El n\u00famero de p\u00edxel.\n:return: The colour tuple.\"\"\"\n\n def __len__(self) -> int:\n \"\"\"Obtiene la longitud de esta tira de p\u00edxeles. (lon)\n\nExample: ``len(np)``\"\"\"", + "/typeshed/stdlib/neopixel.pyi": "\"\"\"Tiras de LED RGB y RGBW accesibles individualmente.\"\"\"\nfrom .microbit import MicroBitDigitalPin\nfrom typing import Tuple\n\nclass NeoPixel:\n\n def __init__(self, pin: MicroBitDigitalPin, n: int, bpp: int=3) -> None:\n \"\"\"Inicializa una nueva tira de LED NeoPixel controlada a trav\u00e9s de un pin.\n\nExample: ``np = neopixel.NeoPixel(pin0, 8)``\n\nTo support RGBW neopixels, a third argument can be passed to\n``NeoPixel`` to indicate the number of bytes per pixel (``bpp``).\nFor RGBW, this is is 4 rather than the default of 3 for RGB and GRB.\n\nEach pixel is addressed by a position (starting from 0). Neopixels are\ngiven RGB (red, green, blue) / RGBW (red, green, blue, white) values\nbetween 0-255 as a tuple. For example, in RGB, ``(255,255,255)`` is\nwhite. In RGBW, ``(255,255,255,0)`` or ``(0,0,0,255)`` is white.\n\nSee `the online docs `_ for warnings and other advice.\n\n:param pin: El pin que controla la tira NeoPixel.\n:param n: El n\u00famero de LED NeoPixel de la tira.\n:param bpp: Bytes por p\u00edxel. Para compatibilidad con NeoPixel RGBW, pasa 4 en lugar del valor predeterminado 3 para RGB y GRB.\"\"\"\n ...\n\n def clear(self) -> None:\n \"\"\"Borrar todos los p\u00edxeles. (borrar)\n\nExample: ``np.clear()``\"\"\"\n ...\n\n def show(self) -> None:\n \"\"\"Muestra los p\u00edxeles. (mostrar)\n\nExample: ``np.show()``\n\nMust be called for any updates to become visible.\"\"\"\n ...\n\n def write(self) -> None:\n \"\"\"Muestra los p\u00edxeles (solo micro:bit V2). (escribir)\n\nExample: ``np.write()``\n\nMust be called for any updates to become visible.\n\nEquivalent to ``show``.\"\"\"\n ...\n\n def fill(self, colour: Tuple[int, ...]) -> None:\n \"\"\"Colorea todos los p\u00edxeles con un valor RGB/RGBW dado (solo micro:bit V2). (llenar)\n\nExample: ``np.fill((0, 0, 255))``\n\n:param colour: (color) Una tupla de la misma longitud que el n\u00famero de bytes por p\u00edxel (bpp).\n\nUse in conjunction with ``show()`` to update the neopixels.\"\"\"\n ...\n\n def __setitem__(self, key: int, value: Tuple[int, ...]) -> None:\n \"\"\"Establece el color de un p\u00edxel. (configurar elemento)\n\nExample: ``np[0] = (255, 0, 0)``\n\n:param key: (clave) El n\u00famero de p\u00edxel.\n:param value: (valor) El color.\"\"\"\n\n def __getitem__(self, key: int) -> Tuple[int, ...]:\n \"\"\"Obtiene el color de un p\u00edxel. (obtener elemento)\n\nExample: ``r, g, b = np[0]``\n\n:param key: (clave) El n\u00famero de p\u00edxel.\n:return: The colour tuple.\"\"\"\n\n def __len__(self) -> int:\n \"\"\"Obtiene la longitud de esta tira de p\u00edxeles. (lon)\n\nExample: ``len(np)``\"\"\"", "/typeshed/stdlib/os.pyi": "\"\"\"Acceder al sistema de archivos. (so)\"\"\"\nfrom typing import Tuple\nfrom typing import List\n\ndef listdir() -> List[str]:\n \"\"\"Lista los archivos.\n\nExample: ``os.listdir()``\n\n:return: A list of the names of all the files contained within the local\npersistent on-device file system.\"\"\"\n ...\n\ndef remove(filename: str) -> None:\n \"\"\"Elimina un archivo. (eliminar)\n\nExample: ``os.remove('data.txt')``\n\n:param filename: (nombre del archivo) El archivo a eliminar.\n\nIf the file does not exist an ``OSError`` exception will occur.\"\"\"\n ...\n\ndef size(filename: str) -> int:\n \"\"\"Devuelve el tama\u00f1o de un archivo. (tama\u00f1o)\n\nExample: ``os.size('data.txt')``\n\n:param filename: (nombre del archivo) El archivo\n:return: The size in bytes.\n\nIf the file does not exist an ``OSError`` exception will occur.\"\"\"\n\nclass uname_result(Tuple[str, str, str, str, str]):\n \"\"\"Resultado de ``os.uname()`` (resultado de nombreu)\"\"\"\n sysname: str\n \"\"\"Nombre del sistema operativo. (nombre del sistema)\"\"\"\n nodename: str\n \"\"\"Nombre de la m\u00e1quina en la red (definida por la implementaci\u00f3n). (nombre del nodo)\"\"\"\n release: str\n \"\"\"Versi\u00f3n de lanzamiento del sistema operativo. (lanzamiento)\"\"\"\n version: str\n \"\"\"Versi\u00f3n del sistema operativo. (versi\u00f3n)\"\"\"\n machine: str\n \"\"\"Identificador de hardware. (m\u00e1quina)\"\"\"\n\ndef uname() -> uname_result:\n \"\"\"Devuelve informaci\u00f3n que identifica el sistema operativo actual. (nombreu)\n\nExample: ``os.uname()``\n\nThe return value is an object with five attributes:\n\n- ``sysname`` - operating system name\n- ``nodename`` - name of machine on network (implementation-defined)\n- ``release`` - operating system release\n- ``version`` - operating system version\n- ``machine`` - hardware identifier\n\nThere is no underlying operating system in MicroPython. As a result the\ninformation returned by the ``uname`` function is mostly useful for\nversioning details.\"\"\"\n ...", "/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": "\"\"\"Comunicarse entre micro:bits con la radio incorporada.\"\"\"\nfrom _typeshed import WriteableBuffer\nfrom typing import Optional, Tuple\nRATE_1MBIT: int\n\"\"\"Constante utilizada para indicar un rendimiento de 1 Mb por segundo. (tasa de 1 mbit)\"\"\"\nRATE_2MBIT: int\n\"\"\"Constante utilizada para indicar un rendimiento de 2 Mb por segundo. (tasa de 2 mbit)\"\"\"\n\ndef on() -> None:\n \"\"\"Enciende la radio. (encender)\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 \"\"\"Apaga la radio, ahorrando energ\u00eda y memoria. (apagado)\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 \"\"\"Configura la radio.\n\nExample: ``radio.config(group=42)``\n\nThe default configuration is suitable for most use.\n\n:param length: (longitud) (valor predeterminado = 32) define la longitud m\u00e1xima, en bytes, de un mensaje enviado a trav\u00e9s de la radio.\nPuede tener hasta 251 bytes de largo (254 - 3 bytes para pre\u00e1mbulos S0, LENGTH y S1).\n:param queue: (cola) (valor predeterminado = 3) especifica el n\u00famero de mensajes que pueden almacenarse en la cola de mensajes entrantes.\nSi no quedan espacios en la cola para los mensajes entrantes, el mensaje entrante ser\u00e1 eliminado.\n:param channel: (canal) (valor predeterminado = 7) un valor entero de 0 a 83 (inclusive) que define un \"canal\" arbitrario en el cual la radio est\u00e1 sintonizada.\nLos mensajes se enviar\u00e1n a trav\u00e9s de este canal y solo los mensajes recibidos a trav\u00e9s de este canal se pondr\u00e1n en la cola de mensajes entrantes. Cada paso es de 1 MHz de ancho, basado en 2400 MHz.\n:param power: (potencia) (valor predeterminado = 6) es un valor entero de 0 a 7 (inclusive) para indicar la fuerza de la se\u00f1al usada al transmitir un mensaje.\nCuanto m\u00e1s alto sea el valor, m\u00e1s fuerte es la se\u00f1al, pero m\u00e1s energ\u00eda consume el dispositivo. La numeraci\u00f3n se traduce a posiciones en la siguiente lista de valores de dBm (decibelio-milivatio): -30, -20, -16, -12, -8, -4, 0, 4.\n:param address: (direcci\u00f3n) (valor predeterminado = 0x75626974) un nombre arbitrario, expresado como una direcci\u00f3n de 32 bits, que se usa para filtrar los paquetes entrantes a nivel de hardware, manteniendo solo aquellos que coincidan con la direcci\u00f3n que has establecido.\nEl valor predeterminado utilizado por otras plataformas relacionadas con el micro:bit es la configuraci\u00f3n predeterminada utilizada aqu\u00ed.\n:param group: (grupo) (valor predeterminado = 0) un valor de 8 bits (0 - 255) usado con el valor de ``address`` al filtrar mensajes.\nConceptualmente, \"address\" (direcci\u00f3n) es como una direcci\u00f3n de casa u oficina y \"group\" (grupo) es la persona que est\u00e1 en esa direcci\u00f3n y a la que quieres enviar un mensaje.\n:param data_rate: (tasa de datos) (valor predeterminado = ``radio.RATE_1MBIT``) indica la velocidad a la que se lleva a cabo el procesamiento de datos.\nPuede ser una de las siguientes constantes definidas en el m\u00f3dulo ``radio``: ``RATE_250KBIT``, ``RATE_1MBIT`` o ``RATE_2MBIT``.\n\nIf ``config`` is not called then the defaults described above are assumed.\"\"\"\n ...\n\ndef reset() -> None:\n \"\"\"Restablece la configuraci\u00f3n a sus valores predeterminados. (restablecer)\n\nExample: ``radio.reset()``\n\nThe defaults as as per the ``config`` function above.\"\"\"\n ...\n\ndef send_bytes(message: bytes) -> None:\n \"\"\"Env\u00eda un mensaje que contiene bytes. (enviar bytes)\n\nExample: ``radio.send_bytes(b'hello')``\n\n:param message: (mensaje) Los bytes a enviar.\"\"\"\n ...\n\ndef receive_bytes() -> Optional[bytes]:\n \"\"\"Recibe el siguiente mensaje entrante en la cola de mensajes. (recibir bytes)\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 \"\"\"Copia el siguiente mensaje entrante de la cola de mensajes en un b\u00fafer. (recibir bytes en)\n\nExample: ``radio.receive_bytes_info(buffer)``\n\n:param buffer: (b\u00fafer) El b\u00fafer de destino. El mensaje se trunca si es m\u00e1s grande que el b\u00fafer.\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 \"\"\"Env\u00eda una cadena de mensaje. (enviar)\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: (mensaje) La cadena a enviar.\"\"\"\n ...\n\ndef receive() -> Optional[str]:\n \"\"\"Funciona exactamente del mismo modo que ``receive_bytes``, pero devuelve lo que se envi\u00f3. (recibir)\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 \"\"\"Devuelve una tupla de tres valores que representan el siguiente mensaje entrante de la cola de mensajes. (recibir completo)\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 ...", @@ -34,18 +34,18 @@ "/typeshed/stdlib/ustruct.pyi": "from struct import *\n", "/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/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 \"\"\"Programa la ejecuci\u00f3n de una funci\u00f3n en el intervalo especificado por los argumentos de tiempo **S\u00f3lo V2**. (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: Funci\u00f3n a llamar en el intervalo proporcionado. Omitir cuando se utiliza como un decorador.\n:param days: (d\u00edas) Configura la marca del d\u00eda para la programaci\u00f3n.\n:param h: Configura la marca de la hora para la programaci\u00f3n.\n:param min: Configura la marca de los minutos para la programaci\u00f3n.\n:param s: Configura la segunda marca para la programaci\u00f3n.\n:param ms: Configura la marca de los milisegundos para la programaci\u00f3n.\"\"\"\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 \"\"\"Convierte un valor de un rango a un rango de n\u00fameros enteros. (escala)\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) Un n\u00famero a convertir.\n:param from_: (de) Una tupla para definir el rango desde el que convertir.\n:param to: (a) Una tupla para definir el rango al que convertir.\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 \"\"\"Convierte un valor de un rango a un rango de punto flotante. (escala)\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) Un n\u00famero a convertir.\n:param from_: (de) Una tupla para definir el rango desde el que convertir.\n:param to: (a) Una tupla para definir el rango al que convertir.\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 Celsius. (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 \"\"\"Imagen de tijeras. (tijeras)\"\"\"\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 \"\"\"Obtiene la medida de la aceleraci\u00f3n de todos los ejes combinados, como un entero positivo. Es la suma Pitag\u00f3rica de los ejes X, Y y Z. (obtener fuerza)\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 \"\"\"Configura el rango de sensibilidad del aceler\u00f3metro, en g (gravedad est\u00e1ndar), a los valores m\u00e1s cercanos soportados por el hardware, por lo que redondea a ``2``, ``4``, u ``8`` g. (configurar rango)\n\nExample: ``accelerometer.set_range(8)``\n\n:param value: (valor) Nuevo rango para el aceler\u00f3metro, un entero en ``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 \"\"\"Reproduce un sonido integrado, un efecto de sonido o marcos de audio personalizados. (reproducir)\n\nExample: ``audio.play(Sound.GIGGLE)``\n\n:param source: (origen) Un ``Sound`` integrado como ``Sound.GIGGLE``, un ``SoundEffect`` o datos de muestra como un iterable de objetos ``AudioFrame``.\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 \"\"\"Un efecto de sonido, compuesto por un conjunto de par\u00e1metros configurados a trav\u00e9s del constructor o atributos. (efectosonido)\"\"\"\n WAVEFORM_SINE: ClassVar[int]\n \"\"\"Opci\u00f3n de onda senoidal utilizada para el par\u00e1metro ``waveform``. (forma de onda senoidal)\"\"\"\n WAVEFORM_SAWTOOTH: ClassVar[int]\n \"\"\"Opci\u00f3n de onda con diente de sierra usada para el par\u00e1metro ``waveform``. (forma de onda diente de sierra)\"\"\"\n WAVEFORM_TRIANGLE: ClassVar[int]\n \"\"\"Opci\u00f3n de onda triangular usada para el par\u00e1metro ``waveform``. (forma de onda triangular)\"\"\"\n WAVEFORM_SQUARE: ClassVar[int]\n \"\"\"Opci\u00f3n de onda cuadrada usada para el par\u00e1metro ``waveform``. (forma de onda cuadrada)\"\"\"\n WAVEFORM_NOISE: ClassVar[int]\n \"\"\"Opci\u00f3n de ruido usada para el par\u00e1metro ``waveform``. (forma de onda de ruido)\"\"\"\n SHAPE_LINEAR: ClassVar[int]\n \"\"\"Opci\u00f3n de interpolaci\u00f3n lineal usada para el par\u00e1metro ``shape``. (forma lineal)\"\"\"\n SHAPE_CURVE: ClassVar[int]\n \"\"\"Opci\u00f3n de interpolaci\u00f3n de curva usada para el par\u00e1metro ``shape``. (forma curva)\"\"\"\n SHAPE_LOG: ClassVar[int]\n \"\"\"Opci\u00f3n de interpolaci\u00f3n logar\u00edtmica usada para el par\u00e1metro ``shape``. (registro de forma)\"\"\"\n FX_NONE: ClassVar[int]\n \"\"\"Ninguna opci\u00f3n de efecto usada para el par\u00e1metro ``fx``. (fx ninguno)\"\"\"\n FX_TREMOLO: ClassVar[int]\n \"\"\"Opci\u00f3n de efecto Tr\u00e9molo usada para el par\u00e1metro ``fx``. (fx tr\u00e9molo)\"\"\"\n FX_VIBRATO: ClassVar[int]\n \"\"\"Opci\u00f3n de efecto vibrato utilizada para el par\u00e1metro ``fx``.\"\"\"\n FX_WARBLE: ClassVar[int]\n \"\"\"Opci\u00f3n de efecto gorjeo utilizada para el par\u00e1metro ``fx``. (fx gorjeo)\"\"\"\n freq_start: int\n \"\"\"Frecuencia de inicio en Hertz (Hz), un n\u00famero entre ``0`` y ``9999`` (frecuencia de inicio)\"\"\"\n freq_end: int\n \"\"\"Frecuencia final en Hertz (Hz), un n\u00famero entre ``0`` y ``9999`` (frecuencia final)\"\"\"\n duration: int\n \"\"\"Duraci\u00f3n del sonido en milisegundos, un n\u00famero entre ``0`` y ``9999`` (duraci\u00f3n)\"\"\"\n vol_start: int\n \"\"\"Valor de volumen inicial, un n\u00famero entre ``0`` y ``255`` (volumen de inicio)\"\"\"\n vol_end: int\n \"\"\"Valor final del volumen, un n\u00famero entre ``0`` y ``255`` (volumen final)\"\"\"\n waveform: int\n \"\"\"Tipo de forma ondulada, uno de estos valores: ``WAVEFORM_SINE``, ``WAVEFORM_SAWTOOTH``, ``WAVEFORM_TRIANGLE``, ``WAVEFORM_SQUARE``, ``WAVEFORM_NOISE`` (ruido generado aleatoriamente) (forma de onda)\"\"\"\n fx: int\n \"\"\"Efecto para a\u00f1adir en el sonido, uno de los siguientes valores: ``FX_TREMOLO``, ``FX_VIBRATO``, ``FX_WARBLE``o ``FX_NONE``\"\"\"\n shape: int\n \"\"\"El tipo de curva de interpolaci\u00f3n entre las frecuencias de inicio y final, diferentes formas de onda tienen diferentes tasas de cambio en la frecuencia. Uno de los siguientes valores: ``SHAPE_LINEAR``, ``SHAPE_CURVE``, ``SHAPE_LOG`` (forma)\"\"\"\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 \"\"\"Crea un nuevo efecto de sonido.\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: (frecuencia de inicio) Frecuencia de inicio en Hertz (Hz), un n\u00famero entre ``0`` y ``9999``.\n:param freq_end: (frecuencia final) Frecuencia final en Hertz (Hz), un n\u00famero entre ``0`` y ``9999``.\n:param duration: (duraci\u00f3n) Duraci\u00f3n del sonido en milisegundos, un n\u00famero entre ``0`` y ``9999``.\n:param vol_start: (volumen inicial) Valor de volumen inicial, un n\u00famero entre ``0`` y ``255``.\n:param vol_end: (volumen final) Valor de volumen final, un n\u00famero entre ``0`` y ``255``.\n:param waveform: (forma de onda) Tipo de forma de onda, uno de estos valores: ``WAVEFORM_SINE``, ``WAVEFORM_SAWTOOTH``, ``WAVEFORM_TRIANGLE``, ``WAVEFORM_SQUARE``, ``WAVEFORM_NOISE`` (ruido generado aleatoriamente).\n:param fx: Efecto para a\u00f1adir en el sonido, uno de los siguientes valores: ``FX_TREMOLO``, ``FX_VIBRATO``, ``FX_WARBLE``o ``FX_NONE``.\n:param shape: (forma) El tipo de curva de interpolaci\u00f3n entre las frecuencias de inicio y final, diferentes formas de onda tienen diferentes tasas de cambio en la frecuencia. Uno de los siguientes valores: ``SHAPE_LINEAR``, ``SHAPE_CURVE``, ``SHAPE_LOG``.\"\"\"\n\n def copy(self) -> SoundEffect:\n \"\"\"Crea una copia de este ``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 \"\"\"Sobrescribe los datos de este ``AudioFrame`` con los datos de otra instancia ``AudioFrame``. (copiadesde)\n\nExample: ``my_frame.copyfrom(source_frame)``\n\n:param other: (otro) Instancia ``AudioFrame`` desde la que copiar los datos.\"\"\"\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/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 \"\"\"Programe para ejecutar una funci\u00f3n en el intervalo especificado por los argumentos de tiempo **V2 solamente**. (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: Funci\u00f3n para llamar al intervalo proporcionado. Omitir cuando se utiliza como decorador.\n:param days: (d\u00edas) Establece la marca del d\u00eda para la programaci\u00f3n.\n:param h: Establece la marca de hora para la programaci\u00f3n.\n:param min: Establece la marca de minuto para la programaci\u00f3n.\n:param s: Establece la segunda marca para la programaci\u00f3n.\n:param ms: Establece la marca de milisegundos para la programaci\u00f3n.\"\"\"\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 \"\"\"Convierte un valor de un rango a un rango de n\u00fameros enteros. (escala)\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) Un n\u00famero a convertir.\n:param from_: (de) Una tupla para definir el rango desde el que convertir.\n:param to: (a) Una tupla para definir el rango al que convertir.\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 \"\"\"Convierte un valor de un rango a un rango de punto flotante. (escala)\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) Un n\u00famero a convertir.\n:param from_: (de) Una tupla para definir el rango desde el que convertir.\n:param to: (a) Una tupla para definir el rango al que convertir.\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 Celsius. (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 \"\"\"Imagen de tijeras. (tijeras)\"\"\"\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 \"\"\"Obtener la medici\u00f3n de aceleraci\u00f3n de todos los ejes combinados, como un entero positivo. Esta es la suma de Pitag\u00f3rica de los ejes X, Y y Z. (obtener fuerza)\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 \"\"\"Establecer el rango de sensibilidad aceler\u00f3metro, en g (gravedad est\u00e1ndar), a los valores m\u00e1s cercanos soportados por el hardware, as\u00ed que se redondea a ``2``, ``4``o ``8`` g. (establecer rango)\n\nExample: ``accelerometer.set_range(8)``\n\n:param value: (valor) Nuevo rango para el aceler\u00f3metro, un entero en ``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 \"\"\"Reproducir un sonido, un efecto de sonido o marcos de audio personalizados. (reproducir)\n\nExample: ``audio.play(Sound.GIGGLE)``\n\n:param source: (origen) Un ``Sound`` integrado como ``Sound.GIGGLE``, un ``SoundEffect`` o datos de muestra como un iterable de objetos ``AudioFrame``.\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 \"\"\"Un efecto de sonido, compuesto por un conjunto de par\u00e1metros configurados a trav\u00e9s del constructor o atributos. (efecto de sonido)\"\"\"\n WAVEFORM_SINE: ClassVar[int]\n \"\"\"Opci\u00f3n de onda sinusoidal utilizada para el par\u00e1metro ``waveform``. (forma de onda sinusoidal)\"\"\"\n WAVEFORM_SAWTOOTH: ClassVar[int]\n \"\"\"Opci\u00f3n de onda con diente de sierra usada para el par\u00e1metro ``waveform``. (diente de sierra de forma de onda)\"\"\"\n WAVEFORM_TRIANGLE: ClassVar[int]\n \"\"\"Opci\u00f3n de onda triangular usada para el par\u00e1metro ``waveform``. (forma de onda triangular)\"\"\"\n WAVEFORM_SQUARE: ClassVar[int]\n \"\"\"Opci\u00f3n de onda cuadrada usada para el par\u00e1metro ``waveform``. (forma de onda cuadrada)\"\"\"\n WAVEFORM_NOISE: ClassVar[int]\n \"\"\"Opci\u00f3n de ruido usada para el par\u00e1metro ``waveform``. (forma de onda de ruido)\"\"\"\n SHAPE_LINEAR: ClassVar[int]\n \"\"\"Opci\u00f3n de interpolaci\u00f3n lineal usada para el par\u00e1metro ``shape``. (forma lineal)\"\"\"\n SHAPE_CURVE: ClassVar[int]\n \"\"\"Opci\u00f3n de interpolaci\u00f3n de curva usada para el par\u00e1metro ``shape``. (forma curva)\"\"\"\n SHAPE_LOG: ClassVar[int]\n \"\"\"Opci\u00f3n de interpolaci\u00f3n logar\u00edtmica usada para el par\u00e1metro ``shape``. (registro de forma)\"\"\"\n FX_NONE: ClassVar[int]\n \"\"\"Ninguna opci\u00f3n de efecto usada para el par\u00e1metro ``fx``. (fx ninguno)\"\"\"\n FX_TREMOLO: ClassVar[int]\n \"\"\"Opci\u00f3n de efecto Tr\u00e9molo usada para el par\u00e1metro ``fx``.\"\"\"\n FX_VIBRATO: ClassVar[int]\n \"\"\"Opci\u00f3n de efecto vibrato utilizada para el par\u00e1metro ``fx``.\"\"\"\n FX_WARBLE: ClassVar[int]\n \"\"\"Opci\u00f3n de efecto gorjeo utilizada para el par\u00e1metro ``fx``. (fx gorjeo)\"\"\"\n freq_start: int\n \"\"\"Frecuencia de inicio en Hertz (Hz), un n\u00famero entre ``0`` y ``9999`` (frecuencia de inicio)\"\"\"\n freq_end: int\n \"\"\"Frecuencia final en Hertz (Hz), un n\u00famero entre ``0`` y ``9999`` (frecuencia final)\"\"\"\n duration: int\n \"\"\"Duraci\u00f3n del sonido en milisegundos, un n\u00famero entre ``0`` y ``9999`` (duraci\u00f3n)\"\"\"\n vol_start: int\n \"\"\"Valor de volumen inicial, un n\u00famero entre ``0`` y ``255`` (volumen de inicio)\"\"\"\n vol_end: int\n \"\"\"Valor final del volumen, un n\u00famero entre ``0`` y ``255`` (volumen final)\"\"\"\n waveform: int\n \"\"\"Tipo de forma ondulada, uno de estos valores: ``WAVEFORM_SINE``, ``WAVEFORM_SAWTOOTH``, ``WAVEFORM_TRIANGLE``, ``WAVEFORM_SQUARE``, ``WAVEFORM_NOISE`` (ruido generado aleatoriamente) (forma de onda)\"\"\"\n fx: int\n \"\"\"Efecto para a\u00f1adir en el sonido, uno de los siguientes valores: ``FX_TREMOLO``, ``FX_VIBRATO``, ``FX_WARBLE``o ``FX_NONE``\"\"\"\n shape: int\n \"\"\"El tipo de curva de interpolaci\u00f3n entre las frecuencias de inicio y final, diferentes formas de onda tienen diferentes tasas de cambio en la frecuencia. Uno de los siguientes valores: ``SHAPE_LINEAR``, ``SHAPE_CURVE``, ``SHAPE_LOG`` (forma)\"\"\"\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 \"\"\"Crear un nuevo efecto de sonido.\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: (frecuencia de inicio) Frecuencia de inicio en Hertz (Hz), un n\u00famero entre ``0`` y ``9999``.\n:param freq_end: (frecuencia final) Frecuencia final en Hertz (Hz), un n\u00famero entre ``0`` y ``9999``.\n:param duration: (duraci\u00f3n) Duraci\u00f3n del sonido en milisegundos, un n\u00famero entre ``0`` y ``9999``.\n:param vol_start: (volumen inicial) Valor de volumen inicial, un n\u00famero entre ``0`` y ``255``.\n:param vol_end: (volumen final) Valor de volumen final, un n\u00famero entre ``0`` y ``255``.\n:param waveform: (forma de onda) Tipo de forma de onda, uno de estos valores: ``WAVEFORM_SINE``, ``WAVEFORM_SAWTOOTH``, ``WAVEFORM_TRIANGLE``, ``WAVEFORM_SQUARE``, ``WAVEFORM_NOISE`` (ruido generado aleatoriamente).\n:param fx: Efecto para a\u00f1adir en el sonido, uno de los siguientes valores: ``FX_TREMOLO``, ``FX_VIBRATO``, ``FX_WARBLE``o ``FX_NONE``.\n:param shape: (forma) El tipo de curva de interpolaci\u00f3n entre las frecuencias de inicio y final, diferentes formas de onda tienen diferentes tasas de cambio en la frecuencia. Uno de los siguientes valores: ``SHAPE_LINEAR``, ``SHAPE_CURVE``, ``SHAPE_LOG``.\"\"\"\n\n def copy(self) -> SoundEffect:\n \"\"\"Crear una copia de este ``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 \"\"\"Sobrescribir los datos en este ``AudioFrame`` con los datos de otra instancia de ``AudioFrame``. (copiar forma)\n\nExample: ``my_frame.copyfrom(source_frame)``\n\n:param other: (otro) Instancia ``AudioFrame`` desde la que copiar los datos.\"\"\"\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": "\"\"\"Usar la br\u00fajula incorporada. (br\u00fajula)\"\"\"\n\ndef calibrate() -> None:\n \"\"\"Inicia el proceso de calibraci\u00f3n. (calibrar)\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 \"\"\"Comprueba si la br\u00fajula est\u00e1 calibrada. (est\u00e1 calibrado)\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 \"\"\"Deshace la calibraci\u00f3n, haciendo que la br\u00fajula est\u00e9 otra vez sin calibrar. (eliminar calibraci\u00f3n)\n\nExample: ``compass.clear_calibration()``\"\"\"\n ...\n\ndef get_x() -> int:\n \"\"\"Obtiene la fuerza del campo magn\u00e9tico en el eje ``x``. (obtener 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 \"\"\"Obtiene la fuerza del campo magn\u00e9tico en el eje ``y``. (obtener 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 \"\"\"Obtiene la fuerza del campo magn\u00e9tico en el eje ``z``. (obtener 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 \"\"\"Obtiene el rumbo de la br\u00fajula. (rumbo)\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 \"\"\"Obtiene la magnitud del campo magn\u00e9tico alrededor del dispositivo. (obtener fuerza del campo)\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": "\"\"\"Mostrar texto, im\u00e1genes y animaciones en la pantalla LED de 5 \u00d7 5. (pantalla)\"\"\"\nfrom ..microbit import Image\nfrom typing import Union, overload, Iterable\n\ndef get_pixel(x: int, y: int) -> int:\n \"\"\"Obtiene el brillo del LED que hay en la columna ``x`` y fila ``y``. (obtener p\u00edxel)\n\nExample: ``display.get_pixel(0, 0)``\n\n:param x: La columna de la pantalla (0..4)\n:param y: La fila de la pantalla (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 \"\"\"Establece el brillo del LED que hay en la columna ``x`` y fila ``y``. (configurar p\u00edxel)\n\nExample: ``display.set_pixel(0, 0, 9)``\n\n:param x: La columna de la pantalla (0..4)\n:param y: La fila de la pantalla (0..4)\n:param value: (valor) El brillo entre 0 (apagado) y 9 (brillante)\"\"\"\n ...\n\ndef clear() -> None:\n \"\"\"Ajusta el brillo de todos los LED a 0 (apagado). (borrar)\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 \"\"\"Muestra im\u00e1genes, letras o d\u00edgitos en la pantalla LED. (mostrar)\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: (imagen) Una cadena, n\u00famero, imagen o lista de im\u00e1genes para mostrar.\n:param delay: (retardo) Cada letra, d\u00edgito o imagen se muestra con ``delay`` milisegundos de retardo entre ellos.\n:param wait: (esperar) Si ``wait`` es ``True`` (verdadero), la funci\u00f3n se bloquear\u00e1 hasta que finalice la animaci\u00f3n; de lo contrario, la animaci\u00f3n se ejecutar\u00e1 en segundo plano.\n:param loop: (bucle) Si ``loop`` es ``True`` (verdadero), la animaci\u00f3n se repetir\u00e1 para siempre.\n:param clear: (borrar) Si ``clear`` es ``True`` (verdadero), la pantalla se borrar\u00e1 una vez que la secuencia haya terminado.\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 \"\"\"Desplaza un n\u00famero o texto por la pantalla LED. (desplazar)\n\nExample: ``display.scroll('micro:bit')``\n\n:param text: (texto) La cadena a desplazar. Si ``text`` es un entero o de coma flotante, primero se convertir\u00e1 a cadena usando ``str()``.\n:param delay: (retardo) El par\u00e1metro ``delay`` controla la velocidad de desplazamiento del texto.\n:param wait: (esperar) Si ``wait`` es ``True`` (verdadero), la funci\u00f3n se bloquear\u00e1 hasta que finalice la animaci\u00f3n; de lo contrario, la animaci\u00f3n se ejecutar\u00e1 en segundo plano.\n:param loop: (bucle) Si ``loop`` es ``True`` (verdadero), la animaci\u00f3n se repetir\u00e1 para siempre.\n:param monospace: Si ``monospace`` es ``True`` (verdadero), todos los caracteres ocupar\u00e1n columnas de 5 p\u00edxeles de ancho; de lo contrario, habr\u00e1 exactamente 1 columna de p\u00edxeles vac\u00edos entre cada car\u00e1cter a medida que se desplazan.\n\nThe ``wait``, ``loop`` and ``monospace`` arguments must be specified\nusing their keyword.\"\"\"\n ...\n\ndef on() -> None:\n \"\"\"Enciende la pantalla LED. (encendido)\n\nExample: ``display.on()``\"\"\"\n ...\n\ndef off() -> None:\n \"\"\"Apaga la pantalla LED (desactivar la pantalla te permite reutilizar los pines GPIO para otros fines). (apagado)\n\nExample: ``display.off()``\"\"\"\n ...\n\ndef is_on() -> bool:\n \"\"\"Comprueba si la pantalla LED est\u00e1 activada. (est\u00e1 encendido)\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 \"\"\"Lee el nivel de luz. (leer nivel de luz)\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 ...", "/typeshed/stdlib/microbit/i2c.pyi": "\"\"\"Comunicarse con dispositivos que usan el protocolo de bus I\u00b2C.\"\"\"\nfrom _typeshed import ReadableBuffer\nfrom ..microbit import MicroBitDigitalPin, pin19, pin20\nfrom typing import List\n\ndef init(freq: int=100000, sda: MicroBitDigitalPin=pin20, scl: MicroBitDigitalPin=pin19) -> None:\n \"\"\"Reinicia un perif\u00e9rico. (inic)\n\nExample: ``i2c.init()``\n\n:param freq: (frec) frecuencia del reloj\n:param sda: pin ``sda`` (por defecto, 20)\n:param scl: pin ``scl`` (por defecto, 19)\n\nOn a micro:bit V1 board, changing the I\u00b2C pins from defaults will make\nthe accelerometer and compass stop working, as they are connected\ninternally to those pins. This warning does not apply to the **V2**\nrevision of the micro:bit as this has `separate I\u00b2C lines `_\nfor the motion sensors and the edge connector.\"\"\"\n ...\n\ndef scan() -> List[int]:\n \"\"\"Escanea el bus para buscar dispositivos. (escanear)\n\nExample: ``i2c.scan()``\n\n:return: A list of 7-bit addresses corresponding to those devices that responded to the scan.\"\"\"\n ...\n\ndef read(addr: int, n: int, repeat: bool=False) -> bytes:\n \"\"\"Lee bytes de un dispositivo. (leer)\n\nExample: ``i2c.read(0x50, 64)``\n\n:param addr: (dir) La direcci\u00f3n de 7 bits del dispositivo\n:param n: El n\u00famero de bytes a leer\n:param repeat: (repetir) Si es ``True`` (verdadero), no se enviar\u00e1 ning\u00fan bit de parada\n:return: The bytes read\"\"\"\n ...\n\ndef write(addr: int, buf: ReadableBuffer, repeat: bool=False) -> None:\n \"\"\"Escribe bytes en un dispositivo. (escribir)\n\nExample: ``i2c.write(0x50, bytes([1, 2, 3]))``\n\n:param addr: (dir) La direcci\u00f3n de 7 bits del dispositivo\n:param buf: (b\u00faf) Un b\u00fafer que contiene los bytes a escribir\n:param repeat: (repetir) Si es ``True`` (verdadero), no se enviar\u00e1 ning\u00fan bit de parada\"\"\"\n ...", "/typeshed/stdlib/microbit/microphone.pyi": "\"\"\"Responde al sonido usando el micr\u00f3fono integrado (solo V2). (micr\u00f3fono)\"\"\"\nfrom typing import Optional, Tuple\nfrom ..microbit import SoundEvent\n\ndef current_event() -> Optional[SoundEvent]:\n \"\"\"Obtiene el \u00faltimo evento de sonido grabado (evento actual)\n\nExample: ``microphone.current_event()``\n\n:return: The event, ``SoundEvent('loud')`` or ``SoundEvent('quiet')``.\"\"\"\n ...\n\ndef was_event(event: SoundEvent) -> bool:\n \"\"\"Comprueba si se ha escuchado un sonido al menos una vez desde la \u00faltima llamada. (evento anterior)\n\nExample: ``microphone.was_event(SoundEvent.LOUD)``\n\nThis call clears the sound history before returning.\n\n:param event: (evento) El evento a comprobar, como ``SoundEvent.LOUD`` o ``SoundEvent.QUIET``\n:return: ``True`` if sound was heard at least once since the last call, otherwise ``False``.\"\"\"\n ...\n\ndef is_event(event: SoundEvent) -> bool:\n \"\"\"Comprueba el evento de sonido m\u00e1s reciente detectado. (evento reciente)\n\nExample: ``microphone.is_event(SoundEvent.LOUD)``\n\nThis call does not clear the sound event history.\n\n:param event: (evento) El evento a comprobar, como ``SoundEvent.LOUD`` o ``SoundEvent.QUIET``\n:return: ``True`` if sound was the most recent heard, ``False`` otherwise.\"\"\"\n ...\n\ndef get_events() -> Tuple[SoundEvent, ...]:\n \"\"\"Obtiene el historial de eventos de sonido como una tupla. (obtener eventos)\n\nExample: ``microphone.get_events()``\n\nThis call clears the sound history before returning.\n\n:return: A tuple of the event history with the most recent event last.\"\"\"\n ...\n\ndef set_threshold(event: SoundEvent, value: int) -> None:\n \"\"\"Establece el umbral para un evento de sonido. (configurar l\u00edmite)\n\nExample: ``microphone.set_threshold(SoundEvent.LOUD, 250)``\n\nA high threshold means the event will only trigger if the sound is very loud (>= 250 in the example).\n\n:param event: (evento) Un evento de sonido, como ``SoundEvent.LOUD`` o ``SoundEvent.QUIET``.\n:param value: (valor) El nivel de umbral en el rango 0 - 255.\"\"\"\n ...\n\ndef sound_level() -> int:\n \"\"\"Obtiene el nivel de presi\u00f3n sonora. (nivel de sonido)\n\nExample: ``microphone.sound_level()``\n\n:return: A representation of the sound pressure level in the range 0 to 255.\"\"\"\n ...", "/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 datos en espera. (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", + "/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/_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", "/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 987c50779..158a8aa6e 100644 --- a/src/micropython/main/typeshed.fr.json +++ b/src/micropython/main/typeshed.fr.json @@ -34,7 +34,7 @@ "/typeshed/stdlib/ustruct.pyi": "from struct import *\n", "/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 \"\"\"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 l'intervalle donn\u00e9 vers son \u00e9quivalent dans un autre intervalle d'entiers.\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_: Un tuple qui d\u00e9finit l'intervalle de d\u00e9part.\n:param to: 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 l'intervalle donn\u00e9 vers son \u00e9quivalent dans un autre intervalle de nombres \u00e0 virgule flottante.\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_: Un tuple qui d\u00e9finit l'intervalle de d\u00e9part.\n:param to: 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 Celsius.\"\"\"\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.\"\"\"\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.\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 \"\"\"D\u00e9finir la plage de sensibilit\u00e9 de l'acc\u00e9l\u00e9rom\u00e8tre, en g (gravit\u00e9 standard), \u00e0 la valeur la plus proche support\u00e9e par le mat\u00e9riel, l'arrondi se fait soit \u00e0 ``2``, ``4``, ou ``8`` g.\n\nExample: ``accelerometer.set_range(8)``\n\n:param value: Nouvelle plage pour l'acc\u00e9l\u00e9rom\u00e8tre, un entier en ``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 \"\"\"Jouer un son int\u00e9gr\u00e9, un effet sonore ou des frames audio personnalis\u00e9es.\n\nExample: ``audio.play(Sound.GIGGLE)``\n\n:param source: Un ``Sound`` int\u00e9gr\u00e9 tel que ``Sound.GIGGLE``, un ``SoundEffect`` ou un \u00e9chantillon de donn\u00e9es sous la forme d'un it\u00e9rable d'objets ``AudioFrame``.\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 \"\"\"Un effet sonore, compos\u00e9 d'un ensemble de param\u00e8tres configur\u00e9s via le constructeur ou les attributs.\"\"\"\n WAVEFORM_SINE: ClassVar[int]\n \"\"\"Option d'onde sinuso\u00efdale utilis\u00e9e pour le param\u00e8tre ``waveform``.\"\"\"\n WAVEFORM_SAWTOOTH: ClassVar[int]\n \"\"\"Optionde forme d'onde en dent de scie utilis\u00e9e pour le param\u00e8tre ``waveform``.\"\"\"\n WAVEFORM_TRIANGLE: ClassVar[int]\n \"\"\"Option d'onde triangulaire utilis\u00e9e pour le param\u00e8tre ``waveform``.\"\"\"\n WAVEFORM_SQUARE: ClassVar[int]\n \"\"\"Option d'onde carr\u00e9e utilis\u00e9e pour le param\u00e8tre ``waveform``.\"\"\"\n WAVEFORM_NOISE: ClassVar[int]\n \"\"\"Option d'onde de bruit utilis\u00e9e pour le param\u00e8tre ``waveform``.\"\"\"\n SHAPE_LINEAR: ClassVar[int]\n \"\"\"Option d'interpolation lin\u00e9aire utilis\u00e9e pour le param\u00e8tre ``shape``.\"\"\"\n SHAPE_CURVE: ClassVar[int]\n \"\"\"Option d'interpolation courbe utilis\u00e9e pour le param\u00e8tre ``shape``.\"\"\"\n SHAPE_LOG: ClassVar[int]\n \"\"\"Option d'interpolation logarithmique utilis\u00e9e pour le param\u00e8tre ``shape``.\"\"\"\n FX_NONE: ClassVar[int]\n \"\"\"Option sans effet utilis\u00e9e pour le param\u00e8tre ``fx``.\"\"\"\n FX_TREMOLO: ClassVar[int]\n \"\"\"Option d'effet tremolo utilis\u00e9e pour le param\u00e8tre ``fx``.\"\"\"\n FX_VIBRATO: ClassVar[int]\n \"\"\"Option d'effet vibrato utilis\u00e9e pour le param\u00e8tre ``fx``.\"\"\"\n FX_WARBLE: ClassVar[int]\n \"\"\"Option d'effet de Warble utilis\u00e9e pour le param\u00e8tre ``fx``.\"\"\"\n freq_start: int\n \"\"\"Fr\u00e9quence de d\u00e9part en Hertz (Hz), un nombre compris entre ``0`` et ``9999``\"\"\"\n freq_end: int\n \"\"\"Fr\u00e9quence de fin en Hertz (Hz), un nombre compris entre ``0`` et ``9999``\"\"\"\n duration: int\n \"\"\"Dur\u00e9e du son en millisecondes, un nombre compris entre ``0`` et ``9999``\"\"\"\n vol_start: int\n \"\"\"Valeur du volume de d\u00e9part, un nombre compris entre ``0`` et ``255``\"\"\"\n vol_end: int\n \"\"\"Valeur du volume \u00e0 la fin, un nombre compris entre ``0`` et ``255``\"\"\"\n waveform: int\n \"\"\"Type de forme d'onde, une de ces valeurs : ``WAVEFORM_SINE``, ``WAVEFORM_SAWTOOTH``, ``WAVEFORM_TRIANGLE``, ``WAVEFORM_SQUARE``, ``WAVEFORM_NOISE`` (bruit g\u00e9n\u00e9r\u00e9 al\u00e9atoirement)\"\"\"\n fx: int\n \"\"\"Effet \u00e0 ajouter au son, l'une des valeurs suivantes : ``FX_TREMOLO``, ``FX_VIBRATO``, ``FX_WARBLE``, ou ``FX_NONE``\"\"\"\n shape: int\n \"\"\"Le type de la courbe d'interpolation entre les fr\u00e9quences de d\u00e9but et de fin, les diff\u00e9rentes formes d'onde ont des taux de variation de fr\u00e9quence diff\u00e9rents. L'une des valeurs suivantes : ``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 \"\"\"Cr\u00e9er un nouvel effet sonore.\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: Fr\u00e9quence de d\u00e9part en Hertz (Hz), un nombre compris entre ``0`` et ``9999``.\n:param freq_end: Fr\u00e9quence de fin en Hertz (Hz), un nombre compris entre ``0`` et ``9999``.\n:param duration: Dur\u00e9e du son en millisecondes, un nombre compris entre ``0`` et ``9999``.\n:param vol_start: Valeur du volume de d\u00e9part, un nombre compris entre ``0`` et ``255``.\n:param vol_end: Valeur du volume \u00e0 la fin, un nombre compris entre ``0`` et ``255``.\n:param waveform: Type de forme d'onde, une de ces valeurs : ``WAVEFORM_SINE``, ``WAVEFORM_SAWTOOTH``, ``WAVEFORM_TRIANGLE``, ``WAVEFORM_SQUARE``, ``WAVEFORM_NOISE`` (bruit g\u00e9n\u00e9r\u00e9 al\u00e9atoirement).\n:param fx: Effet \u00e0 ajouter au son, l'une des valeurs suivantes : ``FX_TREMOLO``, ``FX_VIBRATO``, ``FX_WARBLE``, ou ``FX_NONE``.\n:param shape: Le type de la courbe d'interpolation entre les fr\u00e9quences de d\u00e9but et de fin, les diff\u00e9rentes formes d'onde ont des taux de variation de fr\u00e9quence diff\u00e9rents. L'une des valeurs suivantes : ``SHAPE_LINEAR``, ``SHAPE_CURVE``, ``SHAPE_LOG``.\"\"\"\n\n def copy(self) -> SoundEffect:\n \"\"\"Cr\u00e9er une copie de ce ``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 \"\"\"\u00c9craser les donn\u00e9es de ce ``AudioFrame`` avec les donn\u00e9es d'une autre instance ``AudioFrame``.\n\nExample: ``my_frame.copyfrom(source_frame)``\n\n:param other: Instance ``AudioFrame`` \u00e0 partir de laquelle copier les donn\u00e9es.\"\"\"\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 ...", @@ -45,7 +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", + "/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", "/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 fdc6c86e3..25364f5b7 100644 --- a/src/micropython/main/typeshed.ja.json +++ b/src/micropython/main/typeshed.ja.json @@ -34,7 +34,7 @@ "/typeshed/stdlib/ustruct.pyi": "from struct import *\n", "/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\u79d2\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002\n:param ms: \u30b9\u30b1\u30b8\u30e5\u30fc\u30ea\u30f3\u30b0\u306e\u305f\u3081\u306e\u30df\u30ea\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\u6642\u8a08\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\u77e2\u5370\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\u77e9\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\u30ef\u30d6\u30eb\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 ...", @@ -45,7 +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", + "/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", "/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 bd06f1b73..5b9f142a3 100644 --- a/src/micropython/main/typeshed.ko.json +++ b/src/micropython/main/typeshed.ko.json @@ -34,7 +34,7 @@ "/typeshed/stdlib/ustruct.pyi": "from struct import *\n", "/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 \"\"\"Tremolo 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 ...", @@ -45,7 +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", + "/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", "/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.nl.json b/src/micropython/main/typeshed.nl.json index f75b43176..26ee1b2c4 100644 --- a/src/micropython/main/typeshed.nl.json +++ b/src/micropython/main/typeshed.nl.json @@ -34,7 +34,7 @@ "/typeshed/stdlib/ustruct.pyi": "from struct import *\n", "/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": "\"\"\"Pinnen, afbeeldingen, geluiden, temperatuur en 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 \"\"\"Plan om een functie uit te voeren volgens het interval dat gespecificeerd is door het time argument **V2 alleen**. (draai elke)\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: Functie om op te roepen bij de meegeleverde interval. Weglaten wanneer je als decorator gebruikt.\n:param days: (dagen) Stelt de dag markering in voor de planning.\n:param h: (uur) Stelt de urenmarkering in voor de planning.\n:param min: Stelt de minuut markering in voor de planning.\n:param s: Stelt de seconde markering in voor de planning.\n:param ms: Stelt de milliseconde markering in voor de planning.\"\"\"\n\ndef panic(n: int) -> None:\n \"\"\"Voer een paniekmodus in. (paniek)\n\nExample: ``panic(127)``\n\n:param n: Een willekeurig geheel getal <= 255 om een status aan te geven.\n\nRequires restart.\"\"\"\n\ndef reset() -> None:\n \"\"\"Herstart het bord.\"\"\"\n\n@overload\ndef scale(value: float, from_: Tuple[float, float], to: Tuple[int, int]) -> int:\n \"\"\"Zet een waarde om van een bereik naar een ander bereik van natuurlijke getallen. (schaal)\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: (waarde) Een getal om te converteren\n:param from_: (van) Een getallen paar wat het bereik aangeeft vanwaar je wilt converteren\n:param to: (naar) Een getallen paar om het bereik te defini\u00ebren waar je naar wilt converteren.\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 \"\"\"Zet een waarde om van een bereik naar een ander bereik van decimale getallen. (schaal)\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: (waarde) Een getal om te converteren\n:param from_: (van) Een getallen paar wat het bereik aangeeft vanwaar je wilt converteren\n:param to: (naar) Een getallen paar om het bereik te defini\u00ebren waar je naar wilt converteren.\n:return: The ``value`` converted to the ``to`` range.\"\"\"\n\ndef sleep(n: float) -> None:\n \"\"\"Wacht op ``n`` milliseconden. (slapen)\n\nExample: ``sleep(1000)``\n\n:param n: Het aantal milliseconden te wachten\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 \"\"\"Bekijk de looptijd van het bord. (looptijd)\n\n:return: The number of milliseconds since the board was switched on or restarted.\"\"\"\n\ndef temperature() -> int:\n \"\"\"Krijg de temperatuur van de micro:bit in graden Celsius. (temperatuur)\"\"\"\n\ndef set_volume(v: int) -> None:\n \"\"\"Stelt het volume in. (stel volume in)\n\nExample: ``set_volume(127)``\n\n:param v: een waarde tussen 0 (laag) en 255 (hoog).\n\nOut of range values will be clamped to 0 or 255.\n\n**V2** only.\"\"\"\n ...\n\nclass Button:\n \"\"\"De klasse voor de knoppen ``button_a`` en ``button_b``. (knop)\"\"\"\n\n def is_pressed(self) -> bool:\n \"\"\"Controleer of op de knop wordt gedrukt. (is ingedrukt)\n\n:return: ``True`` if the specified button ``button`` is pressed, and ``False`` otherwise.\"\"\"\n ...\n\n def was_pressed(self) -> bool:\n \"\"\"Controleer of de knop was ingedrukt sinds het apparaat is gestart of de laatste keer dat deze methode is gebruikt. (was ingedrukt)\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 \"\"\"Krijg het totale aantal ingedrukte knoppen en reset dit totaal\nnaar nul voordat u terugkeert. (zie knop acties)\n\n:return: The number of presses since the device started or the last time this method was called\"\"\"\n ...\nbutton_a: Button\n\"\"\"Het object van de linker knop ``Button``. (knop a)\"\"\"\nbutton_b: Button\n\"\"\"Het object van de rechter knop ``Button``. (knop b)\"\"\"\n\nclass MicroBitDigitalPin:\n \"\"\"Een digitale pin\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 \"\"\"Haal de digitale waarde van de pincode op. (digitaal lezen)\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 \"\"\"Stel de digitale waarde van de pin in. (digitaal schrijven)\n\nExample: ``pin0.write_digital(1)``\n\n:param value: (waarde) 1 om de pin hoog of 0 om de pin laag in te stellen\"\"\"\n ...\n\n def set_pull(self, value: int) -> None:\n \"\"\"Zet de pull-status op een van de drie mogelijke waarden: ``PULL_UP``, ``PULL_DOWN`` of ``NO_PULL``. (pull instellen)\n\nExample: ``pin0.set_pull(pin0.PULL_UP)``\n\n:param value: (waarde) De pull-status van de relevante pincode, bijvoorbeeld ``pin0.PULL_UP``.\"\"\"\n ...\n\n def get_pull(self) -> int:\n \"\"\"Bekijk de pull status van een pin. (pull instellen)\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 \"\"\"Geeft de pinmodus weer. (Bekijk modus)\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 \"\"\"Voer een PWM-signaal uit op de pin, waarbij de taakcyclus proportioneel is aan ``value``. (analoge schrijven)\n\nExample: ``pin0.write_analog(254)``\n\n:param value: (waarde) Een geheel getal of een zwevend punt getal tussen 0 (0% tariefcyclus) en 1023 (100% belasting).\"\"\"\n\n def set_analog_period(self, period: int) -> None:\n \"\"\"Stel de periode in van het PWM-signaal dat uitgevoerd wordt naar ``period`` in milliseconden. (gebruik analoge periode)\n\nExample: ``pin0.set_analog_period(10)``\n\n:param period: (periode) De periode in milliseconden met een minimale geldige waarde van 1 ms.\"\"\"\n\n def set_analog_period_microseconds(self, period: int) -> None:\n \"\"\"Stel de periode in van het PWM-signaal dat uitgevoerd wordt naar ``period`` in milliseconden. (microseconden analoge periode instellen)\n\nExample: ``pin0.set_analog_period_microseconds(512)``\n\n:param period: (periode) De periode in microseconden met een minimumwaarde van 256 mres.\"\"\"\n\nclass MicroBitAnalogDigitalPin(MicroBitDigitalPin):\n \"\"\"Een pin met analoge en digitale functies.\"\"\"\n\n def read_analog(self) -> int:\n \"\"\"Lees de spanning op de pin. (lees analoge)\n\nExample: ``pin0.read_analog()``\n\n:return: An integer between 0 (meaning 0V) and 1023 (meaning 3.3V).\"\"\"\n\nclass MicroBitTouchPin(MicroBitAnalogDigitalPin):\n \"\"\"Een pin met analoge, digitale en touch functies.\"\"\"\n CAPACITIVE: int\n RESISTIVE: int\n\n def is_touched(self) -> bool:\n \"\"\"Controleer of de pin aangeraakt wordt. (is aangeraakt)\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 \"\"\"Stel de aanraakmodus voor de pin in. (aanraakmodus instellen)\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: (waarde) ``CAPACITIVE`` of ``RESISTIVE`` van de relevante speler.\"\"\"\n ...\npin0: MicroBitTouchPin\n\"\"\"Pin met digitale, analoge en touch functies.\"\"\"\npin1: MicroBitTouchPin\n\"\"\"Pin met digitale, analoge en aanraak functies.\"\"\"\npin2: MicroBitTouchPin\n\"\"\"Pin met digitale, analoge en aanraak functies.\"\"\"\npin3: MicroBitAnalogDigitalPin\n\"\"\"Pin met digitale, analoge en aanraak functies.\"\"\"\npin4: MicroBitAnalogDigitalPin\n\"\"\"Pin met digitale, analoge en aanraak functies.\"\"\"\npin5: MicroBitDigitalPin\n\"\"\"Pin met digitale, analoge en aanraak functies.\"\"\"\npin6: MicroBitDigitalPin\n\"\"\"Pin met digitale functies.\"\"\"\npin7: MicroBitDigitalPin\n\"\"\"Pin met digitale functies.\"\"\"\npin8: MicroBitDigitalPin\n\"\"\"Pin met digitale functies.\"\"\"\npin9: MicroBitDigitalPin\n\"\"\"Pin met digitale functies.\"\"\"\npin10: MicroBitAnalogDigitalPin\n\"\"\"Pin met digitale, analoge en aanraak functies.\"\"\"\npin11: MicroBitDigitalPin\n\"\"\"Pin met digitale, analoge en aanraak functies.\"\"\"\npin12: MicroBitDigitalPin\n\"\"\"Pin met digitale, analoge en aanraak functies.\"\"\"\npin13: MicroBitDigitalPin\n\"\"\"Pin met digitale, analoge en aanraak functies.\"\"\"\npin14: MicroBitDigitalPin\n\"\"\"Pin met digitale, analoge en aanraak functies.\"\"\"\npin15: MicroBitDigitalPin\n\"\"\"Pin met digitale, analoge en aanraak functies.\"\"\"\npin16: MicroBitDigitalPin\n\"\"\"Pin met digitale, analoge en aanraak functies.\"\"\"\npin19: MicroBitDigitalPin\n\"\"\"Pin met digitale, analoge en aanraak functies.\"\"\"\npin20: MicroBitDigitalPin\n\"\"\"Pin met digitale, analoge en aanraak functies.\"\"\"\npin_logo: MicroBitTouchPin\n\"\"\"Een aanraak gevoelige logo pin op de voorkant van de micro:bit, die standaard is ingesteld op capacitieve aanraking modus.\"\"\"\npin_speaker: MicroBitAnalogDigitalPin\n\"\"\"Een pin om de micro:bit luidspreker aan te spreken. (pin luidspreker)\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 \"\"\"Een afbeelding om te laten zien op het micro:bit LED display. (afbeelding)\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 \"\"\"Hart afbeelding (hart)\"\"\"\n HEART_SMALL: Image\n \"\"\"Klein hart afbeelding. (hart klein)\"\"\"\n HAPPY: Image\n \"\"\"Blije gezichtsafbeelding. (blij)\"\"\"\n SMILE: Image\n \"\"\"Glimlach gezicht afbeelding. (glimlach)\"\"\"\n SAD: Image\n \"\"\"Droevige gezichtsafbeelding. (verdrietig)\"\"\"\n CONFUSED: Image\n \"\"\"Verward gezichtsafbeelding. (verward)\"\"\"\n ANGRY: Image\n \"\"\"Boos gezichtsafbeelding. (kwaad)\"\"\"\n ASLEEP: Image\n \"\"\"Slapend gezicht afbeelding. (in slaap)\"\"\"\n SURPRISED: Image\n \"\"\"Verraste gezichtsafbeelding. (verrast)\"\"\"\n SILLY: Image\n \"\"\"Gek gezichtsafbeelding. (gek)\"\"\"\n FABULOUS: Image\n \"\"\"Zonnebril gezichtsafbeelding. (fantastisch)\"\"\"\n MEH: Image\n \"\"\"Niet onder de indruk gezichtsafbeelding.\"\"\"\n YES: Image\n \"\"\"Aanvinken afbeelding. (ja)\"\"\"\n NO: Image\n \"\"\"Kruis afbeelding. (nee)\"\"\"\n CLOCK12: Image\n \"\"\"Afbeelding met lijn die naar 12.00 uur wijst. (klok 12)\"\"\"\n CLOCK11: Image\n \"\"\"Afbeelding met lijn die naar 11.00 uur wijst. (klok 11)\"\"\"\n CLOCK10: Image\n \"\"\"Afbeelding met lijn die naar 10.00 uur wijst. (klok 10)\"\"\"\n CLOCK9: Image\n \"\"\"Afbeelding met lijn die naar 9.00 uur wijst. (klok 9)\"\"\"\n CLOCK8: Image\n \"\"\"Afbeelding met lijn die naar 8.00 uur wijst. (klok 8)\"\"\"\n CLOCK7: Image\n \"\"\"Afbeelding met lijn die naar 7.00 uur wijst. (klok 7)\"\"\"\n CLOCK6: Image\n \"\"\"Afbeelding met lijn die naar 6.00 uur wijst. (klok 6)\"\"\"\n CLOCK5: Image\n \"\"\"Afbeelding met lijn die naar 5.00 uur wijst. (klok 5)\"\"\"\n CLOCK4: Image\n \"\"\"Afbeelding met lijn die naar 4.00 uur wijst. (klok 4)\"\"\"\n CLOCK3: Image\n \"\"\"Afbeelding met lijn die naar 3.00 uur wijst. (klok 3)\"\"\"\n CLOCK2: Image\n \"\"\"Afbeelding met lijn die naar 2 uur wijst. (klok2)\"\"\"\n CLOCK1: Image\n \"\"\"Afbeelding met lijn die naar 1 uur wijst. (klok1)\"\"\"\n ARROW_N: Image\n \"\"\"Afbeelding van pijl richting het noorden. (pijl n)\"\"\"\n ARROW_NE: Image\n \"\"\"Afbeelding van pijl richting het noord oosten. (pijl NO)\"\"\"\n ARROW_E: Image\n \"\"\"Afbeelding van pijl richting het oosten. (pijl e)\"\"\"\n ARROW_SE: Image\n \"\"\"Afbeelding van pijl richting het zuid-oosten. (pijl ZO)\"\"\"\n ARROW_S: Image\n \"\"\"Afbeelding van pijltje richting het zuiden. (pijl z)\"\"\"\n ARROW_SW: Image\n \"\"\"Afbeelding van pijl richting het zuid-westen. (pijl ZW)\"\"\"\n ARROW_W: Image\n \"\"\"Afbeelding van pijl richting het westen. (pijl w)\"\"\"\n ARROW_NW: Image\n \"\"\"Afbeelding van pijl richting het noord-westen. (pijl NW)\"\"\"\n TRIANGLE: Image\n \"\"\"Afbeelding van een driehoek die naar boven wijst. (driehoek)\"\"\"\n TRIANGLE_LEFT: Image\n \"\"\"Afbeelding van een driehoek in de linker hoek. (Driehoek links)\"\"\"\n CHESSBOARD: Image\n \"\"\"Alternatieve LED's verlichten in een schaakbord patroon. (schaakbord)\"\"\"\n DIAMOND: Image\n \"\"\"Diamanten afbeelding. (diamant)\"\"\"\n DIAMOND_SMALL: Image\n \"\"\"Kleine diamanten afbeelding. (diamant klein)\"\"\"\n SQUARE: Image\n \"\"\"Vierkante afbeelding (vierkant)\"\"\"\n SQUARE_SMALL: Image\n \"\"\"Kleine vierkante afbeelding. (vierkant klein)\"\"\"\n RABBIT: Image\n \"\"\"Konijn afbeelding. (konijn)\"\"\"\n COW: Image\n \"\"\"Koe afbeelding. (koe)\"\"\"\n MUSIC_CROTCHET: Image\n \"\"\"Kwartnoot afbeelding. (muziek kwartnoot)\"\"\"\n MUSIC_QUAVER: Image\n \"\"\"Kwartnoot afbeelding. (muziek kwartnoot)\"\"\"\n MUSIC_QUAVERS: Image\n \"\"\"Koppel van kwartnoten afbeelding. (muziek kwartnoten)\"\"\"\n PITCHFORK: Image\n \"\"\"Stemvork afbeelding. (stemvork)\"\"\"\n XMAS: Image\n \"\"\"Kerstboom afbeelding. (kerstmis)\"\"\"\n PACMAN: Image\n \"\"\"Pac-Man arcade karakterafbeelding. (Pacman)\"\"\"\n TARGET: Image\n \"\"\"Doel afbeelding. (doel)\"\"\"\n TSHIRT: Image\n \"\"\"T-shirt afbeelding.\"\"\"\n ROLLERSKATE: Image\n \"\"\"Rolschaats afbeelding. (rolschaatsen)\"\"\"\n DUCK: Image\n \"\"\"Eend afbeelding. (eend)\"\"\"\n HOUSE: Image\n \"\"\"Huis afbeelding. (huis)\"\"\"\n TORTOISE: Image\n \"\"\"Schildpad afbeelding. (schildpad)\"\"\"\n BUTTERFLY: Image\n \"\"\"Vlinder afbeelding. (vlinder)\"\"\"\n STICKFIGURE: Image\n \"\"\"Stok figuur afbeelding. (stok figuur)\"\"\"\n GHOST: Image\n \"\"\"Spook afbeelding. (spook)\"\"\"\n SWORD: Image\n \"\"\"Zwaard afbeelding. (zwaard)\"\"\"\n GIRAFFE: Image\n \"\"\"Giraffe afbeelding.\"\"\"\n SKULL: Image\n \"\"\"Schedel afbeelding. (doodshoofd)\"\"\"\n UMBRELLA: Image\n \"\"\"Paraplu afbeelding. (paraplu)\"\"\"\n SNAKE: Image\n \"\"\"Slang afbeelding. (slang)\"\"\"\n SCISSORS: Image\n \"\"\"Schaar afbeelding. (schaar)\"\"\"\n ALL_CLOCKS: List[Image]\n \"\"\"Een lijst met alle CLOCK_ afbeeldingen achter elkaar. (alle klokken)\"\"\"\n ALL_ARROWS: List[Image]\n \"\"\"Een lijst met alle ARROW_ afbeeldingen in reeks. (alle pijlen)\"\"\"\n\n @overload\n def __init__(self, string: str) -> None:\n \"\"\"Maak een afbeelding van een tekenreeks die beschrijft welke LED's zijn. (initialiseren)\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: (tekenreeks) De tekenreeks die de afbeelding beschrijft.\"\"\"\n ...\n\n @overload\n def __init__(self, width: int=5, height: int=5, buffer: ReadableBuffer=None) -> None:\n \"\"\"Maak een lege afbeelding met ``width`` kolommen en ``height`` rijen. (initialiseren)\n\n:param width: (breedte) Optionele breedte van de afbeelding\n:param height: (hoogte) Optionele hoogte van de afbeelding\n:param buffer: Optionele array of bytes van ``width``\u00d7``height`` integers in bereik 0-9 om de afbeelding te initialiseren\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 \"\"\"Haal het aantal kolommen op. (breedte)\n\n:return: The number of columns in the image\"\"\"\n ...\n\n def height(self) -> int:\n \"\"\"Krijg het aantal rijen. (hoogte)\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 \"\"\"Stel de helderheid van een pixel in. (pixel instellen)\n\nExample: ``my_image.set_pixel(0, 0, 9)``\n\n:param x: (\u0445) Het kolom nummer\n:param y: Het rij nummer\n:param value: (waarde) De helderheid als een geheel getal tussen 0 (donker) en 9 (helder)\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 \"\"\"Krijg de helderheid van een pixel. (verkrijg pixel)\n\nExample: ``my_image.get_pixel(0, 0)``\n\n:param x: (\u0445) Het kolom nummer\n:param y: Het rij nummer\n:return: The brightness as an integer between 0 and 9.\"\"\"\n ...\n\n def shift_left(self, n: int) -> Image:\n \"\"\"Maak een nieuwe afbeelding door de afbeelding naar links te verschuiven. (verschuiving naar links)\n\nExample: ``Image.HEART_SMALL.shift_left(1)``\n\n:param n: Het aantal te verschuiven kolommen\n:return: The shifted image\"\"\"\n ...\n\n def shift_right(self, n: int) -> Image:\n \"\"\"Maak een nieuwe afbeelding door de afbeelding rechts te verschuiven. (verschuif Rechts)\n\nExample: ``Image.HEART_SMALL.shift_right(1)``\n\n:param n: Het aantal te verschuiven kolommen\n:return: The shifted image\"\"\"\n ...\n\n def shift_up(self, n: int) -> Image:\n \"\"\"Maak een nieuwe afbeelding door de afbeelding omhoog te schuiven. (verschuiving omhoog)\n\nExample: ``Image.HEART_SMALL.shift_up(1)``\n\n:param n: Het aantal rijen om te verschuiven met\n:return: The shifted image\"\"\"\n ...\n\n def shift_down(self, n: int) -> Image:\n \"\"\"Maak een nieuwe afbeelding door de afbeelding omlaag te verschuiven. (verschuif omlaag)\n\nExample: ``Image.HEART_SMALL.shift_down(1)``\n\n:param n: Het aantal rijen om te verschuiven met\n:return: The shifted image\"\"\"\n ...\n\n def crop(self, x: int, y: int, w: int, h: int) -> Image:\n \"\"\"Maak een nieuwe afbeelding door de afbeelding bij te snijden. (bij snijden)\n\nExample: ``Image.HEART.crop(1, 1, 3, 3)``\n\n:param x: (\u0445) De kolom verschuiving\n:param y: De rij verschuiving\n:param w: De bij snij breedte\n:param h: (uur) Hoogte bijsnijden\n:return: The new image\"\"\"\n ...\n\n def copy(self) -> Image:\n \"\"\"Maak een exacte kopie van de afbeelding. (kopi\u00eber)\n\nExample: ``Image.HEART.copy()``\n\n:return: The new image\"\"\"\n ...\n\n def invert(self) -> Image:\n \"\"\"Maak een nieuwe afbeelding door de helderheid van de pixels in de\nbronafbeelding om te draaien. (omkeren)\n\nExample: ``Image.SMALL_HEART.invert()``\n\n:return: The new image.\"\"\"\n ...\n\n def fill(self, value: int) -> None:\n \"\"\"Stel de helderheid van alle pixels in de afbeelding in. (opvullen)\n\nExample: ``my_image.fill(5)``\n\n:param value: (waarde) De nieuwe helderheid als een getal tussen 0 (donker) en 9 (helder).\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 \"\"\"Kopieer een gebied van een andere afbeelding naar deze afbeelding.\n\nExample: ``my_image.blit(Image.HEART, 1, 1, 3, 3, 1, 1)``\n\n:param src: De bron afbeelding\n:param x: (\u0445) De begin kolom offset in de bron afbeelding\n:param y: De beginkolom offset in de bronafbeelding\n:param w: Het aantal te kopi\u00ebren kolommen\n:param h: (uur) Het aantal te kopi\u00ebren rijen\n:param xdest: De kolomverschuiving om aan te passen in deze afbeelding\n:param ydest: De kolomverschuiving om aan te passen in deze afbeelding\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 \"\"\"Krijg een compacte tekenreeks die de afbeelding vertegenwoordigt.\"\"\"\n ...\n\n def __str__(self) -> str:\n \"\"\"Krijg een leesbare tekenreeks die de afbeelding vertegenwoordigt.\"\"\"\n ...\n\n def __add__(self, other: Image) -> Image:\n \"\"\"Maak een nieuwe afbeelding door de helderheidswaarden van de twee\nafbeeldingen voor elke pixel toe te voegen. (toevoegen)\n\nExample: ``Image.HEART + Image.HAPPY``\n\n:param other: (overige) De afbeelding om toe te voegen.\"\"\"\n ...\n\n def __sub__(self, other: Image) -> Image:\n \"\"\"Maak een nieuw beeld door de helderheidswaarden van de andere afbeelding van deze afbeelding af te trekken.\n\nExample: ``Image.HEART - Image.HEART_SMALL``\n\n:param other: (overige) De afbeelding om af te trekken.\"\"\"\n ...\n\n def __mul__(self, n: float) -> Image:\n \"\"\"Maak een nieuwe afbeelding door de helderheid van elke pixel te vermenigvuldigen met\n``n``.\n\nExample: ``Image.HEART * 0.5``\n\n:param n: De waarde om te vermenigvuldigen.\"\"\"\n ...\n\n def __truediv__(self, n: float) -> Image:\n \"\"\"Maak een nieuwe afbeelding door de helderheid van elke pixel te delen door\n``n``.\n\nExample: ``Image.HEART / 2``\n\n:param n: De waarde om mee te delen.\"\"\"\n ...\n\nclass SoundEvent:\n LOUD: SoundEvent\n \"\"\"Vertegenwoordigt de transitie van geluidsgebeurtenissen, van ``quiet`` tot ``loud`` zoals klappen of roepen. (luid)\"\"\"\n QUIET: SoundEvent\n \"\"\"Vertegenwoordigt de transitie van geluidsgebeurtenissen, van ``loud`` tot ``quiet`` zoals spreken of achtergrondmuziek. (stil)\"\"\"\n\nclass Sound:\n \"\"\"De ingebouwde geluiden kunnen worden aangeroepen met ``audio.play(Sound.NAME)``. (geluid)\"\"\"\n GIGGLE: Sound\n \"\"\"Giechelgeluidjes (giechelen)\"\"\"\n HAPPY: Sound\n \"\"\"Blij geluid. (blij)\"\"\"\n HELLO: Sound\n \"\"\"Groet geluid. (hallo)\"\"\"\n MYSTERIOUS: Sound\n \"\"\"Mysterieus geluid. (mysterieus)\"\"\"\n SAD: Sound\n \"\"\"Droevig geluid. (verdrietig)\"\"\"\n SLIDE: Sound\n \"\"\"Glij geluid. (Veeg)\"\"\"\n SOARING: Sound\n \"\"\"Zweef geluid. (stijgend)\"\"\"\n SPRING: Sound\n \"\"\"Spring geluid. (veer)\"\"\"\n TWINKLE: Sound\n \"\"\"Twinkel geluid. (twinkeling)\"\"\"\n YAWN: Sound\n \"\"\"Geeuwgeluiden (geeuw)\"\"\"", "/typeshed/stdlib/microbit/accelerometer.pyi": "\"\"\"Meet de versnelling van de micro:bit en herken gebaren. (acceleratiemeter)\"\"\"\nfrom typing import Tuple\n\ndef get_x() -> int:\n \"\"\"Krijg de acceleratiemeting in de ``x`` as in milli-g. (krijg 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 \"\"\"Krijg de acceleratiemeting in de ``y`` as in milli-g. (krijg 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 \"\"\"Krijg de acceleratiemeter meting in de ``z`` as in milli-g. (krijg 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 \"\"\"Verkrijg de acceleratiemeter metingen in alle assen tegelijk als een tupel. (krijg waarden)\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 \"\"\"Krijg de versnelling meting van alle assen gecombineerd, als een positief getal. Dit is de Pythagorische som van de X, Y en Z assen. (krijg sterkte)\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 \"\"\"Verkrijg de naam van het huidige gebaar. (huidig gebaar)\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 \"\"\"Controleer of het benoemde gebaar momenteel actief is. (is gebaren)\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: (naam) De naam van het gebaar.\n:return: ``True`` if the gesture is active, ``False`` otherwise.\"\"\"\n ...\n\ndef was_gesture(name: str) -> bool:\n \"\"\"Controleer of het benoemde gebaar actief was sinds het laatste gesprek. (was gebaren)\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: (naam) De naam van het gebaar.\n:return: ``True`` if the gesture was active since the last call, ``False`` otherwise.\"\"\"\n\ndef get_gestures() -> Tuple[str, ...]:\n \"\"\"Geeft als resultaat een reeks van de gebaren geschiedenis. (verkrijg gebaren)\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 \"\"\"Stel het gevoeligheidsbereik van de acceleratiemeter, in g (standaard zwaartekracht), in op de dichtstbijzijnde waarden die door de hardware worden ondersteund, zodat het wordt afgerond op ``2``, ``4`` of ``8`` g. (kies bereik)\n\nExample: ``accelerometer.set_range(8)``\n\n:param value: (waarde) Nieuwe bereik voor de acceleratiemeter, een geheel getal in ``g``.\"\"\"", "/typeshed/stdlib/microbit/audio.pyi": "\"\"\"Geluid afspelen met behulp van de micro:bit (importeer ``audio`` voor V1 compatibiliteit).\"\"\"\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 \"\"\"Een ingebouwde geluid, geluids effect of aangepaste audio frames afspelen. (afspelen)\n\nExample: ``audio.play(Sound.GIGGLE)``\n\n:param source: (bron) Een ingebouwde ``Sound`` zoals ``Sound.GIGGLE``, een ``SoundEffect`` of voorbeeldgegevens als een iteratie van ``AudioFrame`` objecten.\n:param wait: (wacht) Als ``wait`` ``True``is, wordt deze functie geblokkeerd totdat het geluid is voltooid.\n:param pin: Een optioneel argument om de uitvoerpin op te geven kan worden gebruikt om de standaard van ``pin0``te overschrijven. Als we geen geluid willen afspelen, kunnen we ``pin=None`` gebruiken.\n:param return_pin: (retourneer pin) Specificeert een differenti\u00eble rand connector pin om verbinding te maken met een externe luidspreker in plaats van de grond. Dit wordt genegeerd voor de **V2** herziening.\"\"\"\n\ndef is_playing() -> bool:\n \"\"\"Controleer of een geluid wordt gespeeld. (speelt af)\n\nExample: ``audio.is_playing()``\n\n:return: ``True`` if audio is playing, otherwise ``False``.\"\"\"\n ...\n\ndef stop() -> None:\n \"\"\"Stop het afspelen van de audio.\n\nExample: ``audio.stop()``\"\"\"\n ...\n\nclass SoundEffect:\n \"\"\"Een geluidseffect, bestaande uit een set parameters geconfigureerd via de constructor of attributen.\"\"\"\n WAVEFORM_SINE: ClassVar[int]\n \"\"\"De sinusgolf optie gebruikt voor de ``waveform`` parameter. (golfvorm sinus)\"\"\"\n WAVEFORM_SAWTOOTH: ClassVar[int]\n \"\"\"Zaag golf optie gebruikt voor de ``waveform`` parameter. (golfvorm zaagtand)\"\"\"\n WAVEFORM_TRIANGLE: ClassVar[int]\n \"\"\"De drie hoeks golf optie gebruikt voor de ``waveform`` parameter. (golfvorm driehoek)\"\"\"\n WAVEFORM_SQUARE: ClassVar[int]\n \"\"\"Blok golf optie die wordt gebruikt voor de parameter ``waveform``. (golfvorm vierkant)\"\"\"\n WAVEFORM_NOISE: ClassVar[int]\n \"\"\"Noise optie gebruikt voor de ``waveform`` parameter. (golfvormig geluid)\"\"\"\n SHAPE_LINEAR: ClassVar[int]\n \"\"\"Lineaire interpolatie optie die wordt gebruikt voor de ``shape`` parameter. (vorm lineair)\"\"\"\n SHAPE_CURVE: ClassVar[int]\n \"\"\"Curve interpolatie optie gebruikt voor de ``shape`` parameter. (vorm curve)\"\"\"\n SHAPE_LOG: ClassVar[int]\n \"\"\"Logaritmische interpolatie optie gebruikt voor de ``shape`` parameter. (vorm log)\"\"\"\n FX_NONE: ClassVar[int]\n \"\"\"Geen effectoptie gebruikt voor de ``fx`` parameter. (geen fx)\"\"\"\n FX_TREMOLO: ClassVar[int]\n \"\"\"Tremolo effect optie die wordt gebruikt voor de ``fx`` parameter.\"\"\"\n FX_VIBRATO: ClassVar[int]\n \"\"\"Vibrato effect optie die wordt gebruikt voor de ``fx`` parameter.\"\"\"\n FX_WARBLE: ClassVar[int]\n \"\"\"Warble effect optie die wordt gebruikt voor de ``fx`` parameter .\"\"\"\n freq_start: int\n \"\"\"Start frequentie in Hertz (Hz), een getal tussen ``0`` en ``9999`` (frequentie start)\"\"\"\n freq_end: int\n \"\"\"Eind frequentie in Hertz (Hz), een getal tussen ``0`` en ``9999`` (frequentie einde)\"\"\"\n duration: int\n \"\"\"Duur van het geluid in milliseconden, een getal tussen ``0`` en ``9999`` (Duur)\"\"\"\n vol_start: int\n \"\"\"Start volume waarde, een getal tussen ``0`` en ``255``\"\"\"\n vol_end: int\n \"\"\"Eind volume waarde, een getal tussen ``0`` en ``255`` (vol einde)\"\"\"\n waveform: int\n \"\"\"Type van golfvorm, \u00e9\u00e9n van deze waarden: ``WAVEFORM_SINE``, ``WAVEFORM_SAWTOOTH``, ``WAVEFORM_TRIANGLE``, ``WAVEFORM_SQUARE``, ``WAVEFORM_NOISE`` (willekeurig gegenereerde lawaai) (golfvorm)\"\"\"\n fx: int\n \"\"\"Effect om aan het geluid toe te voegen, een van de volgende waarden: ``FX_TREMOLO``, ``FX_VIBRATO``, ``FX_WARBLE``of ``FX_NONE``\"\"\"\n shape: int\n \"\"\"Het type van de interpolatie curve tussen de begin- en eind frequenties, verschillende golfvormen hebben verschillende snelheid bij het wijzigen van de frequentie. Een van de volgende waarden: ``SHAPE_LINEAR``, ``SHAPE_CURVE``, ``SHAPE_LOG`` (vorm)\"\"\"\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 \"\"\"Maak een nieuw geluidseffect. (initialiseren)\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: (frequentie start) Start frequentie in Hertz (Hz), een getal tussen ``0`` en ``9999``.\n:param freq_end: (frequentie einde) Eind frequentie in Hertz (Hz), een getal tussen ``0`` en ``9999``.\n:param duration: (duur) Duur van het geluid in milliseconden, een getal tussen ``0`` en ``9999``.\n:param vol_start: Startvolumewaarde, een getal tussen ``0`` en ``255``.\n:param vol_end: (vol einde) Eindvolumewaarde, een getal tussen ``0`` en ``255``.\n:param waveform: (golfvorm) Type golfvorm, \u00e9\u00e9n van deze waarden: ``WAVEFORM_SINE``, ``WAVEFORM_SAWTOOTH``, ``WAVEFORM_TRIANGLE``, ``WAVEFORM_SQUARE``, ``WAVEFORM_NOISE`` (willekeurig gegenereerde geluid).\n:param fx: Effect om het geluid toe te voegen, een van de volgende waarden: ``FX_TREMOLO``, ``FX_VIBRATO``, ``FX_WARBLE``of ``FX_NONE``.\n:param shape: (vorm) Het type van de interpolatie curve tussen de begin- en eind frequenties, verschillende golfvormen hebben verschillende snelheid bij het wijzigen van de frequentie. Een van de volgende waarden: ``SHAPE_LINEAR``, ``SHAPE_CURVE``, ``SHAPE_LOG``.\"\"\"\n\n def copy(self) -> SoundEffect:\n \"\"\"Maak een kopie van dit ``SoundEffect``. (kopi\u00eber)\n\nExample: ``sound_2 = sound_1.copy()``\n\n:return: A copy of the SoundEffect.\"\"\"\n\nclass AudioFrame:\n \"\"\"Een ``AudioFrame`` object is een lijst van 32 samples elk een niet-ondertekende byte\n(geheel getal tussen 0 en 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 \"\"\"Overschrijf de gegevens in deze ``AudioFrame`` met de gegevens van een andere ``AudioFrame`` instantie. (kopieer van)\n\nExample: ``my_frame.copyfrom(source_frame)``\n\n:param other: (overige) ``AudioFrame`` exemplaar van waar de gegevens worden gekopieerd.\"\"\"\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 ...", @@ -45,7 +45,7 @@ "/typeshed/stdlib/microbit/speaker.pyi": "\"\"\"Beheer de ingebouwde luidspreker (alleen V2). (luidspreker)\"\"\"\n\ndef off() -> None:\n \"\"\"Luidspreker uitschakelen. (uit)\n\nExample: ``speaker.off()``\n\nThis does not disable sound output to an edge connector pin.\"\"\"\n ...\n\ndef on() -> None:\n \"\"\"Luidspreker inschakelen (aan)\n\nExample: ``speaker.on()``\"\"\"\n ...", "/typeshed/stdlib/microbit/spi.pyi": "\"\"\"Communiceer met apparaten met behulp van de seri\u00eble perifere interface (SPI) bus.\"\"\"\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 \"\"\"Initialiseer SPI communicatie. (initialiseren)\n\nExample: ``spi.init()``\n\nFor correct communication, the parameters have to be the same on both communicating devices.\n\n:param baudrate: De snelheid van de communicatie.\n:param bits: De breedte in bits van elke overdracht. Momenteel wordt alleen ``bits=8`` ondersteund. Dit kan echter veranderen in de toekomst.\n:param mode: (modus) Bepaalt de combinatie van klokpolariteit en fase - `zie online tabel `_.\n:param sclk: sclk pin (standaard 13)\n:param mosi: mosi pin (standaard 15)\n:param miso: miso pin (standaard 14)\"\"\"\n ...\n\ndef read(nbytes: int) -> bytes:\n \"\"\"Lees bytes. (lezen)\n\nExample: ``spi.read(64)``\n\n:param nbytes: Maximum aantal te lezen bytes.\n:return: The bytes read.\"\"\"\n ...\n\ndef write(buffer: ReadableBuffer) -> None:\n \"\"\"Schrijf bytes naar de bus. (schrijven)\n\nExample: ``spi.write(bytes([1, 2, 3]))``\n\n:param buffer: Een buffer om gegevens van te lezen.\"\"\"\n ...\n\ndef write_readinto(out: WriteableBuffer, in_: ReadableBuffer) -> None:\n \"\"\"Schrijf de ``out`` buffer naar de bus en lees elke reactie in de ``in_`` buffer. (schrijf readinto)\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: (uit) De buffer om een reactie naar te schrijven.\n:param in_: De buffer om gegevens van te lezen.\"\"\"\n ...", "/typeshed/stdlib/microbit/uart.pyi": "\"\"\"Communiceer met een apparaat via een seri\u00eble interface.\"\"\"\nfrom _typeshed import WriteableBuffer\nfrom ..microbit import MicroBitDigitalPin\nfrom typing import Optional, Union\nODD: int\n\"\"\"Oneven pariteit (oneven)\"\"\"\nEVEN: int\n\"\"\"Even pariteit\"\"\"\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 \"\"\"Initialiseer seri\u00eble communicatie. (initialiseren)\n\nExample: ``uart.init(115200, tx=pin0, rx=pin1)``\n\n:param baudrate: De snelheid van de communicatie.\n:param bits: De grootte van de bytes die worden verzonden. micro:bit ondersteunt slechts 8.\n:param parity: (pariteit) Hoe de pariteit is aangevinkt, ``None``, ``uart.ODD`` of ``uart.EVEN``.\n:param stop: Het aantal stop bits, moet 1 zijn voor micro:bit.\n:param tx: Verzend pin.\n:param rx: Ontvangende pin.\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 \"\"\"Controleer of er nog gegevens staan te wachten. (elke)\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 \"\"\"Lees bytes. (lezen)\n\nExample: ``uart.read()``\n\n:param nbytes: Als ``nbytes`` is gespecificeerd, lees dan maximaal zoveel bytes, anders lees zo veel mogelijk bytes\n:return: A bytes object or ``None`` on timeout\"\"\"\n ...\n\ndef readinto(buf: WriteableBuffer, nbytes: Optional[int]=None) -> Optional[int]:\n \"\"\"Lees bytes in de ``buf``. (inlezen)\n\nExample: ``uart.readinto(input_buffer)``\n\n:param buf: De buffer om naar te schrijven.\n:param nbytes: Als ``nbytes`` is gespecificeerd, lees dan hooguit zoveel bytes, anders lees ``len(buf)`` bytes.\n:return: number of bytes read and stored into ``buf`` or ``None`` on timeout.\"\"\"\n ...\n\ndef readline() -> Optional[bytes]:\n \"\"\"Lees een regel, eindigend in een nieuw karakter regel. (leesregel)\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 \"\"\"Schrijf bytes naar de bus. (schrijven)\n\nExample: ``uart.write('hello world')``\n\n:param buf: Een bytes object of een tekenreeks.\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", + "/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", "/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 622feab42..7a977a5b1 100644 --- a/src/micropython/main/typeshed.zh-cn.json +++ b/src/micropython/main/typeshed.zh-cn.json @@ -34,7 +34,7 @@ "/typeshed/stdlib/ustruct.pyi": "from struct import *\n", "/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 ...", @@ -45,7 +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", + "/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", "/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 c348326fa..394ed24c4 100644 --- a/src/micropython/main/typeshed.zh-tw.json +++ b/src/micropython/main/typeshed.zh-tw.json @@ -34,7 +34,7 @@ "/typeshed/stdlib/ustruct.pyi": "from struct import *\n", "/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 \"\"\"Tremolo 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 ...", @@ -45,7 +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", + "/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", "/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 From ee271184aec67e30825b6377b19b7c002919dcd7 Mon Sep 17 00:00:00 2001 From: Robert Knight Date: Fri, 26 Apr 2024 16:23:50 +0100 Subject: [PATCH 2/4] Update typeshed --- src/micropython/main/typeshed.en.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/micropython/main/typeshed.en.json b/src/micropython/main/typeshed.en.json index 56826ea8f..19cc9465e 100644 --- a/src/micropython/main/typeshed.en.json +++ b/src/micropython/main/typeshed.en.json @@ -5,7 +5,7 @@ "/typeshed/stdlib/antigravity.pyi": "", "/typeshed/stdlib/array.pyi": "from typing import Generic, Iterable, MutableSequence, TypeVar, Union, overload\nfrom typing_extensions import Literal\n\n_IntTypeCode = Literal[\"b\", \"B\", \"h\", \"H\", \"i\", \"I\", \"l\", \"L\", \"q\", \"Q\"]\n_FloatTypeCode = Literal[\"f\", \"d\"]\n_TypeCode = Union[_IntTypeCode, _FloatTypeCode]\n\n_T = TypeVar(\"_T\", int, float)\n\nclass array(MutableSequence[_T], Generic[_T]):\n @overload\n def __init__(\n self: array[int],\n typecode: _IntTypeCode,\n __initializer: Union[bytes, Iterable[_T]] = ...,\n ) -> None: ...\n @overload\n def __init__(\n self: array[float],\n typecode: _FloatTypeCode,\n __initializer: Union[bytes, Iterable[_T]] = ...,\n ) -> None: ...\n @overload\n def __init__(\n self, typecode: str, __initializer: Union[bytes, Iterable[_T]] = ...\n ) -> None: ...\n def append(self, __v: _T) -> None: ...\n def decode(self) -> str: ...\n def extend(self, __bb: Iterable[_T]) -> None: ...\n def __len__(self) -> int: ...\n @overload\n def __getitem__(self, i: int) -> _T: ...\n @overload\n def __getitem__(self, s: slice) -> array[_T]: ...\n @overload # type: ignore # Overrides MutableSequence\n def __setitem__(self, i: int, o: _T) -> None: ...\n @overload\n def __setitem__(self, s: slice, o: array[_T]) -> None: ...\n def __add__(self, x: array[_T]) -> array[_T]: ...\n def __iadd__(self, x: array[_T]) -> array[_T]: ... # type: ignore # Overrides MutableSequence\n\nArrayType = array\n", "/typeshed/stdlib/audio.pyi": "\"\"\"Play sounds using the micro:bit (import ``audio`` for V1 compatibility).\n\"\"\"\n\n# Re-export for V1 compatibility.\nfrom .microbit.audio import (\n is_playing as is_playing,\n play as play,\n stop as stop,\n AudioFrame as AudioFrame,\n SoundEffect as SoundEffect,\n)\n", - "/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 \"\"\"Get the type of an object.\n\n Example: ``type(\"hello, world)``\n\n :return: The type of the object passed in.\n \"\"\"\n ...\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 \"\"\"Get an integer from a number or a string.\n \"\"\"\n @overload\n def __new__(\n cls: Type[_T],\n x: str | bytes | SupportsInt | SupportsIndex | _SupportsTrunc = ...,\n ) -> _T:\n \"\"\"Get an integer from a number or a string.\n\n Example: ``int(\"1.2\")``\n\n :return: Zero if no argument is provided, or an ``int`` from a number or string truncated toward zero.\n \"\"\"\n ...\n @overload\n def __new__(\n cls: Type[_T], x: str | bytes | bytearray, base: SupportsIndex\n ) -> _T:\n \"\"\"Get an integer from a number or a string.\n\n Example: ``int(\"8.3\", 2)``\n\n :param base: (default=10) Allowed bases are 0 and 2\u201336.\n :return: Zero if no argument is provided, or an ``int`` from a number or string truncated toward zero.\n \"\"\"\n ...\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 \"\"\"Get a float from a number or a string.\n \"\"\"\n def __new__(\n cls: Type[_T], x: SupportsFloat | SupportsIndex | str | bytes | bytearray = ...\n ) -> _T:\n \"\"\"Convert a string or number to a floating point number, if possible.\n\n Example: ``float(\"1.2\")``\n\n :return: ``0.0`` if no argument is provided, or a ``float`` from a number or string.\n \"\"\"\n ...\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 \"\"\"Get a string version of an object or new empty string.\n \"\"\"\n @overload\n def __new__(cls: Type[_T], object: object = \"\") -> _T:\n \"\"\"Get a string version of an object.\n\n Example: ``string = str(42)``\n \n :param object: (default=\"\") Object to return a string version of.\n :return: A string reprentation of an object.\n \"\"\"\n ...\n @overload\n def __new__(\n cls: Type[_T], object: bytes = b\"\", encoding: str = \"uft-8\", errors: str = \"strict\"\n ) -> _T:\n \"\"\"Get a string version of an object.\n\n Example: ``string = str(42)``\n \n :param object: (default=b\"\") Object to return a string version of as bytes or a bytearray.\n :param encoding: (default=\"uft-8\") Encoding used to decode object.\n :param errors: (default=\"strict\") Something about error handling...\n :return: A string reprentation of an object.\n \"\"\"\n ...\n def count(\n self,\n x: str,\n __start: SupportsIndex | None = ...,\n __end: SupportsIndex | None = ...,\n ) -> int:\n \"\"\"Get the number of non-overlapping occurences of a substring in the string.\n\n The optional ``__start`` and ``__end`` arguments can be used to specify a substring in which to count.\n\n Example: ``count = \"banana\".count(\"na\")``\n \n :param x: The substring to count.\n :param __start: Optional argument to specify the start of the substring in which to count.\n :param __end: Optional argument to specify the end of the substring in which to count.\n :return: The number of non-overlapping occurences of a substring in the string as an ``int``.\n \"\"\"\n ...\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 \"\"\"Check if the string ends with a substring.\n\n The optional ``__start`` and ``__end`` arguments can be used to specify the range to test.\n\n Example: ``ends_with_hello = \"hello, world\".endswith(\"hello\")``\n \n :param __prefix: The prefix to check for.\n :param __start: Optional argument to specify the start of the substring to test.\n :param __end: Optional argument to specify the end of the substring to test.\n :return: ``True`` if the string ends with the substring, otherwise ``False``.\n \"\"\"\n ...\n def find(\n self,\n __sub: str,\n __start: SupportsIndex | None = ...,\n __end: SupportsIndex | None = ...,\n ) -> int:\n \"\"\"Get the lowest index of where the substring is found.\n\n The optional ``__start`` and ``__end`` arguments can be used to specify a substring in which to search.\n\n Example: ``index = \"banana\".find(\"na\")``\n \n :param __sub: The substring to find.\n :param __start: Optional argument to specify the start of the substring in which to search.\n :param __end: Optional argument to specify the end of the substring in which to search.\n :return: The the lowest index of where the substring is found, -1 if not found.\n \"\"\"\n ...\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 \"\"\"Check if all the characters in the string are alphabetical.\n\n Example: ``\"Hello\".isalpha()``\n \n :return: ``True`` if the string is at least one character long and all the characters in the string are alphabetical, otherwise ``False``.\n \"\"\"\n ...\n def isdigit(self) -> bool:\n \"\"\"Check if all the characters in the string are digits.\n\n Example: ``\"123\".isdigit()``\n \n :return: ``True`` if the string is at least one character long and all the characters in the string are digits, otherwise ``False``.\n \"\"\"\n ...\n def islower(self) -> bool:\n \"\"\"Check if all the characters in the string are lower case.\n\n Example: ``\"hello\".islower()``\n \n :return: ``True`` if the string is at least one character long and all the characters in the string are lower case, otherwise ``False``.\n \"\"\"\n ...\n def isspace(self) -> bool:\n \"\"\"Check if all the characters in the string are whitespace characters.\n\n Example: ``\" \".isspace()``\n \n :return: ``True`` if the string is at least one character long and all the characters in the string are whitespace characters, otherwise ``False``.\n \"\"\"\n ...\n def isupper(self) -> bool:\n \"\"\"Check if all the characters in the string are upper case.\n\n Example: ``\"HELLO\".isupper()``\n \n :return: ``True`` if the string is at least one character long and all the characters in the string are upper case, otherwise ``False``.\n \"\"\"\n ...\n def join(self, __iterable: Iterable[str]) -> str: ...\n def lower(self) -> str:\n \"\"\"Get a copy of the string in lower case.\n\n Example: ``as_lower_case = \"HELLO\".lower()``\n \n :return: A copy of the string in lower case.\n \"\"\"\n ...\n def lstrip(self, __chars: str | None = ...) -> str:\n \"\"\"Get a copy of the string with the leading characters removed.\n\n Example: ``stripped = \" hello\".lstrip()``\n \n :param __chars: (default=\" \") The characters to be removed. Defaults to whitespace characters if not provided.\n :return: A copy of the string with the leading characters removed.\n \"\"\"\n ...\n def replace(self, __old: str, __new: str, __count: SupportsIndex = ...) -> str:\n \"\"\"Get a copy of the string with all occurrences of the old substring replaced by new.\n\n Example: ``replaced = \"apple, orange\".replace(\"orange\", \"banana\")``\n \n :param __old: The substring to replace.\n :param __new: The replacement substring.\n :param __count: Optional argument to specify the number of occurences of the old substring that should be replaced.\n :return: A copy of the string with all occurrences of the old substring replaced by new.\n \"\"\"\n ...\n def rfind(\n self,\n __sub: str,\n __start: SupportsIndex | None = ...,\n __end: SupportsIndex | None = ...,\n ) -> int:\n \"\"\"Get the highest index of where the substring is found.\n\n The optional ``__start`` and ``__end`` arguments can be used to specify a substring in which to search.\n\n Example: ``index = \"banana\".rfind(\"na\")``\n\n :param __sub: The substring to find.\n :param __start: Optional argument to specify the start of the substring in which to search.\n :param __end: Optional argument to specify the end of the substring in which to search.\n :return: The the highest index of where the substring is found, -1 if not found.\n \"\"\"\n ...\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 \"\"\"Get a copy of the string with the trailing characters removed.\n\n Example: ``stripped = \"hello \".rstrip()``\n \n :param __chars: (default=\" \") The characters to be removed. Defaults to whitespace characters if not provided.\n :return: A copy of the string with the trailing characters removed.\n \"\"\"\n ...\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 \"\"\"Check if the string starts with a substring.\n\n The optional ``__start`` and ``__end`` arguments can be used to specify the range to test.\n\n Example: ``starts_with_hello = \"hello, world\".startswith(\"hello\")``\n \n :param __prefix: The prefix to check for.\n :param __start: Optional argument to specify the start of the substring to test.\n :param __end: Optional argument to specify the end of the substring to test.\n :return: ``True`` if the string starts with the substring, otherwise ``False``.\n \"\"\"\n ...\n def strip(self, __chars: str | None = ...) -> str:\n \"\"\"Get a copy of the string with the leading and trailing characters removed.\n\n Example: ``stripped = \" hello \".strip()``\n \n :param __chars: (default=\" \") The characters to be removed. Defaults to whitespace characters if not provided.\n :return: A copy of the string with the leading and trailing characters removed.\n \"\"\"\n ...\n def upper(self) -> str:\n \"\"\"Get a copy of the string in upper case.\n\n Example: ``as_upper_case = \"hello\".upper()``\n \n :return: A copy of the string in upper case.\n \"\"\"\n ...\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 frozenset(AbstractSet[_T_co], Generic[_T_co]):\n @overload\n def __new__(cls: type[Self]) -> Self: ...\n @overload\n def __new__(cls: type[Self], __iterable: Iterable[_T_co]) -> Self: ...\n def copy(self) -> FrozenSet[_T_co]: ...\n def difference(self, *s: Iterable[object]) -> FrozenSet[_T_co]: ...\n def intersection(self, *s: Iterable[object]) -> FrozenSet[_T_co]: ...\n def isdisjoint(self, s: Iterable[_T_co]) -> bool: ...\n def issubset(self, s: Iterable[object]) -> bool: ...\n def issuperset(self, s: Iterable[object]) -> bool: ...\n def symmetric_difference(self, s: Iterable[_T_co]) -> FrozenSet[_T_co]: ...\n def union(self, *s: Iterable[_T_co]) -> FrozenSet[_T_co]: ...\n def __len__(self) -> int: ...\n def __contains__(self, o: object) -> bool: ...\n def __iter__(self) -> Iterator[_T_co]: ...\n def __str__(self) -> str: ...\n def __and__(self, s: AbstractSet[_T_co]) -> FrozenSet[_T_co]: ...\n def __or__(self, s: AbstractSet[_S]) -> FrozenSet[_T_co | _S]: ...\n def __sub__(self, s: AbstractSet[_T_co]) -> FrozenSet[_T_co]: ...\n def __xor__(self, s: AbstractSet[_S]) -> FrozenSet[_T_co | _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 if sys.version_info >= (3, 9):\n def __class_getitem__(cls, item: Any) -> GenericAlias: ...\n\nclass list(MutableSequence[_T], Generic[_T]):\n \"\"\"The list data type\n \"\"\"\n @overload\n def __init__(self) -> None: ...\n @overload\n def __init__(self, iterable: Iterable[_T]) -> None: ...\n def clear(self) -> None:\n \"\"\"Remove all items from the list.\n \"\"\"\n ...\n def copy(self) -> list[_T]: ...\n def append(self, __object: _T) -> None:\n \"\"\"Add an item to the end of the list.\n\n Example: ``[1, 2, 3].append(4)``\n \n :param __object: An item to add the end of the list.\n \"\"\"\n ...\n def extend(self, __iterable: Iterable[_T]) -> None: ...\n def pop(self, __index: SupportsIndex = ...) -> _T:\n \"\"\"Remove and return an item from the list.\n\n If no ``index`` is provided, the last item in the list is removed.\n An ``IndexError`` is raised if the ``index`` is outside of the list range.\n\n Example: ``[1, 2, 3, 4].pop()``\n \n :param __index: The index of the item to remove.\n :return: An item from the list.\n \"\"\"\n ...\n def index(\n self, __value: _T, __start: SupportsIndex = ..., __stop: SupportsIndex = ...\n ) -> int: ...\n def count(self, __value: _T) -> int:\n \"\"\"Get the number of times an item appears in the list.\n\n Example: ``[\"a\", \"b\", \"a\"].count(\"a\")``\n \n :param __value: The item to count.\n :return: The number of times an item appears in the list.\n \"\"\"\n ...\n def insert(self, __index: SupportsIndex, __object: _T) -> None:\n \"\"\"Insert an item into the list at a given position.\n\n Example: ``[\"a\", \"b\", \"a\"].insert(2, \"c\")``\n \n :param __index: The position at which to insert the item.\n :param __object: The item to insert.\n \"\"\"\n ...\n def remove(self, __value: _T) -> None:\n \"\"\"Remove the first occurence of a value from the list.\n\n A ``ValueError`` is raised if the ``value`` does not appear in the list.\n\n Example: ``[\"a\", \"b\", \"a\"].remove(\"a\")``\n \n :param __value: The item to remove.\n \"\"\"\n ...\n def reverse(self) -> None:\n \"\"\"Reverses the order of the items in the list, in place.\n\n Example: ``[3, 2, 1].reverse()`\n \"\"\"\n ...\n @overload\n def sort(\n self: list[SupportsLessThanT], *, key: None = None, reverse: bool = False\n ) -> None:\n \"\"\"Sorts the items in the list, in place.\n\n Example: ``[1, 3, 2].sort()`\n\n :param key: A function used to specify the comparison between items in the list.\n :param reverse: A ``bool`` used to reverse the sorting order.\n \"\"\"\n ...\n @overload\n def sort(\n self, *, key: Callable[[_T], SupportsLessThan], reverse: bool = False\n ) -> None:\n \"\"\"Sorts the items in the list, in place.\n\n Example: ``['Watermelon', 'avocado'].sort(str.lower)``\n\n :param key: A function used to specify the comparison between items in the list.\n :param reverse: A ``bool`` used to reverse the sorting order.\n \"\"\"\n ...\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 \"\"\"Get a range of values from 0 up tp the stop parameter.\n\n Example: ``rangeTimesTwo = [x * 2 for x in range(5)]``\n \n :param stop: An integer to determine the end of the range (exclusive).\n :return: A range object\n \"\"\"\n ...\n @overload\n def __init__(\n self, start: SupportsIndex, stop: SupportsIndex, step: SupportsIndex = ...\n ) -> None:\n \"\"\"Get a range of values from 0 up tp the stop parameter.\n\n Example: ``rangeTimesTwo = [x * 2 for x in range(1, 11, 2)]``\n \n :param start: (default=0) An integer to determine the start of the range (inclusive).\n :param stop: An integer to determine the end of the range (exclusive).\n :param step: (default=1) The increment for each value in the range.\n :return: A range object\n \"\"\"\n ...\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:\n \"\"\"Get the absolute value of a number.\n\n Example: ``abs(-42)``\n\n :param __x: A number.\n :return: The length of or number of items in an object. \n \"\"\" \n ...\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 \"\"\"Get a Unicode string representation of an integer.\n\n Example: ``chr(97)``\n\n :param __i: An integer within the range 0..1,114,111.\n :return: A Unicode string representation of a number within a valid range. \n \"\"\" \n ...\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(request: object) -> None:\n \"\"\"Starts interactive help or provides help for the request object, if valid.\n\n Example: ``help(\"print\")``\n \"\"\"\n ...\ndef hex(__number: int | SupportsIndex) -> str:\n \"\"\"Get the hexadecimal representation of an integer.\n\n Example: ``hex(42)``\n \n :return: The hexadecimal representation of an integer as a string.\n \"\"\"\n ...\ndef id(__obj: object) -> int: ...\ndef input(prompt: object = \"\") -> str:\n \"\"\"Get user input as a string.\n\n Example: ``prompt(\"Enter your name: \")``\n\n :param prompt: (default=\"\") Text prompt seen by users.\n :return: The length of or number of items in an object.\n \"\"\"\n ...\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:\n \"\"\"Get the length of, or number of items in an object.\n\n Example: ``len(\"Hello, world\")``\n\n :param __obj: A sequence (such as a string, bytes, tuple, list, or range) or a collection (such as a dictionary, set, or frozen set).\n :return: The length of or number of items in an object.\n \"\"\" \n ...\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:\n \"\"\"Get an integer representation of a Unicode character.\n\n Example: ``ord(\"a\")``\n\n :param __c: A Unicode character.\n :return: The length of or number of items in an object.\n \"\"\"\n ...\ndef print(\n *values: object,\n sep: str | None = \" \",\n end: str | None = \"\\n\",\n file: SupportsWrite[str] | None = None,\n flush: bool = False,\n) -> None:\n \"\"\"Prints values to a stream or standard output, typically the serial console.\n\n Example: ``print(\"Hello, world\")``\n\n :param *values: Arguments or literals to print.\n :param sep: (default=\" \") A string separator inserted between values.\n :param end: (default=\"\\n\") A string appended after the last value.\n :param file: (default=None) A file-like object (stream).\n :param flush: (default=False) Whether to forcibly flush the stream.\n \"\"\"\n ...\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 \"\"\"Round a number to the nearest integer.\n\n Example: ``round(42.42)``\n\n :param number: A number to round to the nearest integer.\n :return: Round a number to the nearest integer.\n \"\"\"\n ...\n@overload\ndef round(number: SupportsRound[Any], ndigits: None) -> int:\n \"\"\"Round a number to the nearest integer.\n\n Example: ``round(42.42, None)``\n\n :param number: A number to round to the nearest integer.\n :param ndigits: The number of decimal digits to round to.\n :return: Round a number to the nearest integer.\n \"\"\"\n ...\n@overload\ndef round(number: SupportsRound[_T], ndigits: SupportsIndex) -> _T:\n \"\"\"Round a number to the nearest integer.\n\n Example: ``round(42.42, 1)``\n\n :param number: A number to round to the number of decimal digits specified.\n :param ndigits: The number of decimal digits to round to.\n :return: The input number rounded to the number of decimal digits specified.\n \"\"\"\n ...\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/builtins.pyi": "\"\"\"Use builtin classes and functions\n\"\"\"\n\nimport 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 \"\"\"The type class.\n \"\"\"\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 \"\"\"Get the type of an object.\n\n Example: ``type(\"hello, world)``\n\n :return: The type of the object passed in.\n \"\"\"\n ...\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 \"\"\"Get an integer from a number or a string.\n \"\"\"\n @overload\n def __new__(\n cls: Type[_T],\n x: str | bytes | SupportsInt | SupportsIndex | _SupportsTrunc = ...,\n ) -> _T:\n \"\"\"Get an integer from a number or a string.\n\n Example: ``int(\"1.2\")``\n\n :return: Zero if no argument is provided, or an ``int`` from a number or string truncated toward zero.\n \"\"\"\n ...\n @overload\n def __new__(\n cls: Type[_T], x: str | bytes | bytearray, base: SupportsIndex\n ) -> _T:\n \"\"\"Get an integer from a number or a string.\n\n Example: ``int(\"8.3\", 2)``\n\n :param base: (default=10) Allowed bases are 0 and 2\u201336.\n :return: Zero if no argument is provided, or an ``int`` from a number or string truncated toward zero.\n \"\"\"\n ...\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 \"\"\"Get a float from a number or a string.\n \"\"\"\n def __new__(\n cls: Type[_T], x: SupportsFloat | SupportsIndex | str | bytes | bytearray = ...\n ) -> _T:\n \"\"\"Convert a string or number to a floating point number, if possible.\n\n Example: ``float(\"1.2\")``\n\n :return: ``0.0`` if no argument is provided, or a ``float`` from a number or string.\n \"\"\"\n ...\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 \"\"\"Get a string version of an object or new empty string.\n \"\"\"\n @overload\n def __new__(cls: Type[_T], object: object = \"\") -> _T:\n \"\"\"Get a string version of an object.\n\n Example: ``string = str(42)``\n \n :param object: (default=\"\") Object to return a string version of.\n :return: A string reprentation of an object.\n \"\"\"\n ...\n @overload\n def __new__(\n cls: Type[_T], object: bytes = b\"\", encoding: str = \"uft-8\", errors: str = \"strict\"\n ) -> _T:\n \"\"\"Get a string version of an object.\n\n Example: ``string = str(42)``\n \n :param object: (default=b\"\") Object to return a string version of as bytes or a bytearray.\n :param encoding: (default=\"uft-8\") Encoding used to decode object.\n :param errors: (default=\"strict\") Something about error handling...\n :return: A string reprentation of an object.\n \"\"\"\n ...\n def count(\n self,\n x: str,\n __start: SupportsIndex | None = ...,\n __end: SupportsIndex | None = ...,\n ) -> int:\n \"\"\"Get the number of non-overlapping occurences of a substring in the string.\n\n The optional ``__start`` and ``__end`` arguments can be used to specify a substring in which to count.\n\n Example: ``count = \"banana\".count(\"na\")``\n \n :param x: The substring to count.\n :param __start: Optional argument to specify the start of the substring in which to count.\n :param __end: Optional argument to specify the end of the substring in which to count.\n :return: The number of non-overlapping occurences of a substring in the string as an ``int``.\n \"\"\"\n ...\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 \"\"\"Check if the string ends with a substring.\n\n The optional ``__start`` and ``__end`` arguments can be used to specify the range to test.\n\n Example: ``ends_with_hello = \"hello, world\".endswith(\"hello\")``\n \n :param __prefix: The prefix to check for.\n :param __start: Optional argument to specify the start of the substring to test.\n :param __end: Optional argument to specify the end of the substring to test.\n :return: ``True`` if the string ends with the substring, otherwise ``False``.\n \"\"\"\n ...\n def find(\n self,\n __sub: str,\n __start: SupportsIndex | None = ...,\n __end: SupportsIndex | None = ...,\n ) -> int:\n \"\"\"Get the lowest index of where the substring is found.\n\n The optional ``__start`` and ``__end`` arguments can be used to specify a substring in which to search.\n\n Example: ``index = \"banana\".find(\"na\")``\n \n :param __sub: The substring to find.\n :param __start: Optional argument to specify the start of the substring in which to search.\n :param __end: Optional argument to specify the end of the substring in which to search.\n :return: The the lowest index of where the substring is found, -1 if not found.\n \"\"\"\n ...\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 \"\"\"Check if all the characters in the string are alphabetical.\n\n Example: ``\"Hello\".isalpha()``\n \n :return: ``True`` if the string is at least one character long and all the characters in the string are alphabetical, otherwise ``False``.\n \"\"\"\n ...\n def isdigit(self) -> bool:\n \"\"\"Check if all the characters in the string are digits.\n\n Example: ``\"123\".isdigit()``\n \n :return: ``True`` if the string is at least one character long and all the characters in the string are digits, otherwise ``False``.\n \"\"\"\n ...\n def islower(self) -> bool:\n \"\"\"Check if all the characters in the string are lower case.\n\n Example: ``\"hello\".islower()``\n \n :return: ``True`` if the string is at least one character long and all the characters in the string are lower case, otherwise ``False``.\n \"\"\"\n ...\n def isspace(self) -> bool:\n \"\"\"Check if all the characters in the string are whitespace characters.\n\n Example: ``\" \".isspace()``\n \n :return: ``True`` if the string is at least one character long and all the characters in the string are whitespace characters, otherwise ``False``.\n \"\"\"\n ...\n def isupper(self) -> bool:\n \"\"\"Check if all the characters in the string are upper case.\n\n Example: ``\"HELLO\".isupper()``\n \n :return: ``True`` if the string is at least one character long and all the characters in the string are upper case, otherwise ``False``.\n \"\"\"\n ...\n def join(self, __iterable: Iterable[str]) -> str: ...\n def lower(self) -> str:\n \"\"\"Get a copy of the string in lower case.\n\n Example: ``as_lower_case = \"HELLO\".lower()``\n \n :return: A copy of the string in lower case.\n \"\"\"\n ...\n def lstrip(self, __chars: str | None = ...) -> str:\n \"\"\"Get a copy of the string with the leading characters removed.\n\n Example: ``stripped = \" hello\".lstrip()``\n \n :param __chars: (default=\" \") The characters to be removed. Defaults to whitespace characters if not provided.\n :return: A copy of the string with the leading characters removed.\n \"\"\"\n ...\n def replace(self, __old: str, __new: str, __count: SupportsIndex = ...) -> str:\n \"\"\"Get a copy of the string with all occurrences of the old substring replaced by new.\n\n Example: ``replaced = \"apple, orange\".replace(\"orange\", \"banana\")``\n \n :param __old: The substring to replace.\n :param __new: The replacement substring.\n :param __count: Optional argument to specify the number of occurences of the old substring that should be replaced.\n :return: A copy of the string with all occurrences of the old substring replaced by new.\n \"\"\"\n ...\n def rfind(\n self,\n __sub: str,\n __start: SupportsIndex | None = ...,\n __end: SupportsIndex | None = ...,\n ) -> int:\n \"\"\"Get the highest index of where the substring is found.\n\n The optional ``__start`` and ``__end`` arguments can be used to specify a substring in which to search.\n\n Example: ``index = \"banana\".rfind(\"na\")``\n\n :param __sub: The substring to find.\n :param __start: Optional argument to specify the start of the substring in which to search.\n :param __end: Optional argument to specify the end of the substring in which to search.\n :return: The the highest index of where the substring is found, -1 if not found.\n \"\"\"\n ...\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 \"\"\"Get a copy of the string with the trailing characters removed.\n\n Example: ``stripped = \"hello \".rstrip()``\n \n :param __chars: (default=\" \") The characters to be removed. Defaults to whitespace characters if not provided.\n :return: A copy of the string with the trailing characters removed.\n \"\"\"\n ...\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 \"\"\"Check if the string starts with a substring.\n\n The optional ``__start`` and ``__end`` arguments can be used to specify the range to test.\n\n Example: ``starts_with_hello = \"hello, world\".startswith(\"hello\")``\n \n :param __prefix: The prefix to check for.\n :param __start: Optional argument to specify the start of the substring to test.\n :param __end: Optional argument to specify the end of the substring to test.\n :return: ``True`` if the string starts with the substring, otherwise ``False``.\n \"\"\"\n ...\n def strip(self, __chars: str | None = ...) -> str:\n \"\"\"Get a copy of the string with the leading and trailing characters removed.\n\n Example: ``stripped = \" hello \".strip()``\n \n :param __chars: (default=\" \") The characters to be removed. Defaults to whitespace characters if not provided.\n :return: A copy of the string with the leading and trailing characters removed.\n \"\"\"\n ...\n def upper(self) -> str:\n \"\"\"Get a copy of the string in upper case.\n\n Example: ``as_upper_case = \"hello\".upper()``\n \n :return: A copy of the string in upper case.\n \"\"\"\n ...\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 frozenset(AbstractSet[_T_co], Generic[_T_co]):\n @overload\n def __new__(cls: type[Self]) -> Self: ...\n @overload\n def __new__(cls: type[Self], __iterable: Iterable[_T_co]) -> Self: ...\n def copy(self) -> FrozenSet[_T_co]: ...\n def difference(self, *s: Iterable[object]) -> FrozenSet[_T_co]: ...\n def intersection(self, *s: Iterable[object]) -> FrozenSet[_T_co]: ...\n def isdisjoint(self, s: Iterable[_T_co]) -> bool: ...\n def issubset(self, s: Iterable[object]) -> bool: ...\n def issuperset(self, s: Iterable[object]) -> bool: ...\n def symmetric_difference(self, s: Iterable[_T_co]) -> FrozenSet[_T_co]: ...\n def union(self, *s: Iterable[_T_co]) -> FrozenSet[_T_co]: ...\n def __len__(self) -> int: ...\n def __contains__(self, o: object) -> bool: ...\n def __iter__(self) -> Iterator[_T_co]: ...\n def __str__(self) -> str: ...\n def __and__(self, s: AbstractSet[_T_co]) -> FrozenSet[_T_co]: ...\n def __or__(self, s: AbstractSet[_S]) -> FrozenSet[_T_co | _S]: ...\n def __sub__(self, s: AbstractSet[_T_co]) -> FrozenSet[_T_co]: ...\n def __xor__(self, s: AbstractSet[_S]) -> FrozenSet[_T_co | _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 if sys.version_info >= (3, 9):\n def __class_getitem__(cls, item: Any) -> GenericAlias: ...\n\nclass list(MutableSequence[_T], Generic[_T]):\n \"\"\"The list data type\n \"\"\"\n @overload\n def __init__(self) -> None: ...\n @overload\n def __init__(self, iterable: Iterable[_T]) -> None: ...\n def clear(self) -> None:\n \"\"\"Remove all items from the list.\n \"\"\"\n ...\n def copy(self) -> list[_T]: ...\n def append(self, __object: _T) -> None:\n \"\"\"Add an item to the end of the list.\n\n Example: ``[1, 2, 3].append(4)``\n \n :param __object: An item to add the end of the list.\n \"\"\"\n ...\n def extend(self, __iterable: Iterable[_T]) -> None: ...\n def pop(self, __index: SupportsIndex = ...) -> _T:\n \"\"\"Remove and return an item from the list.\n\n If no ``index`` is provided, the last item in the list is removed.\n An ``IndexError`` is raised if the ``index`` is outside of the list range.\n\n Example: ``[1, 2, 3, 4].pop()``\n \n :param __index: The index of the item to remove.\n :return: An item from the list.\n \"\"\"\n ...\n def index(\n self, __value: _T, __start: SupportsIndex = ..., __stop: SupportsIndex = ...\n ) -> int: ...\n def count(self, __value: _T) -> int:\n \"\"\"Get the number of times an item appears in the list.\n\n Example: ``[\"a\", \"b\", \"a\"].count(\"a\")``\n \n :param __value: The item to count.\n :return: The number of times an item appears in the list.\n \"\"\"\n ...\n def insert(self, __index: SupportsIndex, __object: _T) -> None:\n \"\"\"Insert an item into the list at a given position.\n\n Example: ``[\"a\", \"b\", \"a\"].insert(2, \"c\")``\n \n :param __index: The position at which to insert the item.\n :param __object: The item to insert.\n \"\"\"\n ...\n def remove(self, __value: _T) -> None:\n \"\"\"Remove the first occurence of a value from the list.\n\n A ``ValueError`` is raised if the ``value`` does not appear in the list.\n\n Example: ``[\"a\", \"b\", \"a\"].remove(\"a\")``\n \n :param __value: The item to remove.\n \"\"\"\n ...\n def reverse(self) -> None:\n \"\"\"Reverses the order of the items in the list, in place.\n\n Example: ``[3, 2, 1].reverse()`\n \"\"\"\n ...\n @overload\n def sort(\n self: list[SupportsLessThanT], *, key: None = None, reverse: bool = False\n ) -> None:\n \"\"\"Sorts the items in the list, in place.\n\n Example: ``[1, 3, 2].sort()`\n\n :param key: A function used to specify the comparison between items in the list.\n :param reverse: A ``bool`` used to reverse the sorting order.\n \"\"\"\n ...\n @overload\n def sort(\n self, *, key: Callable[[_T], SupportsLessThan], reverse: bool = False\n ) -> None:\n \"\"\"Sorts the items in the list, in place.\n\n Example: ``['Watermelon', 'avocado'].sort(str.lower)``\n\n :param key: A function used to specify the comparison between items in the list.\n :param reverse: A ``bool`` used to reverse the sorting order.\n \"\"\"\n ...\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 \"\"\" The range class.\n \"\"\"\n start: int\n stop: int\n step: int\n @overload\n def __init__(self, stop: SupportsIndex) -> None:\n \"\"\"Get a range of values from 0 up tp the stop parameter.\n\n Example: ``rangeTimesTwo = [x * 2 for x in range(5)]``\n \n :param stop: An integer to determine the end of the range (exclusive).\n :return: A range object\n \"\"\"\n ...\n @overload\n def __init__(\n self, start: SupportsIndex, stop: SupportsIndex, step: SupportsIndex = ...\n ) -> None:\n \"\"\"Get a range of values from 0 up tp the stop parameter.\n\n Example: ``rangeTimesTwo = [x * 2 for x in range(1, 11, 2)]``\n \n :param start: (default=0) An integer to determine the start of the range (inclusive).\n :param stop: An integer to determine the end of the range (exclusive).\n :param step: (default=1) The increment for each value in the range.\n :return: A range object\n \"\"\"\n ...\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:\n \"\"\"Get the absolute value of a number.\n\n Example: ``abs(-42)``\n\n :param __x: A number.\n :return: The length of or number of items in an object. \n \"\"\" \n ...\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 \"\"\"Get a Unicode string representation of an integer.\n\n Example: ``chr(97)``\n\n :param __i: An integer within the range 0..1,114,111.\n :return: A Unicode string representation of a number within a valid range. \n \"\"\" \n ...\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(request: object) -> None:\n \"\"\"Starts interactive help or provides help for the request object, if valid.\n\n Example: ``help(\"print\")``\n \"\"\"\n ...\ndef hex(__number: int | SupportsIndex) -> str:\n \"\"\"Get the hexadecimal representation of an integer.\n\n Example: ``hex(42)``\n \n :return: The hexadecimal representation of an integer as a string.\n \"\"\"\n ...\ndef id(__obj: object) -> int: ...\ndef input(prompt: object = \"\") -> str:\n \"\"\"Get user input as a string.\n\n Example: ``prompt(\"Enter your name: \")``\n\n :param prompt: (default=\"\") Text prompt seen by users.\n :return: The length of or number of items in an object.\n \"\"\"\n ...\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:\n \"\"\"Get the length of, or number of items in an object.\n\n Example: ``len(\"Hello, world\")``\n\n :param __obj: A sequence (such as a string, bytes, tuple, list, or range) or a collection (such as a dictionary, set, or frozen set).\n :return: The length of or number of items in an object.\n \"\"\" \n ...\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:\n \"\"\"Get an integer representation of a Unicode character.\n\n Example: ``ord(\"a\")``\n\n :param __c: A Unicode character.\n :return: The length of or number of items in an object.\n \"\"\"\n ...\ndef print(\n *values: object,\n sep: str | None = \" \",\n end: str | None = \"\\n\",\n file: SupportsWrite[str] | None = None,\n flush: bool = False,\n) -> None:\n \"\"\"Prints values to a stream or standard output, typically the serial console.\n\n Example: ``print(\"Hello, world\")``\n\n :param *values: Arguments or literals to print.\n :param sep: (default=\" \") A string separator inserted between values.\n :param end: (default=\"\\n\") A string appended after the last value.\n :param file: (default=None) A file-like object (stream).\n :param flush: (default=False) Whether to forcibly flush the stream.\n \"\"\"\n ...\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 \"\"\"Round a number to the nearest integer.\n\n Example: ``round(42.42)``\n\n :param number: A number to round to the nearest integer.\n :return: Round a number to the nearest integer.\n \"\"\"\n ...\n@overload\ndef round(number: SupportsRound[Any], ndigits: None) -> int:\n \"\"\"Round a number to the nearest integer.\n\n Example: ``round(42.42, None)``\n\n :param number: A number to round to the nearest integer.\n :param ndigits: The number of decimal digits to round to.\n :return: Round a number to the nearest integer.\n \"\"\"\n ...\n@overload\ndef round(number: SupportsRound[_T], ndigits: SupportsIndex) -> _T:\n \"\"\"Round a number to the nearest integer.\n\n Example: ``round(42.42, 1)``\n\n :param number: A number to round to the number of decimal digits specified.\n :param ndigits: The number of decimal digits to round to.\n :return: The input number rounded to the number of decimal digits specified.\n \"\"\"\n ...\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": "\"\"\"Control the garbage collector\"\"\"\n\nfrom typing import overload\n\ndef enable() -> None:\n \"\"\"Enable automatic garbage collection.\"\"\"\n ...\n\ndef disable() -> None:\n \"\"\"Disable automatic garbage collection.\n\n Heap memory can still be allocated,\n and garbage collection can still be initiated manually using ``gc.collect``.\"\"\"\n\ndef collect() -> None:\n \"\"\"Run a garbage collection.\"\"\"\n ...\n\ndef mem_alloc() -> int:\n \"\"\"Get the number of bytes of heap RAM that are allocated.\n\n :return: The number of bytes allocated.\n\n This function is MicroPython extension.\n \"\"\"\n ...\n\ndef mem_free() -> int:\n \"\"\"Get the number of bytes of available heap RAM, or -1 if this amount is not known.\n\n :return: The number of bytes free.\n\n This function is MicroPython extension.\n \"\"\"\n ...\n\n@overload\ndef threshold() -> int:\n \"\"\"Query the additional GC allocation threshold.\n\n :return: The GC allocation threshold.\n\n This function is a MicroPython extension. CPython has a similar\n function - ``set_threshold()``, but due to different GC\n implementations, its signature and semantics are different.\n \"\"\"\n ...\n\n@overload\ndef threshold(amount: int) -> None:\n \"\"\"Set the additional GC allocation threshold.\n\n Normally, a collection is triggered only when a new allocation\n cannot be satisfied, i.e. on an out-of-memory (OOM) condition.\n If this function is called, in addition to OOM, a collection\n will be triggered each time after ``amount`` bytes have been\n allocated (in total, since the previous time such an amount of bytes\n have been allocated). ``amount`` is usually specified as less than the\n full heap size, with the intention to trigger a collection earlier than when the\n heap becomes exhausted, and in the hope that an early collection will prevent\n excessive memory fragmentation. This is a heuristic measure, the effect\n of which will vary from application to application, as well as\n the optimal value of the ``amount`` parameter.\n\n A value of -1 means a disabled allocation threshold.\n\n This function is a MicroPython extension. CPython has a similar\n function - ``set_threshold()``, but due to different GC\n implementations, its signature and semantics are different.\n\n :param amount: The number of bytes after which a garbage collection should be triggered.\n \"\"\"\n ...\n", "/typeshed/stdlib/log.pyi": "\"\"\"Log data to your micro:bit V2.\"\"\"\n\nfrom typing import Literal, Mapping, Optional, Union, overload\n\nMILLISECONDS = 1\n\"\"\"Milliseconds timestamp format.\"\"\"\n\nSECONDS = 10\n\"\"\"Seconds timestamp format.\"\"\"\n\nMINUTES = 600\n\"\"\"Minutes timestamp format.\"\"\"\n\nHOURS = 36000\n\"\"\"Hours timestamp format.\"\"\"\n\nDAYS = 864000\n\"\"\"Days timestamp format.\"\"\"\n\ndef set_labels(\n *labels: str, timestamp: Optional[Literal[1, 10, 36000, 864000]] = SECONDS\n) -> None:\n \"\"\"Set up the log file header.\n\n Example: ``log.set_labels('X', 'Y', 'Z', timestamp=log.MINUTES)``\n\n Ideally this function should be called a single time, before any data is\n logged, to configure the data table header once.\n\n If a log file already exists when the program starts, or if this function\n is called multiple times, it will check the labels already defined in the\n log file. If this function call contains any new labels not already\n present, it will generate a new header row with the additional columns.\n\n By default the first column contains a timestamp for each row. The time\n unit 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: 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\n@overload\ndef add(\n data_dictionary: Optional[Mapping[str, Union[str, int, float]]],\n) -> None:\n \"\"\"Add a data row to the log by passing a dictionary of headers and values.\n\n Example: ``log.add({ 'temp': temperature() })``\n\n Each call to this function adds a row to the log.\n\n New labels not previously specified via the set_labels function, or by a\n previous call to this function, will trigger a new header entry to be added\n to the log with the extra labels.\n\n Labels previously specified and not present in a call to this function will\n be 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\n@overload\ndef add(**kwargs: Union[str, int, float]) -> None:\n \"\"\"Add a data row to the log using keyword arguments.\n\n Example: ``log.add(temp=temperature())``\n\n Each call to this function adds a row to the log.\n\n New labels not previously specified via the set_labels function, or by a\n previous call to this function, will trigger a new header entry to be added\n to the log with the extra labels.\n\n Labels previously specified and not present in a call to this function will\n be skipped with an empty value in the log row.\n \"\"\"\n ...\n\ndef delete(full=False):\n \"\"\"Deletes the contents of the log, including headers.\n\n Example: ``log.delete()``\n\n To add the log headers again the ``set_labels`` function should to be called after this function.\n\n There are two erase modes; \u201cfull\u201d completely removes the data from the physical storage,\n and \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 ...\n\ndef set_mirroring(serial: bool):\n \"\"\"Configure mirroring of the data logging activity to the serial output.\n\n Example: ``log.set_mirroring(True)``\n\n Serial 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 \"\"\"\n ...\n", From 9ee4699b3f3b506e7f7f05a89ce50ea4e2032868 Mon Sep 17 00:00:00 2001 From: Matt Hillsdon Date: Fri, 24 May 2024 16:40:37 +0100 Subject: [PATCH 3/4] Tweaks - Examples for str, list - Don't import "builtins" or fully qualify it --- src/documentation/api/ApiNode.tsx | 15 +++++++++++---- src/micropython/main/typeshed.ca.json | 4 ++-- src/micropython/main/typeshed.de.json | 4 ++-- src/micropython/main/typeshed.en.json | 6 +++--- src/micropython/main/typeshed.es-es.json | 4 ++-- src/micropython/main/typeshed.fr.json | 4 ++-- src/micropython/main/typeshed.ja.json | 4 ++-- src/micropython/main/typeshed.ko.json | 4 ++-- src/micropython/main/typeshed.nl.json | 4 ++-- src/micropython/main/typeshed.zh-cn.json | 4 ++-- src/micropython/main/typeshed.zh-tw.json | 4 ++-- 11 files changed, 32 insertions(+), 25 deletions(-) diff --git a/src/documentation/api/ApiNode.tsx b/src/documentation/api/ApiNode.tsx index d245123d2..660a46b71 100644 --- a/src/documentation/api/ApiNode.tsx +++ b/src/documentation/api/ApiNode.tsx @@ -340,21 +340,28 @@ const classToInstanceMap: Record = { MicroBitAnalogDigitalPin: "pin0", Image: "Image.HEART", uname_result: "uname()", + str: `"hello, world"`, + list: `[1, 2, 3]`, }; const getDragPasteData = (fullName: string, kind: string): PasteContext => { - let parts = fullName.split(".").filter((p) => p !== "__init__"); + let parts = fullName + .split(".") + .filter((p) => p !== "__init__" && p !== "__new__"); // Heuristic identification of e.g. Image.HEART. Sufficient for MicroPython API. if (!parts[parts.length - 1].match(/^[A-Z0-9_]+$/)) { parts = parts.map((p) => classToInstanceMap[p] ?? p); } const isMicrobit = parts[0] === "microbit"; - const nameAsWeImportIt = isMicrobit ? parts.slice(1) : parts; + const isBuiltin = parts[0] === "builtins"; + const nameAsWeImportIt = isMicrobit || isBuiltin ? parts.slice(1) : parts; const code = nameAsWeImportIt.join(".") + (kind === "function" ? "()" : ""); - const requiredImport = isMicrobit + const requiredImport = isBuiltin + ? undefined + : isMicrobit ? `from microbit import *` : `import ${parts[0]}`; - const full = `${requiredImport}\n${code}`; + const full = [requiredImport, code].filter((x) => !!x).join("\n"); return { code, codeWithImports: full, diff --git a/src/micropython/main/typeshed.ca.json b/src/micropython/main/typeshed.ca.json index b5f6ccaeb..9cc6a8e8f 100644 --- a/src/micropython/main/typeshed.ca.json +++ b/src/micropython/main/typeshed.ca.json @@ -34,7 +34,7 @@ "/typeshed/stdlib/ustruct.pyi": "from struct import *\n", "/typeshed/stdlib/usys.pyi": "from sys import *\n", "/typeshed/stdlib/utime.pyi": "from time import *\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/_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/microbit/__init__.pyi": "\"\"\"Pins, imatges, sons, temperatura i volum.\"\"\"\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 \"\"\"Programa l'execuci\u00f3 d'una funci\u00f3 a cada interval especificat pels arguments de temps **nom\u00e9s V2**.\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: Funci\u00f3 a cridar a l'interval previst. Omet quan el fas servir com decorador.\n:param days: (dies) Estableix la marca del dia per la programaci\u00f3\n:param h: Estableix la marca de l'hora per la programaci\u00f3\n:param min: Estableix la marca del minut per la programaci\u00f3\n:param s: Estableix la marca del segon per la programaci\u00f3\n:param ms: Estableix la marca del mil\u00b7lisegon per la programaci\u00f3\"\"\"\n\ndef panic(n: int) -> None:\n \"\"\"Entrar en mode p\u00e0nic. (p\u00e0nic)\n\nExample: ``panic(127)``\n\n:param n: Un nombre enter arbitrari <= 255 per indicar un estat.\n\nRequires restart.\"\"\"\n\ndef reset() -> None:\n \"\"\"Reinicialitza la placa. (reiniciar)\"\"\"\n\n@overload\ndef scale(value: float, from_: Tuple[float, float], to: Tuple[int, int]) -> int:\n \"\"\"Converteix un valor d'un interval a un interval de nombre enter. (escala)\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) Un nombre a convertir.\n:param from_: (des de) Una tupla des d'on definir l'interval a convertir\n:param to: (a) Una tupla que defineix l'interval d'arribada\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 \"\"\"Converteix un valor d'un interval a un altre interval de coma flotant. (escala)\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) Un nombre a convertir.\n:param from_: (des de) Una tupla des d'on definir l'interval a convertir\n:param to: (a) Una tupla que defineix l'interval d'arribada de la conversi\u00f3.\n:return: The ``value`` converted to the ``to`` range.\"\"\"\n\ndef sleep(n: float) -> None:\n \"\"\"Espera per ``n`` mil\u00b7lisegons. (dormir)\n\nExample: ``sleep(1000)``\n\n:param n: El nombre de mil\u00b7lisegons 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 \"\"\"Obt\u00e9 el temps d'execuci\u00f3 de la placa. (temps d'execuci\u00f3)\n\n:return: The number of milliseconds since the board was switched on or restarted.\"\"\"\n\ndef temperature() -> int:\n \"\"\"Obt\u00e9 la temperatura de la micro:bit en graus Celsius. (temperatura)\"\"\"\n\ndef set_volume(v: int) -> None:\n \"\"\"Configura el volum (assigna volum)\n\nExample: ``set_volume(127)``\n\n:param v: un valor entre 0 (baix) i 255 (alt).\n\nOut of range values will be clamped to 0 or 255.\n\n**V2** only.\"\"\"\n ...\n\nclass Button:\n \"\"\"La classe dels botons ``button_a`` i ``button_b``. (bot\u00f3)\"\"\"\n\n def is_pressed(self) -> bool:\n \"\"\"Verifica si el bot\u00f3 est\u00e0 premut. (\u00e9s premut)\n\n:return: ``True`` if the specified button ``button`` is pressed, and ``False`` otherwise.\"\"\"\n ...\n\n def was_pressed(self) -> bool:\n \"\"\"Verifica si el bot\u00f3 ha estat premut d'en\u00e7\u00e0 que el dispositiu va arrancar o l'\u00faltima vegada que aquest m\u00e8tode va ser cridat. (ha estat premut)\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 \"\"\"Obt\u00e9 el total acumulat de pressions dels botons i restableix aquest total\na zero abans de tornar. (obt\u00e9 pitjades)\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'objecte bot\u00f3 esquerre ``Button`` . (bot\u00f3 a)\"\"\"\nbutton_b: Button\n\"\"\"L'objecte el bot\u00f3 dret ``Button``. (bot\u00f3 b)\"\"\"\n\nclass MicroBitDigitalPin:\n \"\"\"Un pin digital.\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 \"\"\"Obt\u00e9 el valor digital del pin. (llegeix 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 \"\"\"Assigna el valor digital del pin. (escriu digital)\n\nExample: ``pin0.write_digital(1)``\n\n:param value: (valor) 1 per posar el pin alt o 0 per posar el pin baix\"\"\"\n ...\n\n def set_pull(self, value: int) -> None:\n \"\"\"Configura les resist\u00e8ncies de pull-up/pull-down un dels tres valors possibles: ``PULL_UP``, ``PULL_DOWN`` o ``NO_PULL``. (configuraci\u00f3 de les resist\u00e8ncies de pull up/down)\n\nExample: ``pin0.set_pull(pin0.PULL_UP)``\n\n:param value: (valor) L'estat del pull-up/pull-down del pin corresponent, per ex. ``pin0.PULL_UP``.\"\"\"\n ...\n\n def get_pull(self) -> int:\n \"\"\"Obt\u00e9 l'estat de pull-up/pull-down d'un pin.\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 \"\"\"Retorna el mode del pin (obt\u00e9 el mode)\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 \"\"\"Genera un senyal PWM al pin, amb el cicle de treball proporcional a ``value``. (escriu anal\u00f2gic)\n\nExample: ``pin0.write_analog(254)``\n\n:param value: (valor) Un nombre enter o de coma flotant entre 0 (cicle de treball del 0%) i 1023 (cicle de treball del 100%).\"\"\"\n\n def set_analog_period(self, period: int) -> None:\n \"\"\"Estableix el per\u00edode del senyal PWM a ``period`` en mil\u00b7lisegons. (configura el per\u00edode amb un valor anal\u00f2gic)\n\nExample: ``pin0.set_analog_period(10)``\n\n:param period: (per\u00edode) El per\u00edode en mil\u00b7lisegons amb un valor m\u00ednim v\u00e0lid d'1\\u202fms\"\"\"\n\n def set_analog_period_microseconds(self, period: int) -> None:\n \"\"\"Estableix el per\u00edode del senyal PWM a ``period`` microsegons. (configura el per\u00edode amb un valor anal\u00f2gic en microsegons)\n\nExample: ``pin0.set_analog_period_microseconds(512)``\n\n:param period: (per\u00edode) El per\u00edode en microsegons amb un valor v\u00e0lid m\u00ednim de 256\\u202f\u00b5s.\"\"\"\n\nclass MicroBitAnalogDigitalPin(MicroBitDigitalPin):\n \"\"\"Un pin amb funcions anal\u00f2giques i digitals.\"\"\"\n\n def read_analog(self) -> int:\n \"\"\"Llegeix el voltatge aplicat al pin. (llegeix anal\u00f2gic)\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 amb caracter\u00edstiques anal\u00f2giques, digitals i t\u00e0ctils.\"\"\"\n CAPACITIVE: int\n RESISTIVE: int\n\n def is_touched(self) -> bool:\n \"\"\"Comprova si el pin est\u00e0 sent tocat. (est\u00e0 tocat)\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 \"\"\"Estableix el mode t\u00e0ctil per al pin. (estableix el mode t\u00e0ctil)\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 corresponent.\"\"\"\n ...\npin0: MicroBitTouchPin\n\"\"\"Pin amb caracter\u00edstiques digitals, anal\u00f2giques i t\u00e0ctils.\"\"\"\npin1: MicroBitTouchPin\n\"\"\"Pin amb caracter\u00edstiques digitals, anal\u00f2giques i t\u00e0ctils.\"\"\"\npin2: MicroBitTouchPin\n\"\"\"Pin amb caracter\u00edstiques digitals, anal\u00f2giques i t\u00e0ctils.\"\"\"\npin3: MicroBitAnalogDigitalPin\n\"\"\"Pin amb caracter\u00edstiques digitals i anal\u00f2giques.\"\"\"\npin4: MicroBitAnalogDigitalPin\n\"\"\"Pin amb caracter\u00edstiques digitals i anal\u00f2giques.\"\"\"\npin5: MicroBitDigitalPin\n\"\"\"Pin amb caracter\u00edstiques digitals.\"\"\"\npin6: MicroBitDigitalPin\n\"\"\"Pin amb caracter\u00edstiques digitals.\"\"\"\npin7: MicroBitDigitalPin\n\"\"\"Pin amb caracter\u00edstiques digitals.\"\"\"\npin8: MicroBitDigitalPin\n\"\"\"Pin amb caracter\u00edstiques digitals.\"\"\"\npin9: MicroBitDigitalPin\n\"\"\"Pin amb caracter\u00edstiques digitals.\"\"\"\npin10: MicroBitAnalogDigitalPin\n\"\"\"Pin amb caracter\u00edstiques digitals i anal\u00f2giques.\"\"\"\npin11: MicroBitDigitalPin\n\"\"\"Pin amb caracter\u00edstiques digitals.\"\"\"\npin12: MicroBitDigitalPin\n\"\"\"Pin amb caracter\u00edstiques digitals.\"\"\"\npin13: MicroBitDigitalPin\n\"\"\"Pin amb caracter\u00edstiques digitals.\"\"\"\npin14: MicroBitDigitalPin\n\"\"\"Pin amb caracter\u00edstiques digitals.\"\"\"\npin15: MicroBitDigitalPin\n\"\"\"Pin amb caracter\u00edstiques digitals.\"\"\"\npin16: MicroBitDigitalPin\n\"\"\"Pin amb caracter\u00edstiques digitals.\"\"\"\npin19: MicroBitDigitalPin\n\"\"\"Pin amb caracter\u00edstiques digitals.\"\"\"\npin20: MicroBitDigitalPin\n\"\"\"Pin amb caracter\u00edstiques digitals.\"\"\"\npin_logo: MicroBitTouchPin\n\"\"\"Un logotip t\u00e0ctil a la part frontal de la micro:bit, que per defecte est\u00e0 establert al mode t\u00e0ctil capacitiu. (pin logotip)\"\"\"\npin_speaker: MicroBitAnalogDigitalPin\n\"\"\"Un pin per adre\u00e7ar-se a l'altaveu micro:bit. (pin altaveu)\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 imatge per mostrar a la pantalla LED de micro:bit. (imatge)\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 \"\"\"Imatge d'un cor. (cor)\"\"\"\n HEART_SMALL: Image\n \"\"\"Imatge d'un cor petit (cor petit)\"\"\"\n HAPPY: Image\n \"\"\"Imatge d'una cara feli\u00e7 (feli\u00e7)\"\"\"\n SMILE: Image\n \"\"\"Imatge d'una cara somrient (somriure)\"\"\"\n SAD: Image\n \"\"\"Imatge d'una cara trista (tristesa)\"\"\"\n CONFUSED: Image\n \"\"\"Imatge de cara confusa. (confusa)\"\"\"\n ANGRY: Image\n \"\"\"Imatge d'una cara enfadada. (enfadat)\"\"\"\n ASLEEP: Image\n \"\"\"Imatge d'una cara dormint. (despert)\"\"\"\n SURPRISED: Image\n \"\"\"Imatge d'una cara de sorpresa (sorpr\u00e8s)\"\"\"\n SILLY: Image\n \"\"\"Imatge d'una cara ximple. (ximple)\"\"\"\n FABULOUS: Image\n \"\"\"Imatge d'una cara amb ulleres de sol. (fabul\u00f3s)\"\"\"\n MEH: Image\n \"\"\"Imatge d'una cara inexpressiva. (BAH avorrit)\"\"\"\n YES: Image\n \"\"\"Imatge d'una marca tic. (s\u00ed)\"\"\"\n NO: Image\n \"\"\"Imatge d'una creu.\"\"\"\n CLOCK12: Image\n \"\"\"Imatge d'una l\u00ednia apuntant les dotze. (les dotze)\"\"\"\n CLOCK11: Image\n \"\"\"Imatge d'una l\u00ednia apuntant les onze. (les onze)\"\"\"\n CLOCK10: Image\n \"\"\"Imatge d'una l\u00ednia apuntant les deu. (les deu)\"\"\"\n CLOCK9: Image\n \"\"\"Imatge d'una l\u00ednia apuntant les nou. (les nou)\"\"\"\n CLOCK8: Image\n \"\"\"Imatge d'una l\u00ednia apuntant les vuit. (les vuit)\"\"\"\n CLOCK7: Image\n \"\"\"Imatge d'una l\u00ednia apuntant les set. (les set)\"\"\"\n CLOCK6: Image\n \"\"\"Imatge amb una l\u00ednia apuntant a les 6 en punt. (les sis)\"\"\"\n CLOCK5: Image\n \"\"\"Imatge amb una l\u00ednia apuntant a les 5 en punt. (les cinc)\"\"\"\n CLOCK4: Image\n \"\"\"Imatge amb una l\u00ednia apuntant a les 4 en punt. (les quatre)\"\"\"\n CLOCK3: Image\n \"\"\"Imatge amb una l\u00ednia apuntant a les 3 en punt. (les tres)\"\"\"\n CLOCK2: Image\n \"\"\"Imatge amb una l\u00ednia apuntant a les 2 en punt. (les dues)\"\"\"\n CLOCK1: Image\n \"\"\"Imatge amb una l\u00ednia apuntant a la 1 en punt. (la una)\"\"\"\n ARROW_N: Image\n \"\"\"Imatge de fletxa apuntant al nord. (fletxa n)\"\"\"\n ARROW_NE: Image\n \"\"\"Imatge de fletxa apuntant al nord-est. (fletxa ne)\"\"\"\n ARROW_E: Image\n \"\"\"Imatge de fletxa apuntant a l'est. (fletxa e)\"\"\"\n ARROW_SE: Image\n \"\"\"Imatge de fletxa apuntant al sud-est. (fletxa se)\"\"\"\n ARROW_S: Image\n \"\"\"Imatge de fletxa apuntant al sud. (fletxa s)\"\"\"\n ARROW_SW: Image\n \"\"\"Imatge de fletxa apuntant al sud-oest. (fletxa so)\"\"\"\n ARROW_W: Image\n \"\"\"Imatge de fletxa apuntant a l'oest. (fletxa o)\"\"\"\n ARROW_NW: Image\n \"\"\"Imatge de fletxa apuntant al nord-oest. (fletxa no)\"\"\"\n TRIANGLE: Image\n \"\"\"Imatge d'un triangle apuntant amunt.\"\"\"\n TRIANGLE_LEFT: Image\n \"\"\"Imatge d'un triangle en la cantonada esquerra. (triangle a l'esquerra)\"\"\"\n CHESSBOARD: Image\n \"\"\"Leds alternatius il\u00b7luminats en un patr\u00f3 d'escacs. (Tauler d'escacs)\"\"\"\n DIAMOND: Image\n \"\"\"Imatge d'un diamant (diamant)\"\"\"\n DIAMOND_SMALL: Image\n \"\"\"Imatge d'un diamant petit (diamant petit)\"\"\"\n SQUARE: Image\n \"\"\"Imatge d'un quadrat (quadrat)\"\"\"\n SQUARE_SMALL: Image\n \"\"\"Imatge d'un quadrat petit (quadrat petit)\"\"\"\n RABBIT: Image\n \"\"\"Imatge d'un conill. (conill)\"\"\"\n COW: Image\n \"\"\"Imatge d'una vaca. (vaca)\"\"\"\n MUSIC_CROTCHET: Image\n \"\"\"Imatge de la nota musical negra (nota musical negra)\"\"\"\n MUSIC_QUAVER: Image\n \"\"\"Imatge de la nota musical corxera (nota musical corxera)\"\"\"\n MUSIC_QUAVERS: Image\n \"\"\"Imatge d'un parell de notes musicals corxeres (nota musical corxera)\"\"\"\n PITCHFORK: Image\n \"\"\"Imatge d'una forca. (forca)\"\"\"\n XMAS: Image\n \"\"\"Imatge d'un arbre de Nadal (nadal)\"\"\"\n PACMAN: Image\n \"\"\"Imatge del personatge de Pac-man a arcade\"\"\"\n TARGET: Image\n \"\"\"Imatge d'objectiu. (diana)\"\"\"\n TSHIRT: Image\n \"\"\"Imatge de samarreta. (Imatge d'una samarreta T-shirt)\"\"\"\n ROLLERSKATE: Image\n \"\"\"Imatge d'un patinet. (patinet)\"\"\"\n DUCK: Image\n \"\"\"Imatge d'un \u00e0nec. (\u00e0nec)\"\"\"\n HOUSE: Image\n \"\"\"Imatge d'una casa. (casa)\"\"\"\n TORTOISE: Image\n \"\"\"Imatge d'una tortuga. (tortuga)\"\"\"\n BUTTERFLY: Image\n \"\"\"Imatge d'una papallona. (papallona)\"\"\"\n STICKFIGURE: Image\n \"\"\"Imatge de figura d'un pal. (imatge d'un pal)\"\"\"\n GHOST: Image\n \"\"\"Imatge d'un fantasma. (fantasma)\"\"\"\n SWORD: Image\n \"\"\"Imatge d'una espasa (espasa)\"\"\"\n GIRAFFE: Image\n \"\"\"Imatge d'una girafa. (girafa)\"\"\"\n SKULL: Image\n \"\"\"Imatge d'un crani. (crani)\"\"\"\n UMBRELLA: Image\n \"\"\"Imatge d'un paraigua, (paraigua)\"\"\"\n SNAKE: Image\n \"\"\"Imatge d'una serp. (serp)\"\"\"\n SCISSORS: Image\n \"\"\"Imatge d'unes tisores. (tisores)\"\"\"\n ALL_CLOCKS: List[Image]\n \"\"\"Una llista que cont\u00e9 totes les imatges CLOCK_ en seq\u00fc\u00e8ncia. (tots els rellotges)\"\"\"\n ALL_ARROWS: List[Image]\n \"\"\"Una llista que cont\u00e9 totes les ARROW_images en seq\u00fc\u00e8ncia. (totes les fletxes)\"\"\"\n\n @overload\n def __init__(self, string: str) -> None:\n \"\"\"Crea una imatge a partir d'una cadena que descrigui quins leds estan encesos.\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 descrivint la imatge.\"\"\"\n ...\n\n @overload\n def __init__(self, width: int=5, height: int=5, buffer: ReadableBuffer=None) -> None:\n \"\"\"Crea una imatge buida amb ``width`` columnes i ``height`` files.\n\n:param width: (amplada) Amplada opcional de la imatge\n:param height: (al\u00e7\u00e0ria) Al\u00e7\u00e0ria opcional de la imatge\n:param buffer: (mem\u00f2ria interm\u00e8dia) Llistes o bytes opcionals d'enters de ``width``\u00d7``height`` dins l'interval de 0 a 9 per inicialitzar la imatge\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 \"\"\"Obt\u00e9 el nombre de columnes (amplada)\n\n:return: The number of columns in the image\"\"\"\n ...\n\n def height(self) -> int:\n \"\"\"Obt\u00e9 el nombre de files. (al\u00e7\u00e0ria)\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 \"\"\"Estableix la brillantor d'un p\u00edxel. (estableix p\u00edxel)\n\nExample: ``my_image.set_pixel(0, 0, 9)``\n\n:param x: El nombre de la columna\n:param y: El nombre de la fila\n:param value: (valor) La brillantor com a nombre enter entre 0 (fosc) i 9 (brillant)\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 \"\"\"Obt\u00e9 la brillantor d'un p\u00edxel. (obt\u00e9 p\u00edxel)\n\nExample: ``my_image.get_pixel(0, 0)``\n\n:param x: El nombre de la columna\n:param y: El nombre de la 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 imatge nova movent-la cap a l'esquerra. (despla\u00e7a a l'esquerra)\n\nExample: ``Image.HEART_SMALL.shift_left(1)``\n\n:param n: El nombre de columnes per despla\u00e7ar-se\n:return: The shifted image\"\"\"\n ...\n\n def shift_right(self, n: int) -> Image:\n \"\"\"Crea una imatge nova movent-la cap a la dreta. (despla\u00e7a a la dreta)\n\nExample: ``Image.HEART_SMALL.shift_right(1)``\n\n:param n: El nombre de columnes per despla\u00e7ar-se\n:return: The shifted image\"\"\"\n ...\n\n def shift_up(self, n: int) -> Image:\n \"\"\"Crea una imatge nova despla\u00e7ant la imatge cap amunt. (despla\u00e7a cap amunt)\n\nExample: ``Image.HEART_SMALL.shift_up(1)``\n\n:param n: El nombre de files per despla\u00e7ar-se\n:return: The shifted image\"\"\"\n ...\n\n def shift_down(self, n: int) -> Image:\n \"\"\"Crea una imatge nova despla\u00e7ant-la cap avall. (despla\u00e7a cap avall)\n\nExample: ``Image.HEART_SMALL.shift_down(1)``\n\n:param n: El nombre de files per despla\u00e7ar-se\n:return: The shifted image\"\"\"\n ...\n\n def crop(self, x: int, y: int, w: int, h: int) -> Image:\n \"\"\"Crea una imatge nova retallant la imatge. (retalla)\n\nExample: ``Image.HEART.crop(1, 1, 3, 3)``\n\n:param x: La columna de despla\u00e7ament del retall\n:param y: La fila de despla\u00e7ament del retall\n:param w: L'amplada del retall\n:param h: L'al\u00e7\u00e0ria del retall\n:return: The new image\"\"\"\n ...\n\n def copy(self) -> Image:\n \"\"\"Crea una c\u00f2pia exacta de la imatge (c\u00f2pia)\n\nExample: ``Image.HEART.copy()``\n\n:return: The new image\"\"\"\n ...\n\n def invert(self) -> Image:\n \"\"\"Crea una imatge nova invertint la brillantor dels p\u00edxels de la imatge\nfont. (inverteix)\n\nExample: ``Image.SMALL_HEART.invert()``\n\n:return: The new image.\"\"\"\n ...\n\n def fill(self, value: int) -> None:\n \"\"\"Assigna la brillantor de tots els p\u00edxels de la imatge (omple)\n\nExample: ``my_image.fill(5)``\n\n:param value: (valor) La nova brillantor com a nombre entre 0 (fosc) i 9 (brillant).\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 una \u00e0rea d'una altra imatge a aquesta imatge.\n\nExample: ``my_image.blit(Image.HEART, 1, 1, 3, 3, 1, 1)``\n\n:param src: (font) La imatge font\n:param x: Despla\u00e7ament de la columna inicial a la imatge d'origen\n:param y: Despla\u00e7ament de la fila inicial a la imatge d'origen\n:param w: El nombre de columnes a copiar\n:param h: El nombre de files a copiar\n:param xdest: El despla\u00e7ament de columna a modificar en aquesta imatge\n:param ydest: El despla\u00e7ament de fila que cal modificar en aquesta imatge\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 \"\"\"Obt\u00e9 una representaci\u00f3 de cadena compacta de la imatge. (repr - Obt\u00e9 una representaci\u00f3 de cadena compacta de la imatge.)\"\"\"\n ...\n\n def __str__(self) -> str:\n \"\"\"Obt\u00e9 una representaci\u00f3 de cadena llegible de la imatge.\"\"\"\n ...\n\n def __add__(self, other: Image) -> Image:\n \"\"\"Crea una imatge nova afegint els valors de brillantor de les dues\nimatges per a cada p\u00edxel. (afegeix)\n\nExample: ``Image.HEART + Image.HAPPY``\n\n:param other: (altre) La imatge a afegir.\"\"\"\n ...\n\n def __sub__(self, other: Image) -> Image:\n \"\"\"Crea una imatge nova restant els valors de brillantor d'una altra imatge d'aquesta imatge.\n\nExample: ``Image.HEART - Image.HEART_SMALL``\n\n:param other: (altre) La imatge a restar.\"\"\"\n ...\n\n def __mul__(self, n: float) -> Image:\n \"\"\"Crea una imatge nova multiplicant la brillantor de cada p\u00edxel per\n``n``.\n\nExample: ``Image.HEART * 0.5``\n\n:param n: El valor per multiplicar.\"\"\"\n ...\n\n def __truediv__(self, n: float) -> Image:\n \"\"\"Crea una imatge nova dividint la brillantor de cada p\u00edxel per\n``n``.\n\nExample: ``Image.HEART / 2``\n\n:param n: El valor del divisor.\"\"\"\n ...\n\nclass SoundEvent:\n LOUD: SoundEvent\n \"\"\"Representa la transici\u00f3 dels esdeveniments de so, des de ``quiet`` a ``loud`` com picant de mans o cridant. (so fort)\"\"\"\n QUIET: SoundEvent\n \"\"\"Representa la transici\u00f3 dels esdeveniments de so, des de ``loud`` a ``quiet`` com parlant o m\u00fasica de fons. (so fluix)\"\"\"\n\nclass Sound:\n \"\"\"Els sons integrats es poden reproduir mitjan\u00e7ant ``audio.play(Sound.NAME)``. (so)\"\"\"\n GIGGLE: Sound\n \"\"\"So de riure (riure)\"\"\"\n HAPPY: Sound\n \"\"\"So feli\u00e7. (feli\u00e7)\"\"\"\n HELLO: Sound\n \"\"\"So de salutaci\u00f3. (hola)\"\"\"\n MYSTERIOUS: Sound\n \"\"\"So misteri\u00f3s. (misteri\u00f3s)\"\"\"\n SAD: Sound\n \"\"\"So trist. (tristesa)\"\"\"\n SLIDE: Sound\n \"\"\"So lliscant (so lliscant)\"\"\"\n SOARING: Sound\n \"\"\"So creixent. (creixent)\"\"\"\n SPRING: Sound\n \"\"\"So primaveral. (primaveral)\"\"\"\n TWINKLE: Sound\n \"\"\"So de centelleig. (centelleig)\"\"\"\n YAWN: Sound\n \"\"\"So de badall. (badall)\"\"\"", "/typeshed/stdlib/microbit/accelerometer.pyi": "\"\"\"Mesura l'acceleraci\u00f3 de la micro:bit i reconeix els gestos. (acceler\u00f2metre)\"\"\"\nfrom typing import Tuple\n\ndef get_x() -> int:\n \"\"\"Obt\u00e9 la mesura de l'acceleraci\u00f3 a l'eix ``x`` en mili-g. (obt\u00e9 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 \"\"\"Obt\u00e9 la mesura de l'acceleraci\u00f3 a l'eix ``y`` en mili-g. (obt\u00e9 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 \"\"\"Obt\u00e9 la mesura de l'acceleraci\u00f3 a l'eix ``z`` en mili-g. (obt\u00e9 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 \"\"\"Obt\u00e9 les mesures d'acceleraci\u00f3 en tots els eixos alhora com una tupla. (obt\u00e9 valors)\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 \"\"\"Obt\u00e9 la mesura de l'acceleraci\u00f3 de tots els eixos combinats, com un nombre enter positiu. Aquest ser\u00e0 la suma Pitag\u00f2rica dels eixos X, Y i Z. (obt\u00e9 la for\u00e7a)\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 \"\"\"Obt\u00e9 el nom del gest actual. (El gest 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 \"\"\"Comprova si el gest nomenat est\u00e0 actiu actualment.\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: (nom) El nom del gest\n:return: ``True`` if the gesture is active, ``False`` otherwise.\"\"\"\n ...\n\ndef was_gesture(name: str) -> bool:\n \"\"\"Comprova si el gest nomenat ha estat actiu des de l'\u00faltima crida.\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: (nom) El nom del gest\n:return: ``True`` if the gesture was active since the last call, ``False`` otherwise.\"\"\"\n\ndef get_gestures() -> Tuple[str, ...]:\n \"\"\"Retorna una tupla de l'historial de gestos. (obt\u00e9 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 \"\"\"Estableix l'interval de la sensibilitat de l'acceler\u00f2metre, en g (gravetat est\u00e0ndard), al valor m\u00e9s proper acceptat pel maquinari, arrodonit a ``2``, ``4``, o ``8``\n\nExample: ``accelerometer.set_range(8)``\n\n:param value: (valor) Nou interval per a l'acceler\u00f2metre, un nombre enter a ``g``.\"\"\"", "/typeshed/stdlib/microbit/audio.pyi": "\"\"\"Reprodueix sons amb la micro:bit (importa ``audio`` per a la compatibilitat amb V1). (\u00e0udio)\"\"\"\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 \"\"\"Reprodueix un so incorporat, un efecte de s\u00f3 o marcs d'\u00e0udio personalitzats.\n\nExample: ``audio.play(Sound.GIGGLE)``\n\n:param source: (origen) Un objecte de ``Sound`` incorporat com ``Sound.GIGGLE``, un ``SoundEffect`` o una data de mostra com un iterable de ``AudioFrame`` .\n:param wait: (espera) Si ``wait`` \u00e9s ``True``, aquesta funci\u00f3 es bloquejar\u00e0 fins que s'acabi el so.\n:param pin: Es pot utilitzar un argument opcional per especificar el pin de sortida per anul\u00b7lar el valor predeterminat de ``pin0``. Si no vols que es reprodueixi cap so, pots utilitzar ``pin=None``.\n:param return_pin: (retorna el pin) Especifica un pin diferent del connector d'expansi\u00f3 per connectar-lo a un altaveu extern en lloc de posar a terra. Aix\u00f2 s'ignora per a la revisi\u00f3 **V2**.\"\"\"\n\ndef is_playing() -> bool:\n \"\"\"Verifica si s'est\u00e0 reproduint un so. (est\u00e0 reproduint)\n\nExample: ``audio.is_playing()``\n\n:return: ``True`` if audio is playing, otherwise ``False``.\"\"\"\n ...\n\ndef stop() -> None:\n \"\"\"Atura tota la reproducci\u00f3 d'\u00e0udio. (atura)\n\nExample: ``audio.stop()``\"\"\"\n ...\n\nclass SoundEffect:\n \"\"\"Un efecte sonor, compost per un conjunt de par\u00e0metres configurats via el constructor o atributs.\"\"\"\n WAVEFORM_SINE: ClassVar[int]\n \"\"\"Opci\u00f3 d'ona sinusoidal pel par\u00e0metre ``waveform``. (forma d'ona sinusoidal)\"\"\"\n WAVEFORM_SAWTOOTH: ClassVar[int]\n \"\"\"Opci\u00f3 d'ona de dent de serra pel par\u00e0metre ``waveform``. (forma d'ona de dent de serra)\"\"\"\n WAVEFORM_TRIANGLE: ClassVar[int]\n \"\"\"Opci\u00f3 d'ona triangular pel par\u00e0metre ``waveform``. (forma d'ona triangular)\"\"\"\n WAVEFORM_SQUARE: ClassVar[int]\n \"\"\"Opci\u00f3 d'ona quadrada pel par\u00e0metre ``waveform``. (forma d'ona quadrada)\"\"\"\n WAVEFORM_NOISE: ClassVar[int]\n \"\"\"Opci\u00f3 d'ona de soroll pel par\u00e0metre ``waveform``. (forma d'ona de soroll)\"\"\"\n SHAPE_LINEAR: ClassVar[int]\n \"\"\"Opci\u00f3 d'ona lineal pel par\u00e0metre ``shape``. (forma lineal)\"\"\"\n SHAPE_CURVE: ClassVar[int]\n \"\"\"Opci\u00f3 d'interpolaci\u00f3 de corba usada pel par\u00e0metre ``shape``. (forma de corba)\"\"\"\n SHAPE_LOG: ClassVar[int]\n \"\"\"Opci\u00f3 d'interpolaci\u00f3 logar\u00edtmica utilitzada pel par\u00e0metre ``shape``. (forma logar\u00edtmica)\"\"\"\n FX_NONE: ClassVar[int]\n \"\"\"Opci\u00f3 de cap efecte utilitzat pel par\u00e0metre ``fx``. (fx cap)\"\"\"\n FX_TREMOLO: ClassVar[int]\n \"\"\"Opci\u00f3 d'efecte tr\u00e8molo utilitzat pel par\u00e0metre ``fx``. (fx tr\u00e9molo)\"\"\"\n FX_VIBRATO: ClassVar[int]\n \"\"\"Opci\u00f3 d'efecte vibrato utilitzat pel par\u00e0metre ``fx``.\"\"\"\n FX_WARBLE: ClassVar[int]\n \"\"\"Opci\u00f3 d'efecte gorjeu utilitzat pel par\u00e0metre ``fx``. (Efecte gorjeu)\"\"\"\n freq_start: int\n \"\"\"Freq\u00fc\u00e8ncia inicial en Hertz (Hz), un nombre entre ``0`` i ``9999`` (freq\u00fc\u00e8ncia inicial)\"\"\"\n freq_end: int\n \"\"\"Freq\u00fc\u00e8ncia final en Hertz (Hz), un nombre entre ``0`` i ``9999`` (frequ\u00e8ncia final)\"\"\"\n duration: int\n \"\"\"Durada del so en mil\u00b7lisegons, un nombre entre ``0`` and ``9999`` (Durada - duraci\u00f3)\"\"\"\n vol_start: int\n \"\"\"Volum inicial, un nombre entre ``0`` and ``255`` (volum inicial)\"\"\"\n vol_end: int\n \"\"\"Valor del volum final, un nombre entre ``0`` and ``255`` (volum final)\"\"\"\n waveform: int\n \"\"\"Tipus de forma d'ona, un d'aquest valors: ``WAVEFORM_SINE``, ``WAVEFORM_SAWTOOTH``, ``WAVEFORM_TRIANGLE``, ``WAVEFORM_SQUARE``, ``WAVEFORM_NOISE`` (randomly generated noise) (forma d'ona)\"\"\"\n fx: int\n \"\"\"Efecte a afegir al so, un dels seg\u00fcents valors: ``FX_TREMOLO``, ``FX_VIBRATO``, ``FX_WARBLE``, or ``FX_NONE`` (efecte)\"\"\"\n shape: int\n \"\"\"El tipus de corba d'interpolaci\u00f3 entre les freq\u00fc\u00e8ncies inicial i final, diferents formes d'ona tenen diferents r\u00e0tios de canvi en la freq\u00fc\u00e8ncia. Un dels seg\u00fcents valors: ``SHAPE_LINEAR``, ``SHAPE_CURVE``, ``SHAPE_LOG`` (forma)\"\"\"\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 \"\"\"Crea un efecte de so nou. (inicial)\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: (freq\u00fc\u00e8ncia inicial) Freq\u00fc\u00e8ncia inicial en Hertz (Hz), un nombre entre ``0`` i ``9999``.\n:param freq_end: (frequ\u00e8ncia final) Freq\u00fc\u00e8ncia final en Hertz (Hz), un nombre entre ``0`` i ``9999``.\n:param duration: (Durada - duraci\u00f3) Duraci\u00f3 del so en mil\u00b7lisegons, un nombre entre ``0`` i ``9999``.\n:param vol_start: (volum inicial) Valor del volum inicial, un nombre entre ``0`` i ``255``.\n:param vol_end: (volum final) Valor del volum final, un nombre entre ``0`` i ``255``.\n:param waveform: (forma d'ona) Tipus de forma d'ona, un d'aquests valors: ``WAVEFORM_SINE``, ``WAVEFORM_SAWTOOTH``, ``WAVEFORM_TRIANGLE``, ``WAVEFORM_SQUARE``, ``WAVEFORM_NOISE`` (soroll generat aleat\u00f2riament).\n:param fx: (efecte) Efecte a afegir al so, un del seg\u00fcents valors: ``FX_TREMOLO``, ``FX_VIBRATO``, ``FX_WARBLE``, or ``FX_NONE``.\n:param shape: (forma) El tipus de corba d'interpolaci\u00f3 entre les freq\u00fc\u00e8ncies inicial i final, diferents formes d'ona tenen diferents r\u00e0tios de canvi en la freq\u00fc\u00e8ncia. Un dels seg\u00fcents valors: ``SHAPE_LINEAR``, ``SHAPE_CURVE``, ``SHAPE_LOG``\"\"\"\n\n def copy(self) -> SoundEffect:\n \"\"\"Crea una c\u00f2pia d'aquest ``SoundEffect``. (c\u00f2pia)\n\nExample: ``sound_2 = sound_1.copy()``\n\n:return: A copy of the SoundEffect.\"\"\"\n\nclass AudioFrame:\n \"\"\"Un objecte ``AudioFrame`` \u00e9s una llista de 32 mostres cadascuna de les quals \u00e9s un byte sense signar\n(nombre enter entre 0 i 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 \"\"\"Sobreposa les dades d'aquest ``AudioFrame`` amb les dades d'una altra inst\u00e0ncia ``AudioFrame`` . (copia desde)\n\nExample: ``my_frame.copyfrom(source_frame)``\n\n:param other: (altre) ``AudioFrame`` inst\u00e0ncia de la qual copiar les dades.\"\"\"\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 ...", @@ -45,7 +45,7 @@ "/typeshed/stdlib/microbit/speaker.pyi": "\"\"\"Controla l'altaveu integrat (nom\u00e9s V2). (altaveu)\"\"\"\n\ndef off() -> None:\n \"\"\"Apaga l'altaveu.\n\nExample: ``speaker.off()``\n\nThis does not disable sound output to an edge connector pin.\"\"\"\n ...\n\ndef on() -> None:\n \"\"\"Enc\u00e9n l'altaveu.\n\nExample: ``speaker.on()``\"\"\"\n ...", "/typeshed/stdlib/microbit/spi.pyi": "\"\"\"Comunica amb dispositius mitjan\u00e7ant el bus d'interf\u00edcie perif\u00e8rica s\u00e8rie (SPI).\"\"\"\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 \"\"\"Inicialitzar la comunicaci\u00f3 SPI.\n\nExample: ``spi.init()``\n\nFor correct communication, the parameters have to be the same on both communicating devices.\n\n:param baudrate: (Velocitat de bauds) La velocitat de comunicaci\u00f3.\n:param bits: L'amplada en bits de cada transfer\u00e8ncia. Actualment nom\u00e9s ``bits=8`` \u00e9s acceptada . Tot i que aix\u00f2 pot canviar en el futur\n:param mode: Determina la combinaci\u00f3 de polaritat i fase del rellotge: `consulta la taula en l\u00ednia `_.\n:param sclk: pin sclk (per defecte 13)\n:param mosi: mosi pin (per defecte 15)\n:param miso: miso pin (per defecte 14)\"\"\"\n ...\n\ndef read(nbytes: int) -> bytes:\n \"\"\"Llegeix bytes (llegeix)\n\nExample: ``spi.read(64)``\n\n:param nbytes: Nombre m\u00e0xim de bytes per llegir.\n:return: The bytes read.\"\"\"\n ...\n\ndef write(buffer: ReadableBuffer) -> None:\n \"\"\"Escriu bytes al bus. (escriu)\n\nExample: ``spi.write(bytes([1, 2, 3]))``\n\n:param buffer: (mem\u00f2ria interm\u00e8dia) Una mem\u00f2ria interm\u00e8dia per a llegir dades.\"\"\"\n ...\n\ndef write_readinto(out: WriteableBuffer, in_: ReadableBuffer) -> None:\n \"\"\"Escriu la mem\u00f2ria interm\u00e8dia ``out`` al bus i llegeix qualsevol resposta a la mem\u00f2ria interm\u00e8dia ``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: La mem\u00f2ria interm\u00e8dia per a escriure qualsevol resposta.\n:param in_: La mem\u00f2ria interm\u00e8dia per a llegir dades.\"\"\"\n ...", "/typeshed/stdlib/microbit/uart.pyi": "\"\"\"Comunica amb un dispositiu mitjan\u00e7ant una interf\u00edcie s\u00e8rie.\"\"\"\nfrom _typeshed import WriteableBuffer\nfrom ..microbit import MicroBitDigitalPin\nfrom typing import Optional, Union\nODD: int\n\"\"\"Paritat senar (senar)\"\"\"\nEVEN: int\n\"\"\"Paritat parella (parell)\"\"\"\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 \"\"\"Inicialitzar la comunicaci\u00f3 en s\u00e8rie.\n\nExample: ``uart.init(115200, tx=pin0, rx=pin1)``\n\n:param baudrate: (Velocitat de bauds) La velocitat de comunicaci\u00f3.\n:param bits: La mida dels bytes que es transmeten. micro:bit nom\u00e9s n'admet 8.\n:param parity: (paritat) Com es verifica la paritat, ``None``, ``uart.ODD`` o ``uart.EVEN``.\n:param stop: (atura) El nombre de bits de parada ha de ser 1 per micro:bit.\n:param tx: Pin transmissor.\n:param rx: Receiving pin.\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 \"\"\"Verifica si hi ha alguna data esperant.\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 \"\"\"Llegeix bytes (llegeix)\n\nExample: ``uart.read()``\n\n:param nbytes: Si s'especifica ``nbytes``, llegeix com a m\u00e0xim tants bytes, en cas contrari llegeix tants bytes com sigui possible\n:return: A bytes object or ``None`` on timeout\"\"\"\n ...\n\ndef readinto(buf: WriteableBuffer, nbytes: Optional[int]=None) -> Optional[int]:\n \"\"\"Llegeix bytes al ``buf``.\n\nExample: ``uart.readinto(input_buffer)``\n\n:param buf: La mem\u00f2ria interm\u00e8dia a on escriure.\n:param nbytes: Si s'especifica ``nbytes``, llegeix com a m\u00e0xim aquests bytes, en cas contrari llegeix ``len(buf)`` bytes.\n:return: number of bytes read and stored into ``buf`` or ``None`` on timeout.\"\"\"\n ...\n\ndef readline() -> Optional[bytes]:\n \"\"\"Llegir una l\u00ednia que acaba en un car\u00e0cter de nova l\u00ednia.\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 \"\"\"Escriu una mem\u00f2ria interm\u00e8dia al bus (escriu)\n\nExample: ``uart.write('hello world')``\n\n:param buf: Un objecte 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/_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", "/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.de.json b/src/micropython/main/typeshed.de.json index 888956490..713598273 100644 --- a/src/micropython/main/typeshed.de.json +++ b/src/micropython/main/typeshed.de.json @@ -34,7 +34,7 @@ "/typeshed/stdlib/ustruct.pyi": "from struct import *\n", "/typeshed/stdlib/usys.pyi": "from sys import *\n", "/typeshed/stdlib/utime.pyi": "from time import *\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/_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/microbit/__init__.pyi": "\"\"\"Pins, Bilder, T\u00f6ne, Temperatur und Lautst\u00e4rke.\"\"\"\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 \"\"\"Plant die Ausf\u00fchrung einer Funktion in dem durch die Zeitargumente festgelegten Intervall **nur V2**.\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: Funktion, die in dem angegebenen Intervall aufgerufen wird. Bei Verwendung als Dekorator weglassen.\n:param days: (tage) Legt den Tag f\u00fcr die Planung fest.\n:param h: Legt die Uhrzeit f\u00fcr die Planung fest.\n:param min: Legt die Minute f\u00fcr die Planung fest.\n:param s: Legt die Sekunde f\u00fcr die Planung fest.\n:param ms: Legt die Millisekunde f\u00fcr die Planung fest.\"\"\"\n\ndef panic(n: int) -> None:\n \"\"\"In einen Panik-Modus gehen.\n\nExample: ``panic(127)``\n\n:param n: Eine beliebige ganze Zahl <= 255, um einen Status anzugeben.\n\nRequires restart.\"\"\"\n\ndef reset() -> None:\n \"\"\"Board neu starten.\"\"\"\n\n@overload\ndef scale(value: float, from_: Tuple[float, float], to: Tuple[int, int]) -> int:\n \"\"\"Konvertiert einen Wert aus einem Bereich in einen Ganzzahlenbereich.\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: (wert) Eine umzurechnende Zahl.\n:param from_: Ein Tupel, das den Bereich definiert, aus dem konvertiert werden soll.\n:param to: Ein Tupel, das den Bereich definiert, in den konvertiert werden soll.\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 \"\"\"Konvertiert einen Wert von einem Bereich in einen Gleitkommabereich.\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: (wert) Eine umzurechnende Zahl.\n:param from_: Ein Tupel, das den Bereich definiert, aus dem konvertiert werden soll.\n:param to: Ein Tupel, das den Bereich definiert, in den konvertiert werden soll.\n:return: The ``value`` converted to the ``to`` range.\"\"\"\n\ndef sleep(n: float) -> None:\n \"\"\"Warte auf ``n`` Millisekunden.\n\nExample: ``sleep(1000)``\n\n:param n: Die Anzahl der zu wartenden Millisekunden\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 \"\"\"Ermittelt die Laufzeit des Boards.\n\n:return: The number of milliseconds since the board was switched on or restarted.\"\"\"\n\ndef temperature() -> int:\n \"\"\"Ermittelt die Temperatur des micro:bit in Grad Celcius.\"\"\"\n\ndef set_volume(v: int) -> None:\n \"\"\"Legt die Lautst\u00e4rke fest.\n\nExample: ``set_volume(127)``\n\n:param v: ein Wert zwischen 0 (niedrig) und 255 (hoch).\n\nOut of range values will be clamped to 0 or 255.\n\n**V2** only.\"\"\"\n ...\n\nclass Button:\n \"\"\"Die Klasse f\u00fcr die Tasten ``button_a`` und ``button_b``.\"\"\"\n\n def is_pressed(self) -> bool:\n \"\"\"\u00dcberpr\u00fcft, ob die Taste gedr\u00fcckt ist.\n\n:return: ``True`` if the specified button ``button`` is pressed, and ``False`` otherwise.\"\"\"\n ...\n\n def was_pressed(self) -> bool:\n \"\"\"\u00dcberpr\u00fcft, ob die Taste seit dem Start des Ger\u00e4ts oder dem letzten Aufruf dieser Methode gedr\u00fcckt wurde.\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 \"\"\"Ermittelt die Gesamtzahl der Tastendr\u00fccke und setzt diese Summe auf Null zur\u00fcck, bevor sie zur\u00fcckgegeben wird.\n\n:return: The number of presses since the device started or the last time this method was called\"\"\"\n ...\nbutton_a: Button\n\"\"\"Das ``Button``-Objekt der linken Taste.\"\"\"\nbutton_b: Button\n\"\"\"Das ``Button``-Objekt der rechten Taste.\"\"\"\n\nclass MicroBitDigitalPin:\n \"\"\"Ein digitaler Pin.\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 \"\"\"Ermittelt den digitalen Wert des Pins.\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 \"\"\"Stellt den digitalen Wert des Pins ein. (digital schreiben)\n\nExample: ``pin0.write_digital(1)``\n\n:param value: (wert) 1, um den Pin zu aktivieren, oder 0, um den Pin zu deaktivieren\"\"\"\n ...\n\n def set_pull(self, value: int) -> None:\n \"\"\"Setze den Status des Pull-Widerstands auf einen von drei m\u00f6glichen Werten: ``PULL_UP``, ``PULL_DOWN`` oder ``NO_PULL``. (setze Pull-Widerstand)\n\nExample: ``pin0.set_pull(pin0.PULL_UP)``\n\n:param value: (wert) Der Status des Pull-Widerstands vom relevanten Pin, z.B. ``pin0.PULL_UP``.\"\"\"\n ...\n\n def get_pull(self) -> int:\n \"\"\"Abrufen des Status des Pull-Widerstands eines Pins. (gib Pull-Widerstand)\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 \"\"\"Gibt den Pin-Modus zur\u00fcck. (gib Pin-Modus)\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 \"\"\"Erzeugt ein PWM-Signal am Pin mit der Einschaltdauer proportional zu ``value``. (analog schreiben)\n\nExample: ``pin0.write_analog(254)``\n\n:param value: (wert) Eine Ganzzahl oder eine Gleitpunktzahl zwischen 0 (0% Einschaltdauer) und 1023 (100% Einschaltdauer).\"\"\"\n\n def set_analog_period(self, period: int) -> None:\n \"\"\"Setzt die Periodendauer des PWM-Signals, das ausgegeben wird, auf ``period`` in Millisekunden. (setze analoge Periodendauer)\n\nExample: ``pin0.set_analog_period(10)``\n\n:param period: (Periodendauer) Der Periodendauer in Millisekunden mit einem Mindestwert von 1ms.\"\"\"\n\n def set_analog_period_microseconds(self, period: int) -> None:\n \"\"\"Setze die Periodendauer f\u00fcr die Ausgabe des PWM-Signals auf ``period`` in Mikrosekunden. (setze analoge Periodendauer)\n\nExample: ``pin0.set_analog_period_microseconds(512)``\n\n:param period: (Periodendauer) Die Periodendauer in Mikrosekunden mit einem Mindestwert von 256\u03bcs.\"\"\"\n\nclass MicroBitAnalogDigitalPin(MicroBitDigitalPin):\n \"\"\"Ein Pin, der analogen und digitalen Signale erlaubt.\"\"\"\n\n def read_analog(self) -> int:\n \"\"\"Einlesen der Spannung, die am Pin anliegt. (analog lesen)\n\nExample: ``pin0.read_analog()``\n\n:return: An integer between 0 (meaning 0V) and 1023 (meaning 3.3V).\"\"\"\n\nclass MicroBitTouchPin(MicroBitAnalogDigitalPin):\n \"\"\"Ein Pin mit analogen, digitalen und Touchfunktionen.\"\"\"\n CAPACITIVE: int\n RESISTIVE: int\n\n def is_touched(self) -> bool:\n \"\"\"\u00dcberpr\u00fcft, ob der Pin ber\u00fchrt wird. (wird ber\u00fchrt)\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 \"\"\"Legt den Touchmodus f\u00fcr den Pin fest. (definiert Ber\u00fchrungsmodus)\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: (wert) ``CAPACITIVE`` oder ``RESISTIVE`` Touchmodus des entsprechenden Pins.\"\"\"\n ...\npin0: MicroBitTouchPin\n\"\"\"Pin mit digitalen, analogen und Touchfunktionen.\"\"\"\npin1: MicroBitTouchPin\n\"\"\"Pin mit digitalen, analogen und Touchfunktionen.\"\"\"\npin2: MicroBitTouchPin\n\"\"\"Pin mit digitalen, analogen und Touchfunktionen.\"\"\"\npin3: MicroBitAnalogDigitalPin\n\"\"\"Pin mit digitalen und analogen Funktionen.\"\"\"\npin4: MicroBitAnalogDigitalPin\n\"\"\"Pin mit digitalen und analogen Funktionen.\"\"\"\npin5: MicroBitDigitalPin\n\"\"\"Pin mit Unterst\u00fctzung f\u00fcr digitale Signale.\"\"\"\npin6: MicroBitDigitalPin\n\"\"\"Pin mit Unterst\u00fctzung f\u00fcr digitale Signale.\"\"\"\npin7: MicroBitDigitalPin\n\"\"\"Pin mit digitalen Funktionen.\"\"\"\npin8: MicroBitDigitalPin\n\"\"\"Pin mit digitalen Funktionen.\"\"\"\npin9: MicroBitDigitalPin\n\"\"\"Pin mit digitalen Funktionen.\"\"\"\npin10: MicroBitAnalogDigitalPin\n\"\"\"Pin mit digitalen und analogen Funktionen.\"\"\"\npin11: MicroBitDigitalPin\n\"\"\"Pin mit digitalen Funktionen.\"\"\"\npin12: MicroBitDigitalPin\n\"\"\"Pin mit digitalen Funktionen.\"\"\"\npin13: MicroBitDigitalPin\n\"\"\"Pin mit digitalen Funktionen.\"\"\"\npin14: MicroBitDigitalPin\n\"\"\"Pin mit digitalen Funktionen.\"\"\"\npin15: MicroBitDigitalPin\n\"\"\"Pin mit digitalen Funktionen.\"\"\"\npin16: MicroBitDigitalPin\n\"\"\"Pin mit digitalen Funktionen.\"\"\"\npin19: MicroBitDigitalPin\n\"\"\"Pin mit digitalen Funktionen.\"\"\"\npin20: MicroBitDigitalPin\n\"\"\"Pin mit digitalen Funktionen.\"\"\"\npin_logo: MicroBitTouchPin\n\"\"\"Ein ber\u00fchrungsempfindlicher Logo-Pin auf der Vorderseite des micro:bit, der standardm\u00e4\u00dfig auf den kapazitiven Touch-Modus eingestellt ist.\"\"\"\npin_speaker: MicroBitAnalogDigitalPin\n\"\"\"Ein Pin zur Ansteuerung des micro:bit Lautsprechers.\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 \"\"\"Ein Bild, das auf dem micro:bit LED-Display angezeigt werden soll.\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 \"\"\"Herz-Bild.\"\"\"\n HEART_SMALL: Image\n \"\"\"Kleines Herz-Bild.\"\"\"\n HAPPY: Image\n \"\"\"Gl\u00fcckliches Gesichtsbild.\"\"\"\n SMILE: Image\n \"\"\"L\u00e4chelndes Gesichtsbild.\"\"\"\n SAD: Image\n \"\"\"Trauriges Gesichtsbild.\"\"\"\n CONFUSED: Image\n \"\"\"Verwirrtes Gesichtsbild.\"\"\"\n ANGRY: Image\n \"\"\"W\u00fctendes Gesichtsbild.\"\"\"\n ASLEEP: Image\n \"\"\"Schlafendes Gesichtsbild.\"\"\"\n SURPRISED: Image\n \"\"\"\u00dcberraschtes Gesichtsbild.\"\"\"\n SILLY: Image\n \"\"\"Albernes Gesichtsbild.\"\"\"\n FABULOUS: Image\n \"\"\"Bild mit Sonnenbrillengesicht. (fabelhaft)\"\"\"\n MEH: Image\n \"\"\"Gleichg\u00fcltiges Gesicht Bild.\"\"\"\n YES: Image\n \"\"\"abgehakt-Bild\"\"\"\n NO: Image\n \"\"\"angekreuzt-Bild\"\"\"\n CLOCK12: Image\n \"\"\"Bild mit Linie, die auf 12 Uhr zeigt.\"\"\"\n CLOCK11: Image\n \"\"\"Bild mit Linie, die auf 11 Uhr zeigt.\"\"\"\n CLOCK10: Image\n \"\"\"Bild mit Linie, die auf 10 Uhr zeigt.\"\"\"\n CLOCK9: Image\n \"\"\"Bild mit Linie, die auf 9 Uhr zeigt.\"\"\"\n CLOCK8: Image\n \"\"\"Bild mit Linie, die auf 8 Uhr zeigt.\"\"\"\n CLOCK7: Image\n \"\"\"Bild mit Linie, die auf 7 Uhr zeigt.\"\"\"\n CLOCK6: Image\n \"\"\"Bild mit Linie, die auf 6 Uhr zeigt.\"\"\"\n CLOCK5: Image\n \"\"\"Bild mit Linie, die auf 5 Uhr zeigt.\"\"\"\n CLOCK4: Image\n \"\"\"Bild mit Linie, die auf 4 Uhr zeigt.\"\"\"\n CLOCK3: Image\n \"\"\"Bild mit Linie, die auf 3 Uhr zeigt.\"\"\"\n CLOCK2: Image\n \"\"\"Bild mit Linie, die auf 2 Uhr zeigt.\"\"\"\n CLOCK1: Image\n \"\"\"Bild mit Linie, die auf 1 Uhr zeigt.\"\"\"\n ARROW_N: Image\n \"\"\"Bild eines Pfeils, der nach Norden zeigt.\"\"\"\n ARROW_NE: Image\n \"\"\"Bild eines Pfeils, der nach Nordosten zeigt.\"\"\"\n ARROW_E: Image\n \"\"\"Bild eines Pfeils, der nach Osten zeigt.\"\"\"\n ARROW_SE: Image\n \"\"\"Bild eines Pfeils, der nach S\u00fcdosten zeigt.\"\"\"\n ARROW_S: Image\n \"\"\"Bild eines Pfeils, der nach S\u00fcden zeigt.\"\"\"\n ARROW_SW: Image\n \"\"\"Bild eines Pfeils, der nach S\u00fcdwesten zeigt.\"\"\"\n ARROW_W: Image\n \"\"\"Bild eines Pfeils, der nach Westen zeigt.\"\"\"\n ARROW_NW: Image\n \"\"\"Bild eines Pfeils, der nach Nordwesten zeigt.\"\"\"\n TRIANGLE: Image\n \"\"\"Bild eines Dreiecks, das nach oben zeigt.\"\"\"\n TRIANGLE_LEFT: Image\n \"\"\"Bild eines Dreiecks in der linken Ecke.\"\"\"\n CHESSBOARD: Image\n \"\"\"Abwechselnd leuchtende LEDs in einem Schachbrettmuster.\"\"\"\n DIAMOND: Image\n \"\"\"Diamant-Bild.\"\"\"\n DIAMOND_SMALL: Image\n \"\"\"Kleines Diamant-Bild.\"\"\"\n SQUARE: Image\n \"\"\"Quadrat-Bild\"\"\"\n SQUARE_SMALL: Image\n \"\"\"Kleines Quadrat-Bild.\"\"\"\n RABBIT: Image\n \"\"\"Kaninchen-Bild.\"\"\"\n COW: Image\n \"\"\"Kuh-Bild.\"\"\"\n MUSIC_CROTCHET: Image\n \"\"\"Viertelnoten-Bild.\"\"\"\n MUSIC_QUAVER: Image\n \"\"\"Achtelnoten-Bild.\"\"\"\n MUSIC_QUAVERS: Image\n \"\"\"Achtelnotenpaar-Bild.\"\"\"\n PITCHFORK: Image\n \"\"\"Heugabel-Bild\"\"\"\n XMAS: Image\n \"\"\"Weihnachtsbaum-Bild.\"\"\"\n PACMAN: Image\n \"\"\"Pac-Man Spielfigurenbild.\"\"\"\n TARGET: Image\n \"\"\"Ziel-Bild\"\"\"\n TSHIRT: Image\n \"\"\"T-Shirt-Bild.\"\"\"\n ROLLERSKATE: Image\n \"\"\"Rollerskate-Bild.\"\"\"\n DUCK: Image\n \"\"\"Ente-Bild\"\"\"\n HOUSE: Image\n \"\"\"Haus-Bild\"\"\"\n TORTOISE: Image\n \"\"\"Schildkr\u00f6te-Bild\"\"\"\n BUTTERFLY: Image\n \"\"\"Schmetterling-Bild.\"\"\"\n STICKFIGURE: Image\n \"\"\"Strichm\u00e4nnchen-Bild.\"\"\"\n GHOST: Image\n \"\"\"Geist-Bild.\"\"\"\n SWORD: Image\n \"\"\"Schwert-Bild\"\"\"\n GIRAFFE: Image\n \"\"\"Giraffe-Bild.\"\"\"\n SKULL: Image\n \"\"\"Sch\u00e4del-Bild.\"\"\"\n UMBRELLA: Image\n \"\"\"Bild eines Schirms.\"\"\"\n SNAKE: Image\n \"\"\"Bild einer Schlange. (Schlange)\"\"\"\n SCISSORS: Image\n \"\"\"BIld einer Schere. (Schere)\"\"\"\n ALL_CLOCKS: List[Image]\n \"\"\"Eine Liste mit allen CLOCK_ Bildern. (alle Uhren)\"\"\"\n ALL_ARROWS: List[Image]\n \"\"\"Eine Liste mit allen ARROW_ Bildern. (alle Pfeile)\"\"\"\n\n @overload\n def __init__(self, string: str) -> None:\n \"\"\"Erstellen Sie ein Bild aus einer Zeichenkette, die beschreibt, welche LEDs leuchten.\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: (Zeichenkette) Eine Zeichenkette, die das Bild beschreibt.\"\"\"\n ...\n\n @overload\n def __init__(self, width: int=5, height: int=5, buffer: ReadableBuffer=None) -> None:\n \"\"\"Erstelle ein leeres Bild mit ``width`` Spalten und ``height`` Zeilen.\n\n:param width: (Breite) Optionale Breite des Bildes\n:param height: (H\u00f6he) Optionale H\u00f6he des Bildes\n:param buffer: (Puffer) Optionales Array oder Bytes von ``width``\u00d7``height`` Ganzzahlen im Bereich 0-9 um das Bild zu initialisieren\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 \"\"\"Ermittelt die Anzahl der Spalten. (Breite)\n\n:return: The number of columns in the image\"\"\"\n ...\n\n def height(self) -> int:\n \"\"\"Ermittelt die Anzahl der Zeilen. (H\u00f6he)\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 \"\"\"Legt die Helligkeit eines Pixels fest. (Pixelwerte setzen)\n\nExample: ``my_image.set_pixel(0, 0, 9)``\n\n:param x: Die Spaltennummer\n:param y: Die Zeilennummer\n:param value: (wert) Die Helligkeit als Ganzzahl zwischen 0 (dunkel) und 9 (hell)\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 \"\"\"Ermittle die Helligkeit eines Pixels. (Pixelwerte holen)\n\nExample: ``my_image.get_pixel(0, 0)``\n\n:param x: Die Spaltennummer\n:param y: Die Zeilennummer\n:return: The brightness as an integer between 0 and 9.\"\"\"\n ...\n\n def shift_left(self, n: int) -> Image:\n \"\"\"Erstellen Sie ein neues Bild, indem Sie das Bild nach links verschieben. (links verschieben)\n\nExample: ``Image.HEART_SMALL.shift_left(1)``\n\n:param n: Die Anzahl der Spalten um die verschoben wird\n:return: The shifted image\"\"\"\n ...\n\n def shift_right(self, n: int) -> Image:\n \"\"\"Erstellen Sie ein neues Bild, indem Sie das Bild nach rechts verschieben. (rechts verschieben)\n\nExample: ``Image.HEART_SMALL.shift_right(1)``\n\n:param n: Die Anzahl der Spalten um die verschoben wird\n:return: The shifted image\"\"\"\n ...\n\n def shift_up(self, n: int) -> Image:\n \"\"\"Erstellen Sie ein neues Bild, indem Sie das Bild nach oben verschoben wird. (nach oben verschieben)\n\nExample: ``Image.HEART_SMALL.shift_up(1)``\n\n:param n: Die Anzahl der Zeilen um die verschoben wird\n:return: The shifted image\"\"\"\n ...\n\n def shift_down(self, n: int) -> Image:\n \"\"\"Erstellen Sie ein neues Bild, indem Sie das Bild nach unten verschoben wird. (nach unten verschieben)\n\nExample: ``Image.HEART_SMALL.shift_down(1)``\n\n:param n: Die Anzahl der Zeilen um die verschoben wird\n:return: The shifted image\"\"\"\n ...\n\n def crop(self, x: int, y: int, w: int, h: int) -> Image:\n \"\"\"Erstellen Sie ein neues Bild, indem das Bild zugeschnitten wird.\n\nExample: ``Image.HEART.crop(1, 1, 3, 3)``\n\n:param x: Die Offset-Spalte des Zuschneidens\n:param y: Die Offset-Zeile des Zuschneidens\n:param w: Die Zuschneide-Breite\n:param h: Die Zuschneide-H\u00f6he\n:return: The new image\"\"\"\n ...\n\n def copy(self) -> Image:\n \"\"\"Erstellt eine exakte Kopie des Bildes. (kopieren)\n\nExample: ``Image.HEART.copy()``\n\n:return: The new image\"\"\"\n ...\n\n def invert(self) -> Image:\n \"\"\"Erstellt ein neues Bild, indem es die Helligkeit der Pixel des Ausgangsbildes invertiert.\n\nExample: ``Image.SMALL_HEART.invert()``\n\n:return: The new image.\"\"\"\n ...\n\n def fill(self, value: int) -> None:\n \"\"\"Legt die Helligkeit f\u00fcr alle Pixel des Bildes fest.\n\nExample: ``my_image.fill(5)``\n\n:param value: Die neue Helligkeit als Zahl zwischen 0 (dunkel) und 9 (hell).\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 \"\"\"Kopiert einen Bereich aus einem anderen Bild in dieses Bild.\n\nExample: ``my_image.blit(Image.HEART, 1, 1, 3, 3, 1, 1)``\n\n:param src: Das Ausgangsbild\n:param x: Der Anfangsspalten-Offset im Ausgangsbild\n:param y: Der Anfangszeilen-Offset im Ausgangsbild\n:param w: Die Anzahl der zu kopierenden Spalten\n:param h: Die Anzahl der zu kopierenden Zeilen\n:param xdest: Der Spalten-Offset, der in diesem Bild ge\u00e4ndert werden soll\n:param ydest: Der Zeilen-Offset, der in diesem Bild ge\u00e4ndert werden soll\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 \"\"\"Liefert eine kompakte Stringrepr\u00e4sentation des Bildes.\"\"\"\n ...\n\n def __str__(self) -> str:\n \"\"\"Liefert eine lesbare String-Repr\u00e4sentation des Bildes.\"\"\"\n ...\n\n def __add__(self, other: Image) -> Image:\n \"\"\"Erstellt ein neues Bild, indem f\u00fcr jedes Pixel die Helligkeitswerte der beiden Bilder addiert werden.\n\nExample: ``Image.HEART + Image.HAPPY``\n\n:param other: Das zu addierende Bild.\"\"\"\n ...\n\n def __sub__(self, other: Image) -> Image:\n \"\"\"Erstellt ein neues Bild, indem f\u00fcr jedes Pixel die Helligkeitswerte der beiden Bilder subtrahiert werden.\n\nExample: ``Image.HEART - Image.HEART_SMALL``\n\n:param other: Das zu subtrahierende Bild.\"\"\"\n ...\n\n def __mul__(self, n: float) -> Image:\n \"\"\"Erstellt ein neues Bild, indem der Helligkeitswert jedes Pixels mit ``n`` multipliziert wird.\n\nExample: ``Image.HEART * 0.5``\n\n:param n: Der Wert, mit dem multipliziert werden soll.\"\"\"\n ...\n\n def __truediv__(self, n: float) -> Image:\n \"\"\"Erstellt ein neues Bild, indem der Helligkeitswert jedes Pixels durch ``n`` dividiert wird.\n\nExample: ``Image.HEART / 2``\n\n:param n: Der Wert, durch den dividiert werden soll.\"\"\"\n ...\n\nclass SoundEvent:\n LOUD: SoundEvent\n \"\"\"Stellt den \u00dcbergang von Klangereignissen von ``quiet`` auf ``loud`` dar; wie beim Klatschen oder Rufen.\"\"\"\n QUIET: SoundEvent\n \"\"\"Stellt den \u00dcbergang von akustischen Ereignissen, wie Sprechen oder Hintergrundmusik, von ``loud`` zu ``quiet`` dar. (stumm)\"\"\"\n\nclass Sound:\n \"\"\"Die eingebauten Kl\u00e4nge k\u00f6nnen mit ``audio.play(Sound.NAME)`` aufgerufen werden.\"\"\"\n GIGGLE: Sound\n \"\"\"Kichern-Sound.\"\"\"\n HAPPY: Sound\n \"\"\"Happy-Sound.\"\"\"\n HELLO: Sound\n \"\"\"Begr\u00fc\u00dfung-Sound\"\"\"\n MYSTERIOUS: Sound\n \"\"\"Geheimnisvoll-Sound\"\"\"\n SAD: Sound\n \"\"\"Traurig-Sound.\"\"\"\n SLIDE: Sound\n \"\"\"Gleitender Ton.\"\"\"\n SOARING: Sound\n \"\"\"Aufsteigender Klang. (aufsteigend)\"\"\"\n SPRING: Sound\n \"\"\"Springfeder Klang (Sppringfeder)\"\"\"\n TWINKLE: Sound\n \"\"\"Funkeln Klang (Funkeln)\"\"\"\n YAWN: Sound\n \"\"\"G\u00e4hnen Klang\"\"\"", "/typeshed/stdlib/microbit/accelerometer.pyi": "\"\"\"Messen Sie die Beschleunigung des micro:bit und erkennen Sie Gesten. (Beschleunigungssensor)\"\"\"\nfrom typing import Tuple\n\ndef get_x() -> int:\n \"\"\"Erhalte die Beschleunigungsmessung in der ``x`` -Achse in Milli-g. (erhalte 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 \"\"\"Erhalte die Beschleunigungsmessung in der ``y`` -Achse in Milli-g. (erhalte 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 \"\"\"Erhalte die Beschleunigungsmessung in der ``z`` -Achse in Milli-g. (erhalte 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 \"\"\"Erhalten Sie die Beschleunigungsmessungen in allen Achsen auf einmal als Tupel. (Werte erhalten)\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 \"\"\"Erhalte die Beschleunigungsmessung aller Achsen als positive Ganzzahl. Dies ist die euklidische Summe der X-, Y- und Z-Achsen. (erhalte St\u00e4rke)\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 \"\"\"Erhalte den Namen der aktuellen Geste. (derzeitige Geste)\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 \"\"\"\u00dcberpr\u00fcft, ob die benannte Geste derzeit aktiv ist. (ist Geste)\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: Der Name der Geste.\n:return: ``True`` if the gesture is active, ``False`` otherwise.\"\"\"\n ...\n\ndef was_gesture(name: str) -> bool:\n \"\"\"\u00dcberpr\u00fcft, ob die benannte Geste seit dem letzten Aufruf aktiv war. (war Geste)\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: Der Name der Geste.\n:return: ``True`` if the gesture was active since the last call, ``False`` otherwise.\"\"\"\n\ndef get_gestures() -> Tuple[str, ...]:\n \"\"\"Gibt ein Tupel der vergangenen Gesten zur\u00fcck. (erhalte Gesten)\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 \"\"\"Legen Sie den Bereich des Beschleunigungsmessers in g (Fallbeschleunigung) auf den n\u00e4chstgelegenen Wert fest, welcher von der Hardware unterst\u00fctzt wird. Diese sind ``2``, ``4``oder ``8`` g. (Bereich einstellen)\n\nExample: ``accelerometer.set_range(8)``\n\n:param value: (wert) Neuer Bereich f\u00fcr den Beschleunigungssensor, eine Ganzzahl in ``g``.\"\"\"", "/typeshed/stdlib/microbit/audio.pyi": "\"\"\"T\u00f6ne mit dem micro:bit abspielen (Importiere ``audio`` f\u00fcr V1-Kompatibilit\u00e4t). (Audio)\"\"\"\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 \"\"\"Wiedergeben eines eingebauten Sounds, Soundeffekts oder benutzerdefinierten Aufnahme .\n\nExample: ``audio.play(Sound.GIGGLE)``\n\n:param source: (Quelle) Ein eingebauter ``Sound`` wie ``Sound.GIGGLE``, ein ``SoundEffect`` oder Beispieldaten als Teil eines ``AudioFrame`` Objekts.\n:param wait: Wenn ``wait`` ``True`` ist, wird diese Funktion blockiert, bis der Klang abgeschlossen ist.\n:param pin: Ein optionales Argument f\u00fcr den Ausgabepin kann angegeben werden, um die Standardeinstellung von ``pin0``zu \u00fcberschreiben. Wenn kein Ton wiedergegeben werden soll, kann ``pin=None`` verwendet werden.\n:param return_pin: (erhalte Pin) Bestimmt einen Pin, mit dem der externen Lautsprecher anstatt mit Ground verbunden wird. Dies wird bei der **V2** Revision ignoriert.\"\"\"\n\ndef is_playing() -> bool:\n \"\"\"\u00dcberpr\u00fcfen Sie, ob ein Ton abgespielt wird. (spielt gerade)\n\nExample: ``audio.is_playing()``\n\n:return: ``True`` if audio is playing, otherwise ``False``.\"\"\"\n ...\n\ndef stop() -> None:\n \"\"\"Stoppe jede Audio-Wiedergabe. (Stop)\n\nExample: ``audio.stop()``\"\"\"\n ...\n\nclass SoundEffect:\n \"\"\"Ein Soundeffekt, zusammengestellt aus einer Reihe von Parametern, die \u00fcber den Konstruktor oder durch Attribute konfiguriert werden.\"\"\"\n WAVEFORM_SINE: ClassVar[int]\n \"\"\"Sinuswelle als Parameter f\u00fcr ``waveform``. (Sinuswelle)\"\"\"\n WAVEFORM_SAWTOOTH: ClassVar[int]\n \"\"\"S\u00e4gezahnkurve als Parameter f\u00fcr ``waveform``. (S\u00e4gezahnkurve)\"\"\"\n WAVEFORM_TRIANGLE: ClassVar[int]\n \"\"\"Dreiecksignal als Parameter f\u00fcr ``waveform``. (Dreiecksignal)\"\"\"\n WAVEFORM_SQUARE: ClassVar[int]\n \"\"\"Rechtecksignal als Parameter f\u00fcr ``waveform``. (Rechtecksignal)\"\"\"\n WAVEFORM_NOISE: ClassVar[int]\n \"\"\"Rauschsignal als Parameter f\u00fcr ``waveform``. (Rauschsignal)\"\"\"\n SHAPE_LINEAR: ClassVar[int]\n \"\"\"Lineare Interpolation als Parameter f\u00fcr ``shape``. (lineare Interpolation)\"\"\"\n SHAPE_CURVE: ClassVar[int]\n \"\"\"Kurven-Interpolation als Parameter f\u00fcr ``shape``. (geschwungene Kurve)\"\"\"\n SHAPE_LOG: ClassVar[int]\n \"\"\"Logarithmische Interpolation als Parameter f\u00fcr ``shape``. (logarithmische Interpolation)\"\"\"\n FX_NONE: ClassVar[int]\n \"\"\"Kein Effekt f\u00fcr ``fx`` verwendet. (kein fx)\"\"\"\n FX_TREMOLO: ClassVar[int]\n \"\"\"Tremelo-Effekt als Parameter f\u00fcr ``fx``. (fx Tremolo)\"\"\"\n FX_VIBRATO: ClassVar[int]\n \"\"\"Vibrato-Effekt als Parameter f\u00fcr ``fx``. (fx Vibrato)\"\"\"\n FX_WARBLE: ClassVar[int]\n \"\"\"Triller-Effekt als Parameter f\u00fcr ``fx``. (fx Trillereffekt)\"\"\"\n freq_start: int\n \"\"\"Startfrequenz in Hertz (Hz), eine Zahl zwischen ``0`` und ``9999`` (Startfrequenz)\"\"\"\n freq_end: int\n \"\"\"Endfrequenz in Hertz (Hz), eine Zahl zwischen ``0`` und ``9999`` (Endfrequenz)\"\"\"\n duration: int\n \"\"\"Dauer des Klangs in Millisekunden, eine Zahl zwischen ``0`` und ``9999`` (Dauer)\"\"\"\n vol_start: int\n \"\"\"Startlautst\u00e4rke, eine Zahl zwischen ``0`` und ``255`` (vol Start)\"\"\"\n vol_end: int\n \"\"\"Endlautst\u00e4rke, eine Nummer zwischen ``0`` und ``255`` (vol Ende)\"\"\"\n waveform: int\n \"\"\"Typ der Sinuswelle, einer dieser Werte: ``WAVEFORM_SINE``, ``WAVEFORM_SAWTOOTH``, ``WAVEFORM_TRIANGLE``, ``WAVEFORM_SQUARE``, ``WAVEFORM_NOISE`` (zuf\u00e4llig generiertes Ger\u00e4usch)\"\"\"\n fx: int\n \"\"\"Effekt, der dem Sound hinzugef\u00fcgt werden soll, in Frage kommende Werte: ``FX_TREMOLO``, ``FX_VIBRATO``, ``FX_WARBLE``, oder ``FX_NONE``\"\"\"\n shape: int\n \"\"\"Die Art der Interpolationskurve zwischen der Anfangs- und der Endfrequenz. Verschiedene Wellenformen haben unterschiedliche Frequenz\u00e4nderungsraten. In Frage kommende Werte: ``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 \"\"\"Erstelle einen neuen Soundeffekt.\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: (Startfrequenz) Startfrequenz in Hertz (Hz), eine Zahl zwischen ``0`` und ``9999``.\n:param freq_end: (Endfrequenz) Endfrequenz in Hertz (Hz), eine Zahl zwischen ``0`` und ``9999``.\n:param duration: (Dauer) Dauer des Tons in Millisekunden, eine Zahl zwischen ``0`` und ``9999``.\n:param vol_start: (vol Start) Startlautst\u00e4rke, eine Zahl zwischen ``0`` und ``255``.\n:param vol_end: (vol Ende) Endlautst\u00e4rke, eine Nummer zwischen ``0`` und ``255``.\n:param waveform: Typ der Sinuswelle, einer dieser Werte: ``WAVEFORM_SINE``, ``WAVEFORM_SAWTOOTH``, ``WAVEFORM_TRIANGLE``, ``WAVEFORM_SQUARE``, ``WAVEFORM_NOISE`` (zuf\u00e4llig generiertes Ger\u00e4usch).\n:param fx: Effekt, der dem Sound hinzugef\u00fcgt werden soll, in Frage kommende Werte: ``FX_TREMOLO``, ``FX_VIBRATO``, ``FX_WARBLE``, oder ``FX_NONE``.\n:param shape: Die Art der Interpolationskurve zwischen der Anfangs- und der Endfrequenz. Verschiedene Wellenformen haben unterschiedliche Frequenz\u00e4nderungsraten. In Frage kommende Werte: ``SHAPE_LINEAR``, ``SHAPE_CURVE``, ``SHAPE_LOG``.\"\"\"\n\n def copy(self) -> SoundEffect:\n \"\"\"Erstelle eine Kopie dieses ``SoundEffect``. (kopieren)\n\nExample: ``sound_2 = sound_1.copy()``\n\n:return: A copy of the SoundEffect.\"\"\"\n\nclass AudioFrame:\n \"\"\"Ein ``AudioFrame``-Objekt ist eine Liste von 32 Samples, von denen jedes ein vorzeichenloses Byte ist \n(ganze Zahl zwischen 0 und 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 \"\"\"\u00dcberschreibe die Daten in diesem ``AudioFrame`` mit den Daten einer anderen ``AudioFrame`` Instanz.\n\nExample: ``my_frame.copyfrom(source_frame)``\n\n:param other: ``AudioFrame`` Instanz von der die Daten kopiert werden sollen.\"\"\"\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 ...", @@ -45,7 +45,7 @@ "/typeshed/stdlib/microbit/speaker.pyi": "\"\"\"Steuere den integrierten Lautsprecher (nur V2). (Lautsprecher)\"\"\"\n\ndef off() -> None:\n \"\"\"Lautsprecher ausschalten.\n\nExample: ``speaker.off()``\n\nThis does not disable sound output to an edge connector pin.\"\"\"\n ...\n\ndef on() -> None:\n \"\"\"Lautsprecher einschalten. (an)\n\nExample: ``speaker.on()``\"\"\"\n ...", "/typeshed/stdlib/microbit/spi.pyi": "\"\"\"Kommunikation mit Ger\u00e4ten \u00fcber die serielle Schnittstelle (SPI).\"\"\"\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-Kommunikation initialisieren.\n\nExample: ``spi.init()``\n\nFor correct communication, the parameters have to be the same on both communicating devices.\n\n:param baudrate: Die \u00dcbertragungsgeschwindigkeit.\n:param bits: Die Breite in Bits jeder \u00dcbertragung. Derzeit wird nur ``bits=8`` unterst\u00fctzt. Dies kann sich jedoch in Zukunft \u00e4ndern.\n:param mode: Legt die Kombination aus Taktpolarit\u00e4t und Phase fest - `siehe Online-Tabelle `_.\n:param sclk: SCLK Pin (standardm\u00e4\u00dfig 13)\n:param mosi: MOSI Pin (standardm\u00e4\u00dfig 15)\n:param miso: miso pin (Voreinstellung 14)\"\"\"\n ...\n\ndef read(nbytes: int) -> bytes:\n \"\"\"Bytes lesen.\n\nExample: ``spi.read(64)``\n\n:param nbytes: Maximum der zu lesenden Bytes.\n:return: The bytes read.\"\"\"\n ...\n\ndef write(buffer: ReadableBuffer) -> None:\n \"\"\"Schreibe Bytes auf den Bus. (schreiben)\n\nExample: ``spi.write(bytes([1, 2, 3]))``\n\n:param buffer: (Puffer) Ein Puffer, von dem Daten gelesen werden.\"\"\"\n ...\n\ndef write_readinto(out: WriteableBuffer, in_: ReadableBuffer) -> None:\n \"\"\"Schreibe den ``out`` Zwischenspeicher (Buffer) auf den Bus und lies jede Antwort in den ``in_`` Buffer.\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: Der Puffer, in den eine Antwort geschrieben werden soll.\n:param in_: Der Puffer, von dem Daten gelesen werden.\"\"\"\n ...", "/typeshed/stdlib/microbit/uart.pyi": "\"\"\"Verbindet mit einem Ger\u00e4t \u00fcber eine serielle Schnittstelle.\"\"\"\nfrom _typeshed import WriteableBuffer\nfrom ..microbit import MicroBitDigitalPin\nfrom typing import Optional, Union\nODD: int\n\"\"\"Ungerade Parit\u00e4t\"\"\"\nEVEN: int\n\"\"\"Gerade Parit\u00e4t (gerade)\"\"\"\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 \"\"\"Initialisiere die serielle Kommunikation.\n\nExample: ``uart.init(115200, tx=pin0, rx=pin1)``\n\n:param baudrate: (Baudrate) Die \u00dcbertragungsgeschwindigkeit.\n:param bits: (Bits) Die Gr\u00f6\u00dfe der Bytes die \u00fcbertragen werden. micro:bit unterst\u00fctzt nur 8.\n:param parity: (Parit\u00e4t) Wie Parit\u00e4t gepr\u00fcft wird, ``None``, ``uart.ODD`` oder ``uart.EVEN``.\n:param stop: (Stop) Die Anzahl der Stopbits, muss 1 f\u00fcr micro:bit sein.\n:param tx: Sendepin.\n:param rx: Empfangspin.\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 \"\"\"\u00dcberpr\u00fcfen Sie, ob irgendwelche Daten warten.\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 \"\"\"Bytes lesen.\n\nExample: ``uart.read()``\n\n:param nbytes: Wenn ``nbytes`` angegeben ist, werden h\u00f6chstens so viele Bytes gelesen. Andernfalls werden so viele Bytes wie m\u00f6glich gelesen.\n:return: A bytes object or ``None`` on timeout\"\"\"\n ...\n\ndef readinto(buf: WriteableBuffer, nbytes: Optional[int]=None) -> Optional[int]:\n \"\"\"Lese Bytes in ``buf``.\n\nExample: ``uart.readinto(input_buffer)``\n\n:param buf: Der Puffer, in den geschrieben werden soll.\n:param nbytes: Wenn ``nbytes`` angegeben ist, werden h\u00f6chstens so viele Bytes gelesen. Andernfalls werden ``len(buf)`` Bytes gelesen.\n:return: number of bytes read and stored into ``buf`` or ``None`` on timeout.\"\"\"\n ...\n\ndef readline() -> Optional[bytes]:\n \"\"\"Liest eine Zeile bis zum Zeilenumbruch.\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 \"\"\"Schreibt einen Puffer auf den Bus. (schreiben)\n\nExample: ``uart.write('hello world')``\n\n:param buf: Ein Byte-Objekt oder ein String.\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/_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", "/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.en.json b/src/micropython/main/typeshed.en.json index 19cc9465e..52d3f3a93 100644 --- a/src/micropython/main/typeshed.en.json +++ b/src/micropython/main/typeshed.en.json @@ -5,7 +5,7 @@ "/typeshed/stdlib/antigravity.pyi": "", "/typeshed/stdlib/array.pyi": "from typing import Generic, Iterable, MutableSequence, TypeVar, Union, overload\nfrom typing_extensions import Literal\n\n_IntTypeCode = Literal[\"b\", \"B\", \"h\", \"H\", \"i\", \"I\", \"l\", \"L\", \"q\", \"Q\"]\n_FloatTypeCode = Literal[\"f\", \"d\"]\n_TypeCode = Union[_IntTypeCode, _FloatTypeCode]\n\n_T = TypeVar(\"_T\", int, float)\n\nclass array(MutableSequence[_T], Generic[_T]):\n @overload\n def __init__(\n self: array[int],\n typecode: _IntTypeCode,\n __initializer: Union[bytes, Iterable[_T]] = ...,\n ) -> None: ...\n @overload\n def __init__(\n self: array[float],\n typecode: _FloatTypeCode,\n __initializer: Union[bytes, Iterable[_T]] = ...,\n ) -> None: ...\n @overload\n def __init__(\n self, typecode: str, __initializer: Union[bytes, Iterable[_T]] = ...\n ) -> None: ...\n def append(self, __v: _T) -> None: ...\n def decode(self) -> str: ...\n def extend(self, __bb: Iterable[_T]) -> None: ...\n def __len__(self) -> int: ...\n @overload\n def __getitem__(self, i: int) -> _T: ...\n @overload\n def __getitem__(self, s: slice) -> array[_T]: ...\n @overload # type: ignore # Overrides MutableSequence\n def __setitem__(self, i: int, o: _T) -> None: ...\n @overload\n def __setitem__(self, s: slice, o: array[_T]) -> None: ...\n def __add__(self, x: array[_T]) -> array[_T]: ...\n def __iadd__(self, x: array[_T]) -> array[_T]: ... # type: ignore # Overrides MutableSequence\n\nArrayType = array\n", "/typeshed/stdlib/audio.pyi": "\"\"\"Play sounds using the micro:bit (import ``audio`` for V1 compatibility).\n\"\"\"\n\n# Re-export for V1 compatibility.\nfrom .microbit.audio import (\n is_playing as is_playing,\n play as play,\n stop as stop,\n AudioFrame as AudioFrame,\n SoundEffect as SoundEffect,\n)\n", - "/typeshed/stdlib/builtins.pyi": "\"\"\"Use builtin classes and functions\n\"\"\"\n\nimport 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 \"\"\"The type class.\n \"\"\"\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 \"\"\"Get the type of an object.\n\n Example: ``type(\"hello, world)``\n\n :return: The type of the object passed in.\n \"\"\"\n ...\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 \"\"\"Get an integer from a number or a string.\n \"\"\"\n @overload\n def __new__(\n cls: Type[_T],\n x: str | bytes | SupportsInt | SupportsIndex | _SupportsTrunc = ...,\n ) -> _T:\n \"\"\"Get an integer from a number or a string.\n\n Example: ``int(\"1.2\")``\n\n :return: Zero if no argument is provided, or an ``int`` from a number or string truncated toward zero.\n \"\"\"\n ...\n @overload\n def __new__(\n cls: Type[_T], x: str | bytes | bytearray, base: SupportsIndex\n ) -> _T:\n \"\"\"Get an integer from a number or a string.\n\n Example: ``int(\"8.3\", 2)``\n\n :param base: (default=10) Allowed bases are 0 and 2\u201336.\n :return: Zero if no argument is provided, or an ``int`` from a number or string truncated toward zero.\n \"\"\"\n ...\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 \"\"\"Get a float from a number or a string.\n \"\"\"\n def __new__(\n cls: Type[_T], x: SupportsFloat | SupportsIndex | str | bytes | bytearray = ...\n ) -> _T:\n \"\"\"Convert a string or number to a floating point number, if possible.\n\n Example: ``float(\"1.2\")``\n\n :return: ``0.0`` if no argument is provided, or a ``float`` from a number or string.\n \"\"\"\n ...\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 \"\"\"Get a string version of an object or new empty string.\n \"\"\"\n @overload\n def __new__(cls: Type[_T], object: object = \"\") -> _T:\n \"\"\"Get a string version of an object.\n\n Example: ``string = str(42)``\n \n :param object: (default=\"\") Object to return a string version of.\n :return: A string reprentation of an object.\n \"\"\"\n ...\n @overload\n def __new__(\n cls: Type[_T], object: bytes = b\"\", encoding: str = \"uft-8\", errors: str = \"strict\"\n ) -> _T:\n \"\"\"Get a string version of an object.\n\n Example: ``string = str(42)``\n \n :param object: (default=b\"\") Object to return a string version of as bytes or a bytearray.\n :param encoding: (default=\"uft-8\") Encoding used to decode object.\n :param errors: (default=\"strict\") Something about error handling...\n :return: A string reprentation of an object.\n \"\"\"\n ...\n def count(\n self,\n x: str,\n __start: SupportsIndex | None = ...,\n __end: SupportsIndex | None = ...,\n ) -> int:\n \"\"\"Get the number of non-overlapping occurences of a substring in the string.\n\n The optional ``__start`` and ``__end`` arguments can be used to specify a substring in which to count.\n\n Example: ``count = \"banana\".count(\"na\")``\n \n :param x: The substring to count.\n :param __start: Optional argument to specify the start of the substring in which to count.\n :param __end: Optional argument to specify the end of the substring in which to count.\n :return: The number of non-overlapping occurences of a substring in the string as an ``int``.\n \"\"\"\n ...\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 \"\"\"Check if the string ends with a substring.\n\n The optional ``__start`` and ``__end`` arguments can be used to specify the range to test.\n\n Example: ``ends_with_hello = \"hello, world\".endswith(\"hello\")``\n \n :param __prefix: The prefix to check for.\n :param __start: Optional argument to specify the start of the substring to test.\n :param __end: Optional argument to specify the end of the substring to test.\n :return: ``True`` if the string ends with the substring, otherwise ``False``.\n \"\"\"\n ...\n def find(\n self,\n __sub: str,\n __start: SupportsIndex | None = ...,\n __end: SupportsIndex | None = ...,\n ) -> int:\n \"\"\"Get the lowest index of where the substring is found.\n\n The optional ``__start`` and ``__end`` arguments can be used to specify a substring in which to search.\n\n Example: ``index = \"banana\".find(\"na\")``\n \n :param __sub: The substring to find.\n :param __start: Optional argument to specify the start of the substring in which to search.\n :param __end: Optional argument to specify the end of the substring in which to search.\n :return: The the lowest index of where the substring is found, -1 if not found.\n \"\"\"\n ...\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 \"\"\"Check if all the characters in the string are alphabetical.\n\n Example: ``\"Hello\".isalpha()``\n \n :return: ``True`` if the string is at least one character long and all the characters in the string are alphabetical, otherwise ``False``.\n \"\"\"\n ...\n def isdigit(self) -> bool:\n \"\"\"Check if all the characters in the string are digits.\n\n Example: ``\"123\".isdigit()``\n \n :return: ``True`` if the string is at least one character long and all the characters in the string are digits, otherwise ``False``.\n \"\"\"\n ...\n def islower(self) -> bool:\n \"\"\"Check if all the characters in the string are lower case.\n\n Example: ``\"hello\".islower()``\n \n :return: ``True`` if the string is at least one character long and all the characters in the string are lower case, otherwise ``False``.\n \"\"\"\n ...\n def isspace(self) -> bool:\n \"\"\"Check if all the characters in the string are whitespace characters.\n\n Example: ``\" \".isspace()``\n \n :return: ``True`` if the string is at least one character long and all the characters in the string are whitespace characters, otherwise ``False``.\n \"\"\"\n ...\n def isupper(self) -> bool:\n \"\"\"Check if all the characters in the string are upper case.\n\n Example: ``\"HELLO\".isupper()``\n \n :return: ``True`` if the string is at least one character long and all the characters in the string are upper case, otherwise ``False``.\n \"\"\"\n ...\n def join(self, __iterable: Iterable[str]) -> str: ...\n def lower(self) -> str:\n \"\"\"Get a copy of the string in lower case.\n\n Example: ``as_lower_case = \"HELLO\".lower()``\n \n :return: A copy of the string in lower case.\n \"\"\"\n ...\n def lstrip(self, __chars: str | None = ...) -> str:\n \"\"\"Get a copy of the string with the leading characters removed.\n\n Example: ``stripped = \" hello\".lstrip()``\n \n :param __chars: (default=\" \") The characters to be removed. Defaults to whitespace characters if not provided.\n :return: A copy of the string with the leading characters removed.\n \"\"\"\n ...\n def replace(self, __old: str, __new: str, __count: SupportsIndex = ...) -> str:\n \"\"\"Get a copy of the string with all occurrences of the old substring replaced by new.\n\n Example: ``replaced = \"apple, orange\".replace(\"orange\", \"banana\")``\n \n :param __old: The substring to replace.\n :param __new: The replacement substring.\n :param __count: Optional argument to specify the number of occurences of the old substring that should be replaced.\n :return: A copy of the string with all occurrences of the old substring replaced by new.\n \"\"\"\n ...\n def rfind(\n self,\n __sub: str,\n __start: SupportsIndex | None = ...,\n __end: SupportsIndex | None = ...,\n ) -> int:\n \"\"\"Get the highest index of where the substring is found.\n\n The optional ``__start`` and ``__end`` arguments can be used to specify a substring in which to search.\n\n Example: ``index = \"banana\".rfind(\"na\")``\n\n :param __sub: The substring to find.\n :param __start: Optional argument to specify the start of the substring in which to search.\n :param __end: Optional argument to specify the end of the substring in which to search.\n :return: The the highest index of where the substring is found, -1 if not found.\n \"\"\"\n ...\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 \"\"\"Get a copy of the string with the trailing characters removed.\n\n Example: ``stripped = \"hello \".rstrip()``\n \n :param __chars: (default=\" \") The characters to be removed. Defaults to whitespace characters if not provided.\n :return: A copy of the string with the trailing characters removed.\n \"\"\"\n ...\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 \"\"\"Check if the string starts with a substring.\n\n The optional ``__start`` and ``__end`` arguments can be used to specify the range to test.\n\n Example: ``starts_with_hello = \"hello, world\".startswith(\"hello\")``\n \n :param __prefix: The prefix to check for.\n :param __start: Optional argument to specify the start of the substring to test.\n :param __end: Optional argument to specify the end of the substring to test.\n :return: ``True`` if the string starts with the substring, otherwise ``False``.\n \"\"\"\n ...\n def strip(self, __chars: str | None = ...) -> str:\n \"\"\"Get a copy of the string with the leading and trailing characters removed.\n\n Example: ``stripped = \" hello \".strip()``\n \n :param __chars: (default=\" \") The characters to be removed. Defaults to whitespace characters if not provided.\n :return: A copy of the string with the leading and trailing characters removed.\n \"\"\"\n ...\n def upper(self) -> str:\n \"\"\"Get a copy of the string in upper case.\n\n Example: ``as_upper_case = \"hello\".upper()``\n \n :return: A copy of the string in upper case.\n \"\"\"\n ...\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 frozenset(AbstractSet[_T_co], Generic[_T_co]):\n @overload\n def __new__(cls: type[Self]) -> Self: ...\n @overload\n def __new__(cls: type[Self], __iterable: Iterable[_T_co]) -> Self: ...\n def copy(self) -> FrozenSet[_T_co]: ...\n def difference(self, *s: Iterable[object]) -> FrozenSet[_T_co]: ...\n def intersection(self, *s: Iterable[object]) -> FrozenSet[_T_co]: ...\n def isdisjoint(self, s: Iterable[_T_co]) -> bool: ...\n def issubset(self, s: Iterable[object]) -> bool: ...\n def issuperset(self, s: Iterable[object]) -> bool: ...\n def symmetric_difference(self, s: Iterable[_T_co]) -> FrozenSet[_T_co]: ...\n def union(self, *s: Iterable[_T_co]) -> FrozenSet[_T_co]: ...\n def __len__(self) -> int: ...\n def __contains__(self, o: object) -> bool: ...\n def __iter__(self) -> Iterator[_T_co]: ...\n def __str__(self) -> str: ...\n def __and__(self, s: AbstractSet[_T_co]) -> FrozenSet[_T_co]: ...\n def __or__(self, s: AbstractSet[_S]) -> FrozenSet[_T_co | _S]: ...\n def __sub__(self, s: AbstractSet[_T_co]) -> FrozenSet[_T_co]: ...\n def __xor__(self, s: AbstractSet[_S]) -> FrozenSet[_T_co | _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 if sys.version_info >= (3, 9):\n def __class_getitem__(cls, item: Any) -> GenericAlias: ...\n\nclass list(MutableSequence[_T], Generic[_T]):\n \"\"\"The list data type\n \"\"\"\n @overload\n def __init__(self) -> None: ...\n @overload\n def __init__(self, iterable: Iterable[_T]) -> None: ...\n def clear(self) -> None:\n \"\"\"Remove all items from the list.\n \"\"\"\n ...\n def copy(self) -> list[_T]: ...\n def append(self, __object: _T) -> None:\n \"\"\"Add an item to the end of the list.\n\n Example: ``[1, 2, 3].append(4)``\n \n :param __object: An item to add the end of the list.\n \"\"\"\n ...\n def extend(self, __iterable: Iterable[_T]) -> None: ...\n def pop(self, __index: SupportsIndex = ...) -> _T:\n \"\"\"Remove and return an item from the list.\n\n If no ``index`` is provided, the last item in the list is removed.\n An ``IndexError`` is raised if the ``index`` is outside of the list range.\n\n Example: ``[1, 2, 3, 4].pop()``\n \n :param __index: The index of the item to remove.\n :return: An item from the list.\n \"\"\"\n ...\n def index(\n self, __value: _T, __start: SupportsIndex = ..., __stop: SupportsIndex = ...\n ) -> int: ...\n def count(self, __value: _T) -> int:\n \"\"\"Get the number of times an item appears in the list.\n\n Example: ``[\"a\", \"b\", \"a\"].count(\"a\")``\n \n :param __value: The item to count.\n :return: The number of times an item appears in the list.\n \"\"\"\n ...\n def insert(self, __index: SupportsIndex, __object: _T) -> None:\n \"\"\"Insert an item into the list at a given position.\n\n Example: ``[\"a\", \"b\", \"a\"].insert(2, \"c\")``\n \n :param __index: The position at which to insert the item.\n :param __object: The item to insert.\n \"\"\"\n ...\n def remove(self, __value: _T) -> None:\n \"\"\"Remove the first occurence of a value from the list.\n\n A ``ValueError`` is raised if the ``value`` does not appear in the list.\n\n Example: ``[\"a\", \"b\", \"a\"].remove(\"a\")``\n \n :param __value: The item to remove.\n \"\"\"\n ...\n def reverse(self) -> None:\n \"\"\"Reverses the order of the items in the list, in place.\n\n Example: ``[3, 2, 1].reverse()`\n \"\"\"\n ...\n @overload\n def sort(\n self: list[SupportsLessThanT], *, key: None = None, reverse: bool = False\n ) -> None:\n \"\"\"Sorts the items in the list, in place.\n\n Example: ``[1, 3, 2].sort()`\n\n :param key: A function used to specify the comparison between items in the list.\n :param reverse: A ``bool`` used to reverse the sorting order.\n \"\"\"\n ...\n @overload\n def sort(\n self, *, key: Callable[[_T], SupportsLessThan], reverse: bool = False\n ) -> None:\n \"\"\"Sorts the items in the list, in place.\n\n Example: ``['Watermelon', 'avocado'].sort(str.lower)``\n\n :param key: A function used to specify the comparison between items in the list.\n :param reverse: A ``bool`` used to reverse the sorting order.\n \"\"\"\n ...\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 \"\"\" The range class.\n \"\"\"\n start: int\n stop: int\n step: int\n @overload\n def __init__(self, stop: SupportsIndex) -> None:\n \"\"\"Get a range of values from 0 up tp the stop parameter.\n\n Example: ``rangeTimesTwo = [x * 2 for x in range(5)]``\n \n :param stop: An integer to determine the end of the range (exclusive).\n :return: A range object\n \"\"\"\n ...\n @overload\n def __init__(\n self, start: SupportsIndex, stop: SupportsIndex, step: SupportsIndex = ...\n ) -> None:\n \"\"\"Get a range of values from 0 up tp the stop parameter.\n\n Example: ``rangeTimesTwo = [x * 2 for x in range(1, 11, 2)]``\n \n :param start: (default=0) An integer to determine the start of the range (inclusive).\n :param stop: An integer to determine the end of the range (exclusive).\n :param step: (default=1) The increment for each value in the range.\n :return: A range object\n \"\"\"\n ...\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:\n \"\"\"Get the absolute value of a number.\n\n Example: ``abs(-42)``\n\n :param __x: A number.\n :return: The length of or number of items in an object. \n \"\"\" \n ...\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 \"\"\"Get a Unicode string representation of an integer.\n\n Example: ``chr(97)``\n\n :param __i: An integer within the range 0..1,114,111.\n :return: A Unicode string representation of a number within a valid range. \n \"\"\" \n ...\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(request: object) -> None:\n \"\"\"Starts interactive help or provides help for the request object, if valid.\n\n Example: ``help(\"print\")``\n \"\"\"\n ...\ndef hex(__number: int | SupportsIndex) -> str:\n \"\"\"Get the hexadecimal representation of an integer.\n\n Example: ``hex(42)``\n \n :return: The hexadecimal representation of an integer as a string.\n \"\"\"\n ...\ndef id(__obj: object) -> int: ...\ndef input(prompt: object = \"\") -> str:\n \"\"\"Get user input as a string.\n\n Example: ``prompt(\"Enter your name: \")``\n\n :param prompt: (default=\"\") Text prompt seen by users.\n :return: The length of or number of items in an object.\n \"\"\"\n ...\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:\n \"\"\"Get the length of, or number of items in an object.\n\n Example: ``len(\"Hello, world\")``\n\n :param __obj: A sequence (such as a string, bytes, tuple, list, or range) or a collection (such as a dictionary, set, or frozen set).\n :return: The length of or number of items in an object.\n \"\"\" \n ...\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:\n \"\"\"Get an integer representation of a Unicode character.\n\n Example: ``ord(\"a\")``\n\n :param __c: A Unicode character.\n :return: The length of or number of items in an object.\n \"\"\"\n ...\ndef print(\n *values: object,\n sep: str | None = \" \",\n end: str | None = \"\\n\",\n file: SupportsWrite[str] | None = None,\n flush: bool = False,\n) -> None:\n \"\"\"Prints values to a stream or standard output, typically the serial console.\n\n Example: ``print(\"Hello, world\")``\n\n :param *values: Arguments or literals to print.\n :param sep: (default=\" \") A string separator inserted between values.\n :param end: (default=\"\\n\") A string appended after the last value.\n :param file: (default=None) A file-like object (stream).\n :param flush: (default=False) Whether to forcibly flush the stream.\n \"\"\"\n ...\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 \"\"\"Round a number to the nearest integer.\n\n Example: ``round(42.42)``\n\n :param number: A number to round to the nearest integer.\n :return: Round a number to the nearest integer.\n \"\"\"\n ...\n@overload\ndef round(number: SupportsRound[Any], ndigits: None) -> int:\n \"\"\"Round a number to the nearest integer.\n\n Example: ``round(42.42, None)``\n\n :param number: A number to round to the nearest integer.\n :param ndigits: The number of decimal digits to round to.\n :return: Round a number to the nearest integer.\n \"\"\"\n ...\n@overload\ndef round(number: SupportsRound[_T], ndigits: SupportsIndex) -> _T:\n \"\"\"Round a number to the nearest integer.\n\n Example: ``round(42.42, 1)``\n\n :param number: A number to round to the number of decimal digits specified.\n :param ndigits: The number of decimal digits to round to.\n :return: The input number rounded to the number of decimal digits specified.\n \"\"\"\n ...\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/builtins.pyi": "\"\"\"Built-in classes and functions\n\"\"\"\n\nimport 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 \"\"\"The type class.\n \"\"\"\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 \"\"\"Get the type of an object.\n\n Example: ``type(\"hello, world)``\n\n :return: The type of the object passed in.\n \"\"\"\n ...\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 \"\"\"Get an integer from a number or a string.\n \"\"\"\n @overload\n def __new__(\n cls: Type[_T],\n x: str | bytes | SupportsInt | SupportsIndex | _SupportsTrunc = ...,\n ) -> _T:\n \"\"\"Get an integer from a number or a string.\n\n Example: ``int(\"1.2\")``\n\n :return: Zero if no argument is provided, or an ``int`` from a number or string truncated toward zero.\n \"\"\"\n ...\n @overload\n def __new__(\n cls: Type[_T], x: str | bytes | bytearray, base: SupportsIndex\n ) -> _T:\n \"\"\"Get an integer from a number or a string.\n\n Example: ``int(\"8.3\", 2)``\n\n :param base: (default=10) Allowed bases are 0 and 2\u201336.\n :return: Zero if no argument is provided, or an ``int`` from a number or string truncated toward zero.\n \"\"\"\n ...\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 \"\"\"Get a float from a number or a string.\n \"\"\"\n def __new__(\n cls: Type[_T], x: SupportsFloat | SupportsIndex | str | bytes | bytearray = ...\n ) -> _T:\n \"\"\"Convert a string or number to a floating point number, if possible.\n\n Example: ``float(\"1.2\")``\n\n :return: ``0.0`` if no argument is provided, or a ``float`` from a number or string.\n \"\"\"\n ...\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 \"\"\"Get a string version of an object or new empty string.\n \"\"\"\n @overload\n def __new__(cls: Type[_T], object: object = \"\") -> _T:\n \"\"\"Get a string version of an object.\n\n Example: ``string = str(42)``\n \n :param object: (default=\"\") Object to return a string version of.\n :return: A string reprentation of an object.\n \"\"\"\n ...\n @overload\n def __new__(\n cls: Type[_T], object: bytes = b\"\", encoding: str = \"uft-8\", errors: str = \"strict\"\n ) -> _T:\n \"\"\"Get a string version of an object.\n\n Example: ``string = str(42)``\n \n :param object: (default=b\"\") Object to return a string version of as bytes or a bytearray.\n :param encoding: (default=\"uft-8\") Encoding used to decode object.\n :param errors: (default=\"strict\") Something about error handling...\n :return: A string reprentation of an object.\n \"\"\"\n ...\n def count(\n self,\n x: str,\n start: SupportsIndex | None = ...,\n end: SupportsIndex | None = ...,\n ) -> int:\n \"\"\"Get the number of non-overlapping occurences of a substring in the string.\n\n The optional ``start`` and ``end`` arguments can be used to specify a substring in which to count.\n\n Example: ``count = \"banana\".count(\"na\")``\n \n :param x: The substring to count.\n :param start: Optional argument to specify the start of the substring in which to count.\n :param end: Optional argument to specify the end of the substring in which to count.\n :return: The number of non-overlapping occurences of a substring in the string as an ``int``.\n \"\"\"\n ...\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 \"\"\"Check if the string ends with a substring.\n\n The optional ``start`` and ``end`` arguments can be used to specify the range to test.\n\n Example: ``ends_with_hello = \"hello, world\".endswith(\"hello\")``\n \n :param prefix: The prefix to check for.\n :param start: Optional argument to specify the start of the substring to test.\n :param end: Optional argument to specify the end of the substring to test.\n :return: ``True`` if the string ends with the substring, otherwise ``False``.\n \"\"\"\n ...\n def find(\n self,\n sub: str,\n start: SupportsIndex | None = ...,\n end: SupportsIndex | None = ...,\n ) -> int:\n \"\"\"Get the lowest index of where the substring is found.\n\n The optional ``start`` and ``end`` arguments can be used to specify a substring in which to search.\n\n Example: ``index = \"banana\".find(\"na\")``\n \n :param sub: The substring to find.\n :param start: Optional argument to specify the start of the substring in which to search.\n :param end: Optional argument to specify the end of the substring in which to search.\n :return: The the lowest index of where the substring is found, -1 if not found.\n \"\"\"\n ...\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 \"\"\"Check if all the characters in the string are alphabetical.\n\n Example: ``\"Hello\".isalpha()``\n \n :return: ``True`` if the string is at least one character long and all the characters in the string are alphabetical, otherwise ``False``.\n \"\"\"\n ...\n def isdigit(self) -> bool:\n \"\"\"Check if all the characters in the string are digits.\n\n Example: ``\"123\".isdigit()``\n \n :return: ``True`` if the string is at least one character long and all the characters in the string are digits, otherwise ``False``.\n \"\"\"\n ...\n def islower(self) -> bool:\n \"\"\"Check if all the characters in the string are lower case.\n\n Example: ``\"hello\".islower()``\n \n :return: ``True`` if the string is at least one character long and all the characters in the string are lower case, otherwise ``False``.\n \"\"\"\n ...\n def isspace(self) -> bool:\n \"\"\"Check if all the characters in the string are whitespace characters.\n\n Example: ``\" \".isspace()``\n \n :return: ``True`` if the string is at least one character long and all the characters in the string are whitespace characters, otherwise ``False``.\n \"\"\"\n ...\n def isupper(self) -> bool:\n \"\"\"Check if all the characters in the string are upper case.\n\n Example: ``\"HELLO\".isupper()``\n \n :return: ``True`` if the string is at least one character long and all the characters in the string are upper case, otherwise ``False``.\n \"\"\"\n ...\n def join(self, __iterable: Iterable[str]) -> str: ...\n def lower(self) -> str:\n \"\"\"Get a copy of the string in lower case.\n\n Example: ``as_lower_case = \"HELLO\".lower()``\n \n :return: A copy of the string in lower case.\n \"\"\"\n ...\n def lstrip(self, __chars: str | None = ...) -> str:\n \"\"\"Get a copy of the string with the leading characters removed.\n\n Example: ``stripped = \" hello\".lstrip()``\n \n :param __chars: (default=\" \") The characters to be removed. Defaults to whitespace characters if not provided.\n :return: A copy of the string with the leading characters removed.\n \"\"\"\n ...\n def replace(self, old: str, new: str, count: SupportsIndex = ...) -> str:\n \"\"\"Get a copy of the string with all occurrences of the old substring replaced by new.\n\n Example: ``replaced = \"apple, orange\".replace(\"orange\", \"banana\")``\n \n :param old: The substring to replace.\n :param new: The replacement substring.\n :param count: Optional argument to specify the number of occurences of the old substring that should be replaced.\n :return: A copy of the string with all occurrences of the old substring replaced by new.\n \"\"\"\n ...\n def rfind(\n self,\n sub: str,\n start: SupportsIndex | None = ...,\n end: SupportsIndex | None = ...,\n ) -> int:\n \"\"\"Get the highest index of where the substring is found.\n\n The optional ``start`` and ``end`` arguments can be used to specify a substring in which to search.\n\n Example: ``index = \"banana\".rfind(\"na\")``\n\n :param sub: The substring to find.\n :param start: Optional argument to specify the start of the substring in which to search.\n :param end: Optional argument to specify the end of the substring in which to search.\n :return: The the highest index of where the substring is found, -1 if not found.\n \"\"\"\n ...\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 \"\"\"Get a copy of the string with the trailing characters removed.\n\n Example: ``stripped = \"hello \".rstrip()``\n \n :param __chars: (default=\" \") The characters to be removed. Defaults to whitespace characters if not provided.\n :return: A copy of the string with the trailing characters removed.\n \"\"\"\n ...\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 \"\"\"Check if the string starts with a substring.\n\n The optional ``start`` and ``end`` arguments can be used to specify the range to test.\n\n Example: ``starts_with_hello = \"hello, world\".startswith(\"hello\")``\n \n :param prefix: The prefix to check for.\n :param start: Optional argument to specify the start of the substring to test.\n :param end: Optional argument to specify the end of the substring to test.\n :return: ``True`` if the string starts with the substring, otherwise ``False``.\n \"\"\"\n ...\n def strip(self, chars: str | None = ...) -> str:\n \"\"\"Get a copy of the string with the leading and trailing characters removed.\n\n Example: ``stripped = \" hello \".strip()``\n \n :param chars: (default=\" \") The characters to be removed. Defaults to whitespace characters if not provided.\n :return: A copy of the string with the leading and trailing characters removed.\n \"\"\"\n ...\n def upper(self) -> str:\n \"\"\"Get a copy of the string in upper case.\n\n Example: ``as_upper_case = \"hello\".upper()``\n \n :return: A copy of the string in upper case.\n \"\"\"\n ...\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 frozenset(AbstractSet[_T_co], Generic[_T_co]):\n @overload\n def __new__(cls: type[Self]) -> Self: ...\n @overload\n def __new__(cls: type[Self], __iterable: Iterable[_T_co]) -> Self: ...\n def copy(self) -> FrozenSet[_T_co]: ...\n def difference(self, *s: Iterable[object]) -> FrozenSet[_T_co]: ...\n def intersection(self, *s: Iterable[object]) -> FrozenSet[_T_co]: ...\n def isdisjoint(self, s: Iterable[_T_co]) -> bool: ...\n def issubset(self, s: Iterable[object]) -> bool: ...\n def issuperset(self, s: Iterable[object]) -> bool: ...\n def symmetric_difference(self, s: Iterable[_T_co]) -> FrozenSet[_T_co]: ...\n def union(self, *s: Iterable[_T_co]) -> FrozenSet[_T_co]: ...\n def __len__(self) -> int: ...\n def __contains__(self, o: object) -> bool: ...\n def __iter__(self) -> Iterator[_T_co]: ...\n def __str__(self) -> str: ...\n def __and__(self, s: AbstractSet[_T_co]) -> FrozenSet[_T_co]: ...\n def __or__(self, s: AbstractSet[_S]) -> FrozenSet[_T_co | _S]: ...\n def __sub__(self, s: AbstractSet[_T_co]) -> FrozenSet[_T_co]: ...\n def __xor__(self, s: AbstractSet[_S]) -> FrozenSet[_T_co | _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 if sys.version_info >= (3, 9):\n def __class_getitem__(cls, item: Any) -> GenericAlias: ...\n\nclass list(MutableSequence[_T], Generic[_T]):\n \"\"\"The list data type\n \"\"\"\n @overload\n def __init__(self) -> None: ...\n @overload\n def __init__(self, iterable: Iterable[_T]) -> None: ...\n def clear(self) -> None:\n \"\"\"Remove all items from the list.\n \"\"\"\n ...\n def copy(self) -> list[_T]: ...\n def append(self, object: _T) -> None:\n \"\"\"Add an item to the end of the list.\n\n Example: ``[1, 2, 3].append(4)``\n \n :param object: An item to add the end of the list.\n \"\"\"\n ...\n def extend(self, __iterable: Iterable[_T]) -> None: ...\n def pop(self, index: SupportsIndex = ...) -> _T:\n \"\"\"Remove and return an item from the list.\n\n If no ``index`` is provided, the last item in the list is removed.\n An ``IndexError`` is raised if the ``index`` is outside of the list range.\n\n Example: ``[1, 2, 3, 4].pop()``\n \n :param __index: The index of the item to remove.\n :return: An item from the list.\n \"\"\"\n ...\n def index(\n self, value: _T, start: SupportsIndex = ..., stop: SupportsIndex = ...\n ) -> int: ...\n def count(self, value: _T) -> int:\n \"\"\"Get the number of times an item appears in the list.\n\n Example: ``[\"a\", \"b\", \"a\"].count(\"a\")``\n \n :param value: The item to count.\n :return: The number of times an item appears in the list.\n \"\"\"\n ...\n def insert(self, index: SupportsIndex, object: _T) -> None:\n \"\"\"Insert an item into the list at a given position.\n\n Example: ``[\"a\", \"b\", \"a\"].insert(2, \"c\")``\n \n :param index: The position at which to insert the item.\n :param object: The item to insert.\n \"\"\"\n ...\n def remove(self, value: _T) -> None:\n \"\"\"Remove the first occurence of a value from the list.\n\n A ``ValueError`` is raised if the ``value`` does not appear in the list.\n\n Example: ``[\"a\", \"b\", \"a\"].remove(\"a\")``\n \n :param value: The item to remove.\n \"\"\"\n ...\n def reverse(self) -> None:\n \"\"\"Reverses the order of the items in the list, in place.\n\n Example: ``[3, 2, 1].reverse()`\n \"\"\"\n ...\n @overload\n def sort(\n self: list[SupportsLessThanT], *, key: None = None, reverse: bool = False\n ) -> None:\n \"\"\"Sorts the items in the list, in place.\n\n Example: ``[1, 3, 2].sort()`\n\n :param key: A function used to specify the comparison between items in the list.\n :param reverse: A ``bool`` used to reverse the sorting order.\n \"\"\"\n ...\n @overload\n def sort(\n self, *, key: Callable[[_T], SupportsLessThan], reverse: bool = False\n ) -> None:\n \"\"\"Sorts the items in the list, in place.\n\n Example: ``['Watermelon', 'avocado'].sort(str.lower)``\n\n :param key: A function used to specify the comparison between items in the list.\n :param reverse: A ``bool`` used to reverse the sorting order.\n \"\"\"\n ...\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 \"\"\" The range class.\n \"\"\"\n start: int\n stop: int\n step: int\n @overload\n def __init__(self, stop: SupportsIndex) -> None:\n \"\"\"Get a range of values from 0 up tp the stop parameter.\n\n Example: ``rangeTimesTwo = [x * 2 for x in range(5)]``\n \n :param stop: An integer to determine the end of the range (exclusive).\n :return: A range object\n \"\"\"\n ...\n @overload\n def __init__(\n self, start: SupportsIndex, stop: SupportsIndex, step: SupportsIndex = ...\n ) -> None:\n \"\"\"Get a range of values from 0 up tp the stop parameter.\n\n Example: ``rangeTimesTwo = [x * 2 for x in range(1, 11, 2)]``\n \n :param start: (default=0) An integer to determine the start of the range (inclusive).\n :param stop: An integer to determine the end of the range (exclusive).\n :param step: (default=1) The increment for each value in the range.\n :return: A range object\n \"\"\"\n ...\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:\n \"\"\"Get the absolute value of a number.\n\n Example: ``abs(-42)``\n\n :param x: A number.\n :return: The length of or number of items in an object. \n \"\"\" \n ...\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 \"\"\"Get a Unicode string representation of an integer.\n\n Example: ``chr(97)``\n\n :param i: An integer within the range 0..1,114,111.\n :return: A Unicode string representation of a number within a valid range. \n \"\"\" \n ...\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(request: object) -> None:\n \"\"\"Starts interactive help or provides help for the request object, if valid.\n\n Example: ``help(\"print\")``\n \"\"\"\n ...\ndef hex(number: int | SupportsIndex) -> str:\n \"\"\"Get the hexadecimal representation of an integer.\n\n Example: ``hex(42)``\n \n :return: The hexadecimal representation of an integer as a string.\n \"\"\"\n ...\ndef id(__obj: object) -> int: ...\ndef input(prompt: object = \"\") -> str:\n \"\"\"Get user input as a string.\n\n Example: ``prompt(\"Enter your name: \")``\n\n :param prompt: (default=\"\") Text prompt seen by users.\n :return: The length of or number of items in an object.\n \"\"\"\n ...\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:\n \"\"\"Get the length of, or number of items in an object.\n\n Example: ``len(\"Hello, world\")``\n\n :param __obj: A sequence (such as a string, bytes, tuple, list, or range) or a collection (such as a dictionary, set, or frozen set).\n :return: The length of or number of items in an object.\n \"\"\" \n ...\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:\n \"\"\"Get an integer representation of a Unicode character.\n\n Example: ``ord(\"a\")``\n\n :param c: A Unicode character.\n :return: The length of or number of items in an object.\n \"\"\"\n ...\ndef print(\n *values: object,\n sep: str | None = \" \",\n end: str | None = \"\\n\",\n file: SupportsWrite[str] | None = None,\n flush: bool = False,\n) -> None:\n \"\"\"Prints values to a stream or standard output, typically the serial console.\n\n Example: ``print(\"Hello, world\")``\n\n :param *values: Arguments or literals to print.\n :param sep: (default=\" \") A string separator inserted between values.\n :param end: (default=\"\\n\") A string appended after the last value.\n :param file: (default=None) A file-like object (stream).\n :param flush: (default=False) Whether to forcibly flush the stream.\n \"\"\"\n ...\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 \"\"\"Round a number to the nearest integer.\n\n Example: ``round(42.42)``\n\n :param number: A number to round to the nearest integer.\n :return: Round a number to the nearest integer.\n \"\"\"\n ...\n@overload\ndef round(number: SupportsRound[Any], ndigits: None) -> int:\n \"\"\"Round a number to the nearest integer.\n\n Example: ``round(42.42, None)``\n\n :param number: A number to round to the nearest integer.\n :param ndigits: The number of decimal digits to round to.\n :return: Round a number to the nearest integer.\n \"\"\"\n ...\n@overload\ndef round(number: SupportsRound[_T], ndigits: SupportsIndex) -> _T:\n \"\"\"Round a number to the nearest integer.\n\n Example: ``round(42.42, 1)``\n\n :param number: A number to round to the number of decimal digits specified.\n :param ndigits: The number of decimal digits to round to.\n :return: The input number rounded to the number of decimal digits specified.\n \"\"\"\n ...\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": "\"\"\"Control the garbage collector\"\"\"\n\nfrom typing import overload\n\ndef enable() -> None:\n \"\"\"Enable automatic garbage collection.\"\"\"\n ...\n\ndef disable() -> None:\n \"\"\"Disable automatic garbage collection.\n\n Heap memory can still be allocated,\n and garbage collection can still be initiated manually using ``gc.collect``.\"\"\"\n\ndef collect() -> None:\n \"\"\"Run a garbage collection.\"\"\"\n ...\n\ndef mem_alloc() -> int:\n \"\"\"Get the number of bytes of heap RAM that are allocated.\n\n :return: The number of bytes allocated.\n\n This function is MicroPython extension.\n \"\"\"\n ...\n\ndef mem_free() -> int:\n \"\"\"Get the number of bytes of available heap RAM, or -1 if this amount is not known.\n\n :return: The number of bytes free.\n\n This function is MicroPython extension.\n \"\"\"\n ...\n\n@overload\ndef threshold() -> int:\n \"\"\"Query the additional GC allocation threshold.\n\n :return: The GC allocation threshold.\n\n This function is a MicroPython extension. CPython has a similar\n function - ``set_threshold()``, but due to different GC\n implementations, its signature and semantics are different.\n \"\"\"\n ...\n\n@overload\ndef threshold(amount: int) -> None:\n \"\"\"Set the additional GC allocation threshold.\n\n Normally, a collection is triggered only when a new allocation\n cannot be satisfied, i.e. on an out-of-memory (OOM) condition.\n If this function is called, in addition to OOM, a collection\n will be triggered each time after ``amount`` bytes have been\n allocated (in total, since the previous time such an amount of bytes\n have been allocated). ``amount`` is usually specified as less than the\n full heap size, with the intention to trigger a collection earlier than when the\n heap becomes exhausted, and in the hope that an early collection will prevent\n excessive memory fragmentation. This is a heuristic measure, the effect\n of which will vary from application to application, as well as\n the optimal value of the ``amount`` parameter.\n\n A value of -1 means a disabled allocation threshold.\n\n This function is a MicroPython extension. CPython has a similar\n function - ``set_threshold()``, but due to different GC\n implementations, its signature and semantics are different.\n\n :param amount: The number of bytes after which a garbage collection should be triggered.\n \"\"\"\n ...\n", "/typeshed/stdlib/log.pyi": "\"\"\"Log data to your micro:bit V2.\"\"\"\n\nfrom typing import Literal, Mapping, Optional, Union, overload\n\nMILLISECONDS = 1\n\"\"\"Milliseconds timestamp format.\"\"\"\n\nSECONDS = 10\n\"\"\"Seconds timestamp format.\"\"\"\n\nMINUTES = 600\n\"\"\"Minutes timestamp format.\"\"\"\n\nHOURS = 36000\n\"\"\"Hours timestamp format.\"\"\"\n\nDAYS = 864000\n\"\"\"Days timestamp format.\"\"\"\n\ndef set_labels(\n *labels: str, timestamp: Optional[Literal[1, 10, 36000, 864000]] = SECONDS\n) -> None:\n \"\"\"Set up the log file header.\n\n Example: ``log.set_labels('X', 'Y', 'Z', timestamp=log.MINUTES)``\n\n Ideally this function should be called a single time, before any data is\n logged, to configure the data table header once.\n\n If a log file already exists when the program starts, or if this function\n is called multiple times, it will check the labels already defined in the\n log file. If this function call contains any new labels not already\n present, it will generate a new header row with the additional columns.\n\n By default the first column contains a timestamp for each row. The time\n unit 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: 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\n@overload\ndef add(\n data_dictionary: Optional[Mapping[str, Union[str, int, float]]],\n) -> None:\n \"\"\"Add a data row to the log by passing a dictionary of headers and values.\n\n Example: ``log.add({ 'temp': temperature() })``\n\n Each call to this function adds a row to the log.\n\n New labels not previously specified via the set_labels function, or by a\n previous call to this function, will trigger a new header entry to be added\n to the log with the extra labels.\n\n Labels previously specified and not present in a call to this function will\n be 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\n@overload\ndef add(**kwargs: Union[str, int, float]) -> None:\n \"\"\"Add a data row to the log using keyword arguments.\n\n Example: ``log.add(temp=temperature())``\n\n Each call to this function adds a row to the log.\n\n New labels not previously specified via the set_labels function, or by a\n previous call to this function, will trigger a new header entry to be added\n to the log with the extra labels.\n\n Labels previously specified and not present in a call to this function will\n be skipped with an empty value in the log row.\n \"\"\"\n ...\n\ndef delete(full=False):\n \"\"\"Deletes the contents of the log, including headers.\n\n Example: ``log.delete()``\n\n To add the log headers again the ``set_labels`` function should to be called after this function.\n\n There are two erase modes; \u201cfull\u201d completely removes the data from the physical storage,\n and \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 ...\n\ndef set_mirroring(serial: bool):\n \"\"\"Configure mirroring of the data logging activity to the serial output.\n\n Example: ``log.set_mirroring(True)``\n\n Serial 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 \"\"\"\n ...\n", @@ -34,7 +34,7 @@ "/typeshed/stdlib/ustruct.pyi": "from struct import *\n", "/typeshed/stdlib/usys.pyi": "from sys import *\n", "/typeshed/stdlib/utime.pyi": "from time import *\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/_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/microbit/__init__.pyi": "\"\"\"Pins, images, sounds, temperature and volume.\n\"\"\"\n\nfrom typing import Any, Callable, List, Optional, Tuple, Union, overload\n\nfrom _typeshed import ReadableBuffer\n\n# V2 only\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(\n callback: Optional[Callable[[], None]] = None,\n days: int = 0,\n h: int = 0,\n min: int = 0,\n s: int = 0,\n ms: int = 0,\n) -> Callable[[Callable[[], None]], Callable[[], None]]:\n \"\"\"Schedule to run a function at the interval specified by the time arguments **V2 only**.\n\n Example: ``run_every(my_logging, min=5)``\n\n ``run_every`` can be used in two ways:\n\n As 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\n As 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\n Each argument corresponds to a different time unit and they are additive.\n So ``run_every(min=1, s=30)`` schedules the callback every minute and a half.\n\n When an exception is thrown inside the callback function it deschedules the\n function. 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 \"\"\"\n\ndef panic(n: int) -> None:\n \"\"\"Enter a panic mode.\n\n Example: ``panic(127)``\n\n :param n: An arbitrary integer <= 255 to indicate a status.\n\n Requires restart.\n \"\"\"\n\ndef reset() -> None:\n \"\"\"Restart the board.\"\"\"\n\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\n Example: ``volume = scale(accelerometer.get_x(), from_=(-2000, 2000), to=(0, 255))``\n\n For example, to convert an accelerometer X value to a speaker volume.\n\n If 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\n floating 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\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\n Example: ``temp_fahrenheit = scale(30, from_=(0.0, 100.0), to=(32.0, 212.0))``\n\n For example, to convert temperature from a Celsius scale to Fahrenheit.\n\n If 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\n floating point number.\n If 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 \"\"\"\n\ndef sleep(n: float) -> None:\n \"\"\"Wait for ``n`` milliseconds.\n\n Example: ``sleep(1000)``\n\n :param n: The number of milliseconds to wait\n\n One second is 1000 milliseconds, so::\n\n microbit.sleep(1000)\n\n will pause the execution for one second.\n \"\"\"\n\ndef running_time() -> int:\n \"\"\"Get the running time of the board.\n\n :return: The number of milliseconds since the board was switched on or restarted.\n \"\"\"\n\ndef temperature() -> int:\n \"\"\"Get the temperature of the micro:bit in degrees Celsius.\"\"\"\n\ndef set_volume(v: int) -> None:\n \"\"\"Sets the volume.\n\n Example: ``set_volume(127)``\n\n :param v: a value between 0 (low) and 255 (high).\n\n Out of range values will be clamped to 0 or 255.\n\n **V2** only.\n \"\"\"\n ...\n\nclass Button:\n \"\"\"The class for the buttons ``button_a`` and ``button_b``.\"\"\"\n\n def is_pressed(self) -> bool:\n \"\"\"Check if the button is pressed.\n\n :return: ``True`` if the specified button ``button`` is pressed, and ``False`` otherwise.\n \"\"\"\n ...\n def was_pressed(self) -> bool:\n \"\"\"Check if the button was pressed since the device started or the last time this method was called.\n\n Calling this method will clear the press state so\n that 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 \"\"\"Get the running total of button presses, and resets this total\n to zero before returning.\n\n :return: The number of presses since the device started or the last time this method was called\n \"\"\"\n ...\n\nbutton_a: Button\n\"\"\"The left button ``Button`` object.\"\"\"\n\nbutton_b: Button\n\"\"\"The right button ``Button`` object.\"\"\"\n\nclass MicroBitDigitalPin:\n \"\"\"A digital pin.\n\n Some pins support analog and touch features using the ``MicroBitAnalogDigitalPin`` and ``MicroBitTouchPin`` subclasses.\n \"\"\"\n\n NO_PULL: int\n PULL_UP: int\n PULL_DOWN: int\n def read_digital(self) -> int:\n \"\"\"Get the digital value of the pin.\n\n Example: ``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 \"\"\"Set the digital value of the pin.\n\n Example: ``pin0.write_digital(1)``\n\n :param value: 1 to set the pin high or 0 to set the pin low\"\"\"\n ...\n def set_pull(self, value: int) -> None:\n \"\"\"Set the pull state to one of three possible values: ``PULL_UP``, ``PULL_DOWN`` or ``NO_PULL``.\n\n Example: ``pin0.set_pull(pin0.PULL_UP)``\n\n :param value: The pull state from the relevant pin, e.g. ``pin0.PULL_UP``.\n \"\"\"\n ...\n def get_pull(self) -> int:\n \"\"\"Get the pull state on a pin.\n\n Example: ``pin0.get_pull()``\n\n :return: ``NO_PULL``, ``PULL_DOWN``, or ``PULL_UP``\n\n These are set using the ``set_pull()`` method or automatically configured\n when a pin mode requires it.\n \"\"\"\n ...\n def get_mode(self) -> str:\n \"\"\"Returns the pin mode.\n\n Example: ``pin0.get_mode()``\n\n When a pin is used for a specific function, like\n writing a digital value, or reading an analog value, the pin mode\n changes.\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 \"\"\"Output a PWM signal on the pin, with the duty cycle proportional to ``value``.\n\n Example: ``pin0.write_analog(254)``\n\n :param value: An integer or a floating point number between 0 (0% duty cycle) and 1023 (100% duty).\n \"\"\"\n def set_analog_period(self, period: int) -> None:\n \"\"\"Set the period of the PWM signal being output to ``period`` in milliseconds.\n\n Example: ``pin0.set_analog_period(10)``\n\n :param period: The period in milliseconds with a minimum valid value of 1ms.\n \"\"\"\n def set_analog_period_microseconds(self, period: int) -> None:\n \"\"\"Set the period of the PWM signal being output to ``period`` in microseconds.\n\n Example: ``pin0.set_analog_period_microseconds(512)``\n\n :param period: The period in microseconds with a minimum valid value of 256\u00b5s.\n \"\"\"\n\nclass MicroBitAnalogDigitalPin(MicroBitDigitalPin):\n \"\"\"A pin with analog and digital features.\"\"\"\n\n def read_analog(self) -> int:\n \"\"\"Read the voltage applied to the pin.\n\n Example: ``pin0.read_analog()``\n\n :return: An integer between 0 (meaning 0V) and 1023 (meaning 3.3V).\n \"\"\"\n\nclass MicroBitTouchPin(MicroBitAnalogDigitalPin):\n \"\"\"A pin with analog, digital and touch features.\"\"\"\n\n CAPACITIVE: int\n RESISTIVE: int\n def is_touched(self) -> bool:\n \"\"\"Check if the pin is being touched.\n\n Example: ``pin0.is_touched()``\n\n The default touch mode for the pins on the edge connector is ``resistive``.\n The default for the logo pin **V2** is ``capacitive``.\n\n **Resistive touch**\n This test is done by measuring how much resistance there is between the\n pin and ground. A low resistance gives a reading of ``True``. To get\n a reliable reading using a finger you may need to touch the ground pin\n with another part of your body, for example your other hand.\n\n **Capacitive touch**\n This test is done by interacting with the electric field of a capacitor\n using a finger as a conductor. `Capacitive touch\n `_\n does 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 \"\"\"Set the touch mode for the pin.\n\n Example: ``pin0.set_touch_mode(pin0.CAPACITIVE)``\n\n The 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`` or ``RESISTIVE`` from the relevant pin.\n \"\"\"\n ...\n\npin0: MicroBitTouchPin\n\"\"\"Pin with digital, analog and touch features.\"\"\"\n\npin1: MicroBitTouchPin\n\"\"\"Pin with digital, analog and touch features.\"\"\"\n\npin2: MicroBitTouchPin\n\"\"\"Pin with digital, analog and touch features.\"\"\"\n\npin3: MicroBitAnalogDigitalPin\n\"\"\"Pin with digital and analog features.\"\"\"\n\npin4: MicroBitAnalogDigitalPin\n\"\"\"Pin with digital and analog features.\"\"\"\n\npin5: MicroBitDigitalPin\n\"\"\"Pin with digital features.\"\"\"\n\npin6: MicroBitDigitalPin\n\"\"\"Pin with digital features.\"\"\"\n\npin7: MicroBitDigitalPin\n\"\"\"Pin with digital features.\"\"\"\n\npin8: MicroBitDigitalPin\n\"\"\"Pin with digital features.\"\"\"\n\npin9: MicroBitDigitalPin\n\"\"\"Pin with digital features.\"\"\"\n\npin10: MicroBitAnalogDigitalPin\n\"\"\"Pin with digital and analog features.\"\"\"\n\npin11: MicroBitDigitalPin\n\"\"\"Pin with digital features.\"\"\"\n\npin12: MicroBitDigitalPin\n\"\"\"Pin with digital features.\"\"\"\n\npin13: MicroBitDigitalPin\n\"\"\"Pin with digital features.\"\"\"\n\npin14: MicroBitDigitalPin\n\"\"\"Pin with digital features.\"\"\"\n\npin15: MicroBitDigitalPin\n\"\"\"Pin with digital features.\"\"\"\n\npin16: MicroBitDigitalPin\n\"\"\"Pin with digital features.\"\"\"\n\npin19: MicroBitDigitalPin\n\"\"\"Pin with digital features.\"\"\"\n\npin20: MicroBitDigitalPin\n\"\"\"Pin with digital features.\"\"\"\n\npin_logo: MicroBitTouchPin\n\"\"\"A touch sensitive logo pin on the front of the micro:bit, which by default is set to capacitive touch mode.\"\"\"\n\npin_speaker: MicroBitAnalogDigitalPin\n\"\"\"A pin to address the micro:bit speaker.\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 \"\"\"An image to show on the micro:bit LED display.\n\n Given an image object it's possible to display it via the ``display`` API::\n\n display.show(Image.HAPPY)\n \"\"\"\n\n HEART: Image\n \"\"\"Heart image.\"\"\"\n\n HEART_SMALL: Image\n \"\"\"Small heart image.\"\"\"\n\n HAPPY: Image\n \"\"\"Happy face image.\"\"\"\n\n SMILE: Image\n \"\"\"Smiling mouth image.\"\"\"\n\n SAD: Image\n \"\"\"Sad face image.\"\"\"\n\n CONFUSED: Image\n \"\"\"Confused face image.\"\"\"\n\n ANGRY: Image\n \"\"\"Angry face image.\"\"\"\n\n ASLEEP: Image\n \"\"\"Sleeping face image.\"\"\"\n\n SURPRISED: Image\n \"\"\"Surprised face image.\"\"\"\n\n SILLY: Image\n \"\"\"Silly face image.\"\"\"\n\n FABULOUS: Image\n \"\"\"Sunglasses face image.\"\"\"\n\n MEH: Image\n \"\"\"Unimpressed face image.\"\"\"\n\n YES: Image\n \"\"\"Tick image.\"\"\"\n\n NO: Image\n \"\"\"Cross image.\"\"\"\n\n CLOCK12: Image\n \"\"\"Image with line pointing to 12 o'clock.\"\"\"\n\n CLOCK11: Image\n \"\"\"Image with line pointing to 11 o'clock.\"\"\"\n\n CLOCK10: Image\n \"\"\"Image with line pointing to 10 o'clock.\"\"\"\n\n CLOCK9: Image\n \"\"\"Image with line pointing to 9 o'clock.\"\"\"\n\n CLOCK8: Image\n \"\"\"Image with line pointing to 8 o'clock.\"\"\"\n\n CLOCK7: Image\n \"\"\"Image with line pointing to 7 o'clock.\"\"\"\n\n CLOCK6: Image\n \"\"\"Image with line pointing to 6 o'clock.\"\"\"\n\n CLOCK5: Image\n \"\"\"Image with line pointing to 5 o'clock.\"\"\"\n\n CLOCK4: Image\n \"\"\"Image with line pointing to 4 o'clock.\"\"\"\n\n CLOCK3: Image\n \"\"\"Image with line pointing to 3 o'clock.\"\"\"\n\n CLOCK2: Image\n \"\"\"Image with line pointing to 2 o'clock.\"\"\"\n\n CLOCK1: Image\n \"\"\"Image with line pointing to 1 o'clock.\"\"\"\n\n ARROW_N: Image\n \"\"\"Image of arrow pointing north.\"\"\"\n\n ARROW_NE: Image\n \"\"\"Image of arrow pointing north east.\"\"\"\n\n ARROW_E: Image\n \"\"\"Image of arrow pointing east.\"\"\"\n\n ARROW_SE: Image\n \"\"\"Image of arrow pointing south east.\"\"\"\n\n ARROW_S: Image\n \"\"\"Image of arrow pointing south.\"\"\"\n\n ARROW_SW: Image\n \"\"\"Image of arrow pointing south west.\"\"\"\n\n ARROW_W: Image\n \"\"\"Image of arrow pointing west.\"\"\"\n\n ARROW_NW: Image\n \"\"\"Image of arrow pointing north west.\"\"\"\n\n TRIANGLE: Image\n \"\"\"Image of a triangle pointing up.\"\"\"\n\n TRIANGLE_LEFT: Image\n \"\"\"Image of a triangle in the left corner.\"\"\"\n\n CHESSBOARD: Image\n \"\"\"Alternate LEDs lit in a chessboard pattern.\"\"\"\n\n DIAMOND: Image\n \"\"\"Diamond image.\"\"\"\n\n DIAMOND_SMALL: Image\n \"\"\"Small diamond image.\"\"\"\n\n SQUARE: Image\n \"\"\"Square image.\"\"\"\n\n SQUARE_SMALL: Image\n \"\"\"Small square image.\"\"\"\n\n RABBIT: Image\n \"\"\"Rabbit image.\"\"\"\n\n COW: Image\n \"\"\"Cow image.\"\"\"\n\n MUSIC_CROTCHET: Image\n \"\"\"Crotchet note image.\"\"\"\n\n MUSIC_QUAVER: Image\n \"\"\"Quaver note image.\"\"\"\n\n MUSIC_QUAVERS: Image\n \"\"\"Pair of quavers note image.\"\"\"\n\n PITCHFORK: Image\n \"\"\"Pitchfork image.\"\"\"\n\n XMAS: Image\n \"\"\"Christmas tree image.\"\"\"\n\n PACMAN: Image\n \"\"\"Pac-Man arcade character image.\"\"\"\n\n TARGET: Image\n \"\"\"Target image.\"\"\"\n\n TSHIRT: Image\n \"\"\"T-shirt image.\"\"\"\n\n ROLLERSKATE: Image\n \"\"\"Rollerskate image.\"\"\"\n\n DUCK: Image\n \"\"\"Duck image.\"\"\"\n\n HOUSE: Image\n \"\"\"House image.\"\"\"\n\n TORTOISE: Image\n \"\"\"Tortoise image.\"\"\"\n\n BUTTERFLY: Image\n \"\"\"Butterfly image.\"\"\"\n\n STICKFIGURE: Image\n \"\"\"Stick figure image.\"\"\"\n\n GHOST: Image\n \"\"\"Ghost image.\"\"\"\n\n SWORD: Image\n \"\"\"Sword image.\"\"\"\n\n GIRAFFE: Image\n \"\"\"Giraffe image.\"\"\"\n\n SKULL: Image\n \"\"\"Skull image.\"\"\"\n\n UMBRELLA: Image\n \"\"\"Umbrella image.\"\"\"\n\n SNAKE: Image\n \"\"\"Snake image.\"\"\"\n\n SCISSORS: Image\n \"\"\"Scissors image.\"\"\"\n\n ALL_CLOCKS: List[Image]\n \"\"\"A list containing all the CLOCK_ images in sequence.\"\"\"\n\n ALL_ARROWS: List[Image]\n \"\"\"A list containing all the ARROW_ images in sequence.\"\"\"\n @overload\n def __init__(self, string: str) -> None:\n \"\"\"Create an image from a string describing which LEDs are lit.\n\n ``string`` has to consist of digits 0-9 arranged into lines,\n describing the image, for example::\n\n image = Image(\"90009:\"\n \"09090:\"\n \"00900:\"\n \"09090:\"\n \"90009\")\n\n will create a 5\u00d75 image of an X. The end of a line is indicated by a\n colon. It's also possible to use newlines (\\\\n) insead of the colons.\n\n :param string: The string describing the image.\n \"\"\"\n ...\n @overload\n def __init__(\n self, width: int = 5, height: int = 5, buffer: ReadableBuffer = None\n ) -> None:\n \"\"\"Create an empty image with ``width`` columns and ``height`` rows.\n\n :param width: Optional width of the image\n :param height: Optional height of the image\n :param buffer: Optional array or bytes of ``width``\u00d7``height`` integers in range 0-9 to initialize the image\n\n Examples::\n\n Image(2, 2, b'\\x08\\x08\\x08\\x08')\n Image(2, 2, bytearray([9,9,9,9]))\n\n These create 2 x 2 pixel images at full brightness.\n \"\"\"\n ...\n def width(self) -> int:\n \"\"\"Get the number of columns.\n\n :return: The number of columns in the image\n \"\"\"\n ...\n def height(self) -> int:\n \"\"\"Get the number of rows.\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 \"\"\"Set the brightness of a pixel.\n\n Example: ``my_image.set_pixel(0, 0, 9)``\n\n :param x: The column number\n :param y: The row number\n :param value: The brightness as an integer between 0 (dark) and 9 (bright)\n\n This method will raise an exception when called on any of the built-in\n read-only images, like ``Image.HEART``.\n \"\"\"\n ...\n def get_pixel(self, x: int, y: int) -> int:\n \"\"\"Get the brightness of a pixel.\n\n Example: ``my_image.get_pixel(0, 0)``\n\n :param x: The column number\n :param y: The row number\n :return: The brightness as an integer between 0 and 9.\n \"\"\"\n ...\n def shift_left(self, n: int) -> Image:\n \"\"\"Create a new image by shifting the picture left.\n\n Example: ``Image.HEART_SMALL.shift_left(1)``\n\n :param n: The number of columns to shift by\n :return: The shifted image\n \"\"\"\n ...\n def shift_right(self, n: int) -> Image:\n \"\"\"Create a new image by shifting the picture right.\n\n Example: ``Image.HEART_SMALL.shift_right(1)``\n\n :param n: The number of columns to shift by\n :return: The shifted image\n \"\"\"\n ...\n def shift_up(self, n: int) -> Image:\n \"\"\"Create a new image by shifting the picture up.\n\n Example: ``Image.HEART_SMALL.shift_up(1)``\n\n :param n: The number of rows to shift by\n :return: The shifted image\n \"\"\"\n ...\n def shift_down(self, n: int) -> Image:\n \"\"\"Create a new image by shifting the picture down.\n\n Example: ``Image.HEART_SMALL.shift_down(1)``\n\n :param n: The number of rows to shift by\n :return: The shifted image\n \"\"\"\n ...\n def crop(self, x: int, y: int, w: int, h: int) -> Image:\n \"\"\"Create a new image by cropping the picture.\n\n Example: ``Image.HEART.crop(1, 1, 3, 3)``\n\n :param x: The crop offset column\n :param y: The crop offset row\n :param w: The crop width\n :param h: The crop height\n :return: The new image\n \"\"\"\n ...\n def copy(self) -> Image:\n \"\"\"Create an exact copy of the image.\n\n Example: ``Image.HEART.copy()``\n\n :return: The new image\n \"\"\"\n ...\n def invert(self) -> Image:\n \"\"\"Create a new image by inverting the brightness of the pixels in the\n source image.\n\n Example: ``Image.SMALL_HEART.invert()``\n\n :return: The new image.\n \"\"\"\n ...\n def fill(self, value: int) -> None:\n \"\"\"Set the brightness of all the pixels in the image.\n\n Example: ``my_image.fill(5)``\n\n :param value: The new brightness as a number between 0 (dark) and 9 (bright).\n\n This method will raise an exception when called on any of the built-in\n read-only images, like ``Image.HEART``.\n \"\"\"\n ...\n def blit(\n self,\n src: Image,\n x: int,\n y: int,\n w: int,\n h: int,\n xdest: int = 0,\n ydest: int = 0,\n ) -> None:\n \"\"\"Copy an area from another image into this image.\n\n Example: ``my_image.blit(Image.HEART, 1, 1, 3, 3, 1, 1)``\n\n :param src: The source image\n :param x: The starting column offset in the source image\n :param y: The starting row offset in the source image\n :param w: The number of columns to copy\n :param h: The number of rows to copy\n :param xdest: The column offset to modify in this image\n :param ydest: The row offset to modify in this image\n\n Pixels outside the source image are treated as having a brightness of 0.\n\n ``shift_left()``, ``shift_right()``, ``shift_up()``, ``shift_down()``\n and ``crop()`` can are all implemented by using ``blit()``.\n\n For 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 \"\"\"Get a compact string representation of the image.\"\"\"\n ...\n def __str__(self) -> str:\n \"\"\"Get a readable string representation of the image.\"\"\"\n ...\n def __add__(self, other: Image) -> Image:\n \"\"\"Create a new image by adding the brightness values from the two\n images for each pixel.\n\n Example: ``Image.HEART + Image.HAPPY``\n\n :param other: The image to add.\n \"\"\"\n ...\n def __sub__(self, other: Image) -> Image:\n \"\"\"Create a new image by subtracting the brightness values of the\n other image from this image.\n\n Example: ``Image.HEART - Image.HEART_SMALL``\n\n :param other: The image to subtract.\n \"\"\"\n ...\n def __mul__(self, n: float) -> Image:\n \"\"\"Create a new image by multiplying the brightness of each pixel by\n ``n``.\n\n Example: ``Image.HEART * 0.5``\n\n :param n: The value to multiply by.\n \"\"\"\n ...\n def __truediv__(self, n: float) -> Image:\n \"\"\"Create a new image by dividing the brightness of each pixel by\n ``n``.\n\n Example: ``Image.HEART / 2``\n\n :param n: The value to divide by.\n \"\"\"\n ...\n\nclass SoundEvent:\n LOUD: SoundEvent\n \"\"\"Represents the transition of sound events, from ``quiet`` to ``loud`` like clapping or shouting.\"\"\"\n\n QUIET: SoundEvent\n \"\"\"Represents the transition of sound events, from ``loud`` to ``quiet`` like speaking or background music.\"\"\"\n\nclass Sound:\n \"\"\"The built-in sounds can be called using ``audio.play(Sound.NAME)``.\"\"\"\n\n GIGGLE: Sound\n \"\"\"Giggling sound.\"\"\"\n\n HAPPY: Sound\n \"\"\"Happy sound.\"\"\"\n\n HELLO: Sound\n \"\"\"Greeting sound.\"\"\"\n\n MYSTERIOUS: Sound\n \"\"\"Mysterious sound.\"\"\"\n\n SAD: Sound\n \"\"\"Sad sound.\"\"\"\n\n SLIDE: Sound\n \"\"\"Sliding sound.\"\"\"\n\n SOARING: Sound\n \"\"\"Soaring sound.\"\"\"\n\n SPRING: Sound\n \"\"\"Spring sound.\"\"\"\n\n TWINKLE: Sound\n \"\"\"Twinkling sound.\"\"\"\n\n YAWN: Sound\n \"\"\"Yawning sound.\"\"\"\n", "/typeshed/stdlib/microbit/accelerometer.pyi": "\"\"\"Measure the acceleration of the micro:bit and recognise gestures.\n\"\"\"\n\nfrom typing import Tuple\n\ndef get_x() -> int:\n \"\"\"Get the acceleration measurement in the ``x`` axis in milli-g.\n\n Example: ``accelerometer.get_x()``\n\n :return: A positive or negative integer depending on direction in the range +/- 2000mg.\n \"\"\"\n ...\n\ndef get_y() -> int:\n \"\"\"Get the acceleration measurement in the ``y`` axis in milli-g.\n\n Example: ``accelerometer.get_y()``\n\n :return: A positive or negative integer depending on direction in the range +/- 2000mg.\n \"\"\"\n ...\n\ndef get_z() -> int:\n \"\"\"Get the acceleration measurement in the ``z`` axis in milli-g.\n\n Example: ``accelerometer.get_z()``\n\n :return: A positive or negative integer depending on direction in the range +/- 2000mg.\n \"\"\"\n ...\n\ndef get_values() -> Tuple[int, int, int]:\n \"\"\"Get the acceleration measurements in all axes at once as a tuple.\n\n Example: ``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 ...\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\n Example: ``accelerometer.get_strength()``\n\n :return: The combined acceleration strength of all the axes, in milli-g.\n \"\"\"\n ...\n\ndef current_gesture() -> str:\n \"\"\"Get the name of the current gesture.\n\n Example: ``accelerometer.current_gesture()``\n\n MicroPython understands the following gesture names: ``\"up\"``, ``\"down\"``,\n ``\"left\"``, ``\"right\"``, ``\"face up\"``, ``\"face down\"``, ``\"freefall\"``,\n ``\"3g\"``, ``\"6g\"``, ``\"8g\"``, ``\"shake\"``. Gestures are always\n represented as strings.\n\n :return: The current gesture\n \"\"\"\n ...\n\ndef is_gesture(name: str) -> bool:\n \"\"\"Check if the named gesture is currently active.\n\n Example: ``accelerometer.is_gesture('shake')``\n\n MicroPython understands the following gesture names: ``\"up\"``, ``\"down\"``,\n ``\"left\"``, ``\"right\"``, ``\"face up\"``, ``\"face down\"``, ``\"freefall\"``,\n ``\"3g\"``, ``\"6g\"``, ``\"8g\"``, ``\"shake\"``. Gestures are always\n represented as strings.\n\n :param name: The gesture name.\n :return: ``True`` if the gesture is active, ``False`` otherwise.\n \"\"\"\n ...\n\ndef was_gesture(name: str) -> bool:\n \"\"\"Check if the named gesture was active since the last call.\n\n Example: ``accelerometer.was_gesture('shake')``\n\n MicroPython understands the following gesture names: ``\"up\"``, ``\"down\"``,\n ``\"left\"``, ``\"right\"``, ``\"face up\"``, ``\"face down\"``, ``\"freefall\"``,\n ``\"3g\"``, ``\"6g\"``, ``\"8g\"``, ``\"shake\"``. Gestures are always\n represented as strings.\n\n :param name: The gesture name.\n :return: ``True`` if the gesture was active since the last call, ``False`` otherwise.\n \"\"\"\n\ndef get_gestures() -> Tuple[str, ...]:\n \"\"\"Return a tuple of the gesture history.\n\n Example: ``accelerometer.get_gestures()``\n\n Clears the gesture history before returning.\n\n Gestures are not updated in the background so there needs to be constant\n calls to some accelerometer method to do the gesture detection. Usually\n gestures 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 ...\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\n Example: ``accelerometer.set_range(8)``\n\n :param value: New range for the accelerometer, an integer in ``g``.\n \"\"\"\n", "/typeshed/stdlib/microbit/audio.pyi": "\"\"\"Play sounds using the micro:bit (import ``audio`` for V1 compatibility).\n\"\"\"\n\nfrom ..microbit import MicroBitDigitalPin, Sound, pin0\nfrom typing import ClassVar, Iterable, Union\n\ndef play(\n source: Union[Iterable[AudioFrame], Sound, SoundEffect],\n wait: bool = True,\n pin: MicroBitDigitalPin = pin0,\n return_pin: Union[MicroBitDigitalPin, None] = None,\n) -> None:\n \"\"\"Play a built-in sound, sound effect or custom audio frames.\n\n Example: ``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: If ``wait`` is ``True``, this function will block until the sound is complete.\n :param pin: An optional argument to specify the output pin can be used to override the default of ``pin0``. If we do not want any sound to play we can use ``pin=None``.\n :param return_pin: Specifies a differential edge connector pin to connect to an external speaker instead of ground. This is ignored for the **V2** revision.\n \"\"\"\n\ndef is_playing() -> bool:\n \"\"\"Check whether a sound is playing.\n\n Example: ``audio.is_playing()``\n\n :return: ``True`` if audio is playing, otherwise ``False``.\"\"\"\n ...\n\ndef stop() -> None:\n \"\"\"Stop all audio playback.\n\n Example: ``audio.stop()``\n \"\"\"\n ...\n\nclass SoundEffect:\n \"\"\"A sound effect, composed by a set of parameters configured via the constructor or attributes.\"\"\"\n\n WAVEFORM_SINE: ClassVar[int]\n \"\"\"Sine wave option used for the ``waveform`` parameter.\"\"\"\n\n WAVEFORM_SAWTOOTH: ClassVar[int]\n \"\"\"Sawtooth wave option used for the ``waveform`` parameter.\"\"\"\n\n WAVEFORM_TRIANGLE: ClassVar[int]\n \"\"\"Triangle wave option used for the ``waveform`` parameter.\"\"\"\n\n WAVEFORM_SQUARE: ClassVar[int]\n \"\"\"Square wave option used for the ``waveform`` parameter.\"\"\"\n\n WAVEFORM_NOISE: ClassVar[int]\n \"\"\"Noise option used for the ``waveform`` parameter.\"\"\"\n\n SHAPE_LINEAR: ClassVar[int]\n \"\"\"Linear interpolation option used for the ``shape`` parameter.\"\"\"\n\n SHAPE_CURVE: ClassVar[int]\n \"\"\"Curve interpolation option used for the ``shape`` parameter.\"\"\"\n\n SHAPE_LOG: ClassVar[int]\n \"\"\"Logarithmic interpolation option used for the ``shape`` parameter.\"\"\"\n\n FX_NONE: ClassVar[int]\n \"\"\"No effect option used for the ``fx`` parameter.\"\"\"\n\n FX_TREMOLO: ClassVar[int]\n \"\"\"Tremolo effect option used for the ``fx`` parameter.\"\"\"\n\n FX_VIBRATO: ClassVar[int]\n \"\"\"Vibrato effect option used for the ``fx`` parameter.\"\"\"\n\n FX_WARBLE: ClassVar[int]\n \"\"\"Warble effect option used for the ``fx`` parameter.\"\"\"\n\n freq_start: int\n \"\"\"Start frequency in Hertz (Hz), a number between ``0`` and ``9999``\"\"\"\n\n freq_end: int\n \"\"\"End frequency in Hertz (Hz), a number between ``0`` and ``9999``\"\"\"\n\n duration: int\n \"\"\"Duration of the sound in milliseconds, a number between ``0`` and ``9999``\"\"\"\n\n vol_start: int\n \"\"\"Start volume value, a number between ``0`` and ``255``\"\"\"\n\n vol_end: int\n \"\"\"End volume value, a number between ``0`` and ``255``\"\"\"\n\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\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\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__(\n self,\n freq_start: int = 500,\n freq_end: int = 2500,\n duration: int = 500,\n vol_start: int = 255,\n vol_end: int = 0,\n waveform: int = WAVEFORM_SQUARE,\n fx: int = FX_NONE,\n shape: int = SHAPE_LOG,\n ):\n \"\"\"Create a new sound effect.\n\n Example: ``my_effect = SoundEffect(duration=1000)``\n\n All the parameters are optional, with default values as shown above, and\n they can all be modified via attributes of the same name. For example, we\n can first create an effect ``my_effect = SoundEffect(duration=1000)``,\n and 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\n Example: ``sound_2 = sound_1.copy()``\n\n :return: A copy of the SoundEffect.\n \"\"\"\n\nclass AudioFrame:\n \"\"\"An ``AudioFrame`` object is a list of 32 samples each of which is a unsigned byte\n (whole number between 0 and 255).\n\n It takes just over 4 ms to play a single frame.\n\n Example::\n\n frame = AudioFrame()\n for i in range(len(frame)):\n frame[i] = 252 - i * 8\n \"\"\"\n\n def copyfrom(self, other: AudioFrame) -> None:\n \"\"\"Overwrite the data in this ``AudioFrame`` with the data from another ``AudioFrame`` instance.\n\n Example: ``my_frame.copyfrom(source_frame)``\n\n :param other: ``AudioFrame`` instance from which to copy the data.\n \"\"\"\n def __len__(self) -> int: ...\n def __setitem__(self, key: int, value: int) -> None: ...\n def __getitem__(self, key: int) -> int: ...\n", @@ -45,7 +45,7 @@ "/typeshed/stdlib/microbit/speaker.pyi": "\"\"\"Control the built-in speaker (V2 only).\n\"\"\"\n\ndef off() -> None:\n \"\"\"Turn the speaker off.\n\n Example: ``speaker.off()``\n\n This does not disable sound output to an edge connector pin.\n \"\"\"\n ...\n\ndef on() -> None:\n \"\"\"Turn the speaker on.\n\n Example: ``speaker.on()``\n \"\"\"\n ...\n", "/typeshed/stdlib/microbit/spi.pyi": "\"\"\"Communicate with devices using the serial peripheral interface (SPI) bus.\n\"\"\"\n\nfrom _typeshed import ReadableBuffer, WriteableBuffer\nfrom ..microbit import pin13, pin14, pin15, MicroBitDigitalPin\n\ndef init(\n baudrate: int = 1000000,\n bits: int = 8,\n mode: int = 0,\n sclk: MicroBitDigitalPin = pin13,\n mosi: MicroBitDigitalPin = pin15,\n miso: MicroBitDigitalPin = pin14,\n) -> None:\n \"\"\"Initialize SPI communication.\n\n Example: ``spi.init()``\n\n For correct communication, the parameters have to be the same on both communicating devices.\n\n :param baudrate: The speed of communication.\n :param bits: The width in bits of each transfer. Currently only ``bits=8`` is supported. However, this may change in the future.\n :param mode: Determines the combination of clock polarity and phase - `see online table `_.\n :param sclk: sclk pin (default 13)\n :param mosi: mosi pin (default 15)\n :param miso: miso pin (default 14)\n \"\"\"\n ...\n\ndef read(nbytes: int) -> bytes:\n \"\"\"Read bytes.\n\n Example: ``spi.read(64)``\n\n :param nbytes: Maximum number of bytes to read.\n :return: The bytes read.\n \"\"\"\n ...\n\ndef write(buffer: ReadableBuffer) -> None:\n \"\"\"Write bytes to the bus.\n\n Example: ``spi.write(bytes([1, 2, 3]))``\n\n :param buffer: A buffer to read data from.\n \"\"\"\n ...\n\ndef write_readinto(out: WriteableBuffer, in_: ReadableBuffer) -> None:\n \"\"\"Write the ``out`` buffer to the bus and read any response into the ``in_`` buffer.\n\n Example: ``spi.write_readinto(out_buffer, in_buffer)``\n\n The length of the buffers should be the same. The buffers can be the same object.\n\n :param out: The buffer to write any response to.\n :param in_: The buffer to read data from.\n \"\"\"\n ...\n", "/typeshed/stdlib/microbit/uart.pyi": "\"\"\"Communicate with a device using a serial interface.\n\"\"\"\n\nfrom _typeshed import WriteableBuffer\nfrom ..microbit import MicroBitDigitalPin\nfrom typing import Optional, Union\n\nODD: int\n\"\"\"Odd parity\"\"\"\n\nEVEN: int\n\"\"\"Even parity\"\"\"\n\ndef init(\n baudrate: int = 9600,\n bits: int = 8,\n parity: Optional[int] = None,\n stop: int = 1,\n tx: Optional[MicroBitDigitalPin] = None,\n rx: Optional[MicroBitDigitalPin] = None,\n) -> None:\n \"\"\"Initialize serial communication.\n\n Example: ``uart.init(115200, tx=pin0, rx=pin1)``\n\n :param baudrate: The speed of communication.\n :param bits: The size of bytes being transmitted. micro:bit only supports 8.\n :param parity: How parity is checked, ``None``, ``uart.ODD`` or ``uart.EVEN``.\n :param stop: The number of stop bits, has to be 1 for micro:bit.\n :param tx: Transmitting pin.\n :param rx: Receiving pin.\n\n Initializing the UART on external pins will cause the Python console on\n USB to become unaccessible, as it uses the same hardware. To bring the\n console back you must reinitialize the UART without passing anything for\n ``tx`` or ``rx`` (or passing ``None`` to these arguments). This means\n that calling ``uart.init(115200)`` is enough to restore the Python console.\n\n For more details see `the online documentation `_.\n \"\"\"\n ...\n\ndef any() -> bool:\n \"\"\"Check if any data is waiting.\n\n Example: ``uart.any()``\n\n :return: ``True`` if any data is waiting, else ``False``.\n \"\"\"\n ...\n\ndef read(nbytes: Optional[int] = None) -> Optional[bytes]:\n \"\"\"Read bytes.\n\n Example: ``uart.read()``\n\n :param nbytes: If ``nbytes`` is specified then read at most that many bytes, otherwise read as many bytes as possible\n :return: A bytes object or ``None`` on timeout\n \"\"\"\n ...\n\ndef readinto(buf: WriteableBuffer, nbytes: Optional[int] = None) -> Optional[int]:\n \"\"\"Read bytes into the ``buf``.\n\n Example: ``uart.readinto(input_buffer)``\n\n :param buf: The buffer to write to.\n :param nbytes: If ``nbytes`` is specified then read at most that many bytes, otherwise read ``len(buf)`` bytes.\n :return: number of bytes read and stored into ``buf`` or ``None`` on timeout.\n \"\"\"\n ...\n\ndef readline() -> Optional[bytes]:\n \"\"\"Read a line, ending in a newline character.\n\n Example: ``uart.readline()``\n\n :return: The line read or ``None`` on timeout. The newline character is included in the returned bytes.\n \"\"\"\n ...\n\ndef write(buf: Union[bytes, str]) -> Optional[int]:\n \"\"\"Write a buffer to the bus.\n\n Example: ``uart.write('hello world')``\n\n :param buf: A bytes object or a string.\n :return: The number of bytes written, or ``None`` on timeout.\n\n Examples::\n\n uart.write('hello world')\n uart.write(b'hello world')\n uart.write(bytes([1, 2, 3]))\n \"\"\"\n ...\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", "/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.es-es.json b/src/micropython/main/typeshed.es-es.json index cb8739093..fa2e1cd07 100644 --- a/src/micropython/main/typeshed.es-es.json +++ b/src/micropython/main/typeshed.es-es.json @@ -34,7 +34,7 @@ "/typeshed/stdlib/ustruct.pyi": "from struct import *\n", "/typeshed/stdlib/usys.pyi": "from sys import *\n", "/typeshed/stdlib/utime.pyi": "from time import *\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/_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/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 \"\"\"Programe para ejecutar una funci\u00f3n en el intervalo especificado por los argumentos de tiempo **V2 solamente**. (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: Funci\u00f3n para llamar al intervalo proporcionado. Omitir cuando se utiliza como decorador.\n:param days: (d\u00edas) Establece la marca del d\u00eda para la programaci\u00f3n.\n:param h: Establece la marca de hora para la programaci\u00f3n.\n:param min: Establece la marca de minuto para la programaci\u00f3n.\n:param s: Establece la segunda marca para la programaci\u00f3n.\n:param ms: Establece la marca de milisegundos para la programaci\u00f3n.\"\"\"\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 \"\"\"Convierte un valor de un rango a un rango de n\u00fameros enteros. (escala)\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) Un n\u00famero a convertir.\n:param from_: (de) Una tupla para definir el rango desde el que convertir.\n:param to: (a) Una tupla para definir el rango al que convertir.\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 \"\"\"Convierte un valor de un rango a un rango de punto flotante. (escala)\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) Un n\u00famero a convertir.\n:param from_: (de) Una tupla para definir el rango desde el que convertir.\n:param to: (a) Una tupla para definir el rango al que convertir.\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 Celsius. (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 \"\"\"Imagen de tijeras. (tijeras)\"\"\"\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 \"\"\"Obtener la medici\u00f3n de aceleraci\u00f3n de todos los ejes combinados, como un entero positivo. Esta es la suma de Pitag\u00f3rica de los ejes X, Y y Z. (obtener fuerza)\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 \"\"\"Establecer el rango de sensibilidad aceler\u00f3metro, en g (gravedad est\u00e1ndar), a los valores m\u00e1s cercanos soportados por el hardware, as\u00ed que se redondea a ``2``, ``4``o ``8`` g. (establecer rango)\n\nExample: ``accelerometer.set_range(8)``\n\n:param value: (valor) Nuevo rango para el aceler\u00f3metro, un entero en ``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 \"\"\"Reproducir un sonido, un efecto de sonido o marcos de audio personalizados. (reproducir)\n\nExample: ``audio.play(Sound.GIGGLE)``\n\n:param source: (origen) Un ``Sound`` integrado como ``Sound.GIGGLE``, un ``SoundEffect`` o datos de muestra como un iterable de objetos ``AudioFrame``.\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 \"\"\"Un efecto de sonido, compuesto por un conjunto de par\u00e1metros configurados a trav\u00e9s del constructor o atributos. (efecto de sonido)\"\"\"\n WAVEFORM_SINE: ClassVar[int]\n \"\"\"Opci\u00f3n de onda sinusoidal utilizada para el par\u00e1metro ``waveform``. (forma de onda sinusoidal)\"\"\"\n WAVEFORM_SAWTOOTH: ClassVar[int]\n \"\"\"Opci\u00f3n de onda con diente de sierra usada para el par\u00e1metro ``waveform``. (diente de sierra de forma de onda)\"\"\"\n WAVEFORM_TRIANGLE: ClassVar[int]\n \"\"\"Opci\u00f3n de onda triangular usada para el par\u00e1metro ``waveform``. (forma de onda triangular)\"\"\"\n WAVEFORM_SQUARE: ClassVar[int]\n \"\"\"Opci\u00f3n de onda cuadrada usada para el par\u00e1metro ``waveform``. (forma de onda cuadrada)\"\"\"\n WAVEFORM_NOISE: ClassVar[int]\n \"\"\"Opci\u00f3n de ruido usada para el par\u00e1metro ``waveform``. (forma de onda de ruido)\"\"\"\n SHAPE_LINEAR: ClassVar[int]\n \"\"\"Opci\u00f3n de interpolaci\u00f3n lineal usada para el par\u00e1metro ``shape``. (forma lineal)\"\"\"\n SHAPE_CURVE: ClassVar[int]\n \"\"\"Opci\u00f3n de interpolaci\u00f3n de curva usada para el par\u00e1metro ``shape``. (forma curva)\"\"\"\n SHAPE_LOG: ClassVar[int]\n \"\"\"Opci\u00f3n de interpolaci\u00f3n logar\u00edtmica usada para el par\u00e1metro ``shape``. (registro de forma)\"\"\"\n FX_NONE: ClassVar[int]\n \"\"\"Ninguna opci\u00f3n de efecto usada para el par\u00e1metro ``fx``. (fx ninguno)\"\"\"\n FX_TREMOLO: ClassVar[int]\n \"\"\"Opci\u00f3n de efecto Tr\u00e9molo usada para el par\u00e1metro ``fx``.\"\"\"\n FX_VIBRATO: ClassVar[int]\n \"\"\"Opci\u00f3n de efecto vibrato utilizada para el par\u00e1metro ``fx``.\"\"\"\n FX_WARBLE: ClassVar[int]\n \"\"\"Opci\u00f3n de efecto gorjeo utilizada para el par\u00e1metro ``fx``. (fx gorjeo)\"\"\"\n freq_start: int\n \"\"\"Frecuencia de inicio en Hertz (Hz), un n\u00famero entre ``0`` y ``9999`` (frecuencia de inicio)\"\"\"\n freq_end: int\n \"\"\"Frecuencia final en Hertz (Hz), un n\u00famero entre ``0`` y ``9999`` (frecuencia final)\"\"\"\n duration: int\n \"\"\"Duraci\u00f3n del sonido en milisegundos, un n\u00famero entre ``0`` y ``9999`` (duraci\u00f3n)\"\"\"\n vol_start: int\n \"\"\"Valor de volumen inicial, un n\u00famero entre ``0`` y ``255`` (volumen de inicio)\"\"\"\n vol_end: int\n \"\"\"Valor final del volumen, un n\u00famero entre ``0`` y ``255`` (volumen final)\"\"\"\n waveform: int\n \"\"\"Tipo de forma ondulada, uno de estos valores: ``WAVEFORM_SINE``, ``WAVEFORM_SAWTOOTH``, ``WAVEFORM_TRIANGLE``, ``WAVEFORM_SQUARE``, ``WAVEFORM_NOISE`` (ruido generado aleatoriamente) (forma de onda)\"\"\"\n fx: int\n \"\"\"Efecto para a\u00f1adir en el sonido, uno de los siguientes valores: ``FX_TREMOLO``, ``FX_VIBRATO``, ``FX_WARBLE``o ``FX_NONE``\"\"\"\n shape: int\n \"\"\"El tipo de curva de interpolaci\u00f3n entre las frecuencias de inicio y final, diferentes formas de onda tienen diferentes tasas de cambio en la frecuencia. Uno de los siguientes valores: ``SHAPE_LINEAR``, ``SHAPE_CURVE``, ``SHAPE_LOG`` (forma)\"\"\"\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 \"\"\"Crear un nuevo efecto de sonido.\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: (frecuencia de inicio) Frecuencia de inicio en Hertz (Hz), un n\u00famero entre ``0`` y ``9999``.\n:param freq_end: (frecuencia final) Frecuencia final en Hertz (Hz), un n\u00famero entre ``0`` y ``9999``.\n:param duration: (duraci\u00f3n) Duraci\u00f3n del sonido en milisegundos, un n\u00famero entre ``0`` y ``9999``.\n:param vol_start: (volumen inicial) Valor de volumen inicial, un n\u00famero entre ``0`` y ``255``.\n:param vol_end: (volumen final) Valor de volumen final, un n\u00famero entre ``0`` y ``255``.\n:param waveform: (forma de onda) Tipo de forma de onda, uno de estos valores: ``WAVEFORM_SINE``, ``WAVEFORM_SAWTOOTH``, ``WAVEFORM_TRIANGLE``, ``WAVEFORM_SQUARE``, ``WAVEFORM_NOISE`` (ruido generado aleatoriamente).\n:param fx: Efecto para a\u00f1adir en el sonido, uno de los siguientes valores: ``FX_TREMOLO``, ``FX_VIBRATO``, ``FX_WARBLE``o ``FX_NONE``.\n:param shape: (forma) El tipo de curva de interpolaci\u00f3n entre las frecuencias de inicio y final, diferentes formas de onda tienen diferentes tasas de cambio en la frecuencia. Uno de los siguientes valores: ``SHAPE_LINEAR``, ``SHAPE_CURVE``, ``SHAPE_LOG``.\"\"\"\n\n def copy(self) -> SoundEffect:\n \"\"\"Crear una copia de este ``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 \"\"\"Sobrescribir los datos en este ``AudioFrame`` con los datos de otra instancia de ``AudioFrame``. (copiar forma)\n\nExample: ``my_frame.copyfrom(source_frame)``\n\n:param other: (otro) Instancia ``AudioFrame`` desde la que copiar los datos.\"\"\"\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 ...", @@ -45,7 +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/_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", "/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 158a8aa6e..987c50779 100644 --- a/src/micropython/main/typeshed.fr.json +++ b/src/micropython/main/typeshed.fr.json @@ -34,7 +34,7 @@ "/typeshed/stdlib/ustruct.pyi": "from struct import *\n", "/typeshed/stdlib/usys.pyi": "from sys import *\n", "/typeshed/stdlib/utime.pyi": "from time import *\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/_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/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 l'intervalle donn\u00e9 vers son \u00e9quivalent dans un autre intervalle d'entiers.\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_: Un tuple qui d\u00e9finit l'intervalle de d\u00e9part.\n:param to: 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 l'intervalle donn\u00e9 vers son \u00e9quivalent dans un autre intervalle de nombres \u00e0 virgule flottante.\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_: Un tuple qui d\u00e9finit l'intervalle de d\u00e9part.\n:param to: 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 Celsius.\"\"\"\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.\"\"\"\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.\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 \"\"\"D\u00e9finir la plage de sensibilit\u00e9 de l'acc\u00e9l\u00e9rom\u00e8tre, en g (gravit\u00e9 standard), \u00e0 la valeur la plus proche support\u00e9e par le mat\u00e9riel, l'arrondi se fait soit \u00e0 ``2``, ``4``, ou ``8`` g.\n\nExample: ``accelerometer.set_range(8)``\n\n:param value: Nouvelle plage pour l'acc\u00e9l\u00e9rom\u00e8tre, un entier en ``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 \"\"\"Jouer un son int\u00e9gr\u00e9, un effet sonore ou des frames audio personnalis\u00e9es.\n\nExample: ``audio.play(Sound.GIGGLE)``\n\n:param source: Un ``Sound`` int\u00e9gr\u00e9 tel que ``Sound.GIGGLE``, un ``SoundEffect`` ou un \u00e9chantillon de donn\u00e9es sous la forme d'un it\u00e9rable d'objets ``AudioFrame``.\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 \"\"\"Un effet sonore, compos\u00e9 d'un ensemble de param\u00e8tres configur\u00e9s via le constructeur ou les attributs.\"\"\"\n WAVEFORM_SINE: ClassVar[int]\n \"\"\"Option d'onde sinuso\u00efdale utilis\u00e9e pour le param\u00e8tre ``waveform``.\"\"\"\n WAVEFORM_SAWTOOTH: ClassVar[int]\n \"\"\"Optionde forme d'onde en dent de scie utilis\u00e9e pour le param\u00e8tre ``waveform``.\"\"\"\n WAVEFORM_TRIANGLE: ClassVar[int]\n \"\"\"Option d'onde triangulaire utilis\u00e9e pour le param\u00e8tre ``waveform``.\"\"\"\n WAVEFORM_SQUARE: ClassVar[int]\n \"\"\"Option d'onde carr\u00e9e utilis\u00e9e pour le param\u00e8tre ``waveform``.\"\"\"\n WAVEFORM_NOISE: ClassVar[int]\n \"\"\"Option d'onde de bruit utilis\u00e9e pour le param\u00e8tre ``waveform``.\"\"\"\n SHAPE_LINEAR: ClassVar[int]\n \"\"\"Option d'interpolation lin\u00e9aire utilis\u00e9e pour le param\u00e8tre ``shape``.\"\"\"\n SHAPE_CURVE: ClassVar[int]\n \"\"\"Option d'interpolation courbe utilis\u00e9e pour le param\u00e8tre ``shape``.\"\"\"\n SHAPE_LOG: ClassVar[int]\n \"\"\"Option d'interpolation logarithmique utilis\u00e9e pour le param\u00e8tre ``shape``.\"\"\"\n FX_NONE: ClassVar[int]\n \"\"\"Option sans effet utilis\u00e9e pour le param\u00e8tre ``fx``.\"\"\"\n FX_TREMOLO: ClassVar[int]\n \"\"\"Option d'effet tremolo utilis\u00e9e pour le param\u00e8tre ``fx``.\"\"\"\n FX_VIBRATO: ClassVar[int]\n \"\"\"Option d'effet vibrato utilis\u00e9e pour le param\u00e8tre ``fx``.\"\"\"\n FX_WARBLE: ClassVar[int]\n \"\"\"Option d'effet de Warble utilis\u00e9e pour le param\u00e8tre ``fx``.\"\"\"\n freq_start: int\n \"\"\"Fr\u00e9quence de d\u00e9part en Hertz (Hz), un nombre compris entre ``0`` et ``9999``\"\"\"\n freq_end: int\n \"\"\"Fr\u00e9quence de fin en Hertz (Hz), un nombre compris entre ``0`` et ``9999``\"\"\"\n duration: int\n \"\"\"Dur\u00e9e du son en millisecondes, un nombre compris entre ``0`` et ``9999``\"\"\"\n vol_start: int\n \"\"\"Valeur du volume de d\u00e9part, un nombre compris entre ``0`` et ``255``\"\"\"\n vol_end: int\n \"\"\"Valeur du volume \u00e0 la fin, un nombre compris entre ``0`` et ``255``\"\"\"\n waveform: int\n \"\"\"Type de forme d'onde, une de ces valeurs : ``WAVEFORM_SINE``, ``WAVEFORM_SAWTOOTH``, ``WAVEFORM_TRIANGLE``, ``WAVEFORM_SQUARE``, ``WAVEFORM_NOISE`` (bruit g\u00e9n\u00e9r\u00e9 al\u00e9atoirement)\"\"\"\n fx: int\n \"\"\"Effet \u00e0 ajouter au son, l'une des valeurs suivantes : ``FX_TREMOLO``, ``FX_VIBRATO``, ``FX_WARBLE``, ou ``FX_NONE``\"\"\"\n shape: int\n \"\"\"Le type de la courbe d'interpolation entre les fr\u00e9quences de d\u00e9but et de fin, les diff\u00e9rentes formes d'onde ont des taux de variation de fr\u00e9quence diff\u00e9rents. L'une des valeurs suivantes : ``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 \"\"\"Cr\u00e9er un nouvel effet sonore.\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: Fr\u00e9quence de d\u00e9part en Hertz (Hz), un nombre compris entre ``0`` et ``9999``.\n:param freq_end: Fr\u00e9quence de fin en Hertz (Hz), un nombre compris entre ``0`` et ``9999``.\n:param duration: Dur\u00e9e du son en millisecondes, un nombre compris entre ``0`` et ``9999``.\n:param vol_start: Valeur du volume de d\u00e9part, un nombre compris entre ``0`` et ``255``.\n:param vol_end: Valeur du volume \u00e0 la fin, un nombre compris entre ``0`` et ``255``.\n:param waveform: Type de forme d'onde, une de ces valeurs : ``WAVEFORM_SINE``, ``WAVEFORM_SAWTOOTH``, ``WAVEFORM_TRIANGLE``, ``WAVEFORM_SQUARE``, ``WAVEFORM_NOISE`` (bruit g\u00e9n\u00e9r\u00e9 al\u00e9atoirement).\n:param fx: Effet \u00e0 ajouter au son, l'une des valeurs suivantes : ``FX_TREMOLO``, ``FX_VIBRATO``, ``FX_WARBLE``, ou ``FX_NONE``.\n:param shape: Le type de la courbe d'interpolation entre les fr\u00e9quences de d\u00e9but et de fin, les diff\u00e9rentes formes d'onde ont des taux de variation de fr\u00e9quence diff\u00e9rents. L'une des valeurs suivantes : ``SHAPE_LINEAR``, ``SHAPE_CURVE``, ``SHAPE_LOG``.\"\"\"\n\n def copy(self) -> SoundEffect:\n \"\"\"Cr\u00e9er une copie de ce ``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 \"\"\"\u00c9craser les donn\u00e9es de ce ``AudioFrame`` avec les donn\u00e9es d'une autre instance ``AudioFrame``.\n\nExample: ``my_frame.copyfrom(source_frame)``\n\n:param other: Instance ``AudioFrame`` \u00e0 partir de laquelle copier les donn\u00e9es.\"\"\"\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 ...", @@ -45,7 +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/_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", "/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 25364f5b7..fdc6c86e3 100644 --- a/src/micropython/main/typeshed.ja.json +++ b/src/micropython/main/typeshed.ja.json @@ -34,7 +34,7 @@ "/typeshed/stdlib/ustruct.pyi": "from struct import *\n", "/typeshed/stdlib/usys.pyi": "from sys import *\n", "/typeshed/stdlib/utime.pyi": "from time import *\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/_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/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\u79d2\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002\n:param ms: \u30b9\u30b1\u30b8\u30e5\u30fc\u30ea\u30f3\u30b0\u306e\u305f\u3081\u306e\u30df\u30ea\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\u6642\u8a08\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\u77e2\u5370\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\u77e9\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\u30ef\u30d6\u30eb\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 ...", @@ -45,7 +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/_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", "/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 5b9f142a3..bd06f1b73 100644 --- a/src/micropython/main/typeshed.ko.json +++ b/src/micropython/main/typeshed.ko.json @@ -34,7 +34,7 @@ "/typeshed/stdlib/ustruct.pyi": "from struct import *\n", "/typeshed/stdlib/usys.pyi": "from sys import *\n", "/typeshed/stdlib/utime.pyi": "from time import *\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/_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/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 \"\"\"Tremolo 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 ...", @@ -45,7 +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/_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", "/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.nl.json b/src/micropython/main/typeshed.nl.json index 26ee1b2c4..f75b43176 100644 --- a/src/micropython/main/typeshed.nl.json +++ b/src/micropython/main/typeshed.nl.json @@ -34,7 +34,7 @@ "/typeshed/stdlib/ustruct.pyi": "from struct import *\n", "/typeshed/stdlib/usys.pyi": "from sys import *\n", "/typeshed/stdlib/utime.pyi": "from time import *\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/_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/microbit/__init__.pyi": "\"\"\"Pinnen, afbeeldingen, geluiden, temperatuur en 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 \"\"\"Plan om een functie uit te voeren volgens het interval dat gespecificeerd is door het time argument **V2 alleen**. (draai elke)\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: Functie om op te roepen bij de meegeleverde interval. Weglaten wanneer je als decorator gebruikt.\n:param days: (dagen) Stelt de dag markering in voor de planning.\n:param h: (uur) Stelt de urenmarkering in voor de planning.\n:param min: Stelt de minuut markering in voor de planning.\n:param s: Stelt de seconde markering in voor de planning.\n:param ms: Stelt de milliseconde markering in voor de planning.\"\"\"\n\ndef panic(n: int) -> None:\n \"\"\"Voer een paniekmodus in. (paniek)\n\nExample: ``panic(127)``\n\n:param n: Een willekeurig geheel getal <= 255 om een status aan te geven.\n\nRequires restart.\"\"\"\n\ndef reset() -> None:\n \"\"\"Herstart het bord.\"\"\"\n\n@overload\ndef scale(value: float, from_: Tuple[float, float], to: Tuple[int, int]) -> int:\n \"\"\"Zet een waarde om van een bereik naar een ander bereik van natuurlijke getallen. (schaal)\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: (waarde) Een getal om te converteren\n:param from_: (van) Een getallen paar wat het bereik aangeeft vanwaar je wilt converteren\n:param to: (naar) Een getallen paar om het bereik te defini\u00ebren waar je naar wilt converteren.\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 \"\"\"Zet een waarde om van een bereik naar een ander bereik van decimale getallen. (schaal)\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: (waarde) Een getal om te converteren\n:param from_: (van) Een getallen paar wat het bereik aangeeft vanwaar je wilt converteren\n:param to: (naar) Een getallen paar om het bereik te defini\u00ebren waar je naar wilt converteren.\n:return: The ``value`` converted to the ``to`` range.\"\"\"\n\ndef sleep(n: float) -> None:\n \"\"\"Wacht op ``n`` milliseconden. (slapen)\n\nExample: ``sleep(1000)``\n\n:param n: Het aantal milliseconden te wachten\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 \"\"\"Bekijk de looptijd van het bord. (looptijd)\n\n:return: The number of milliseconds since the board was switched on or restarted.\"\"\"\n\ndef temperature() -> int:\n \"\"\"Krijg de temperatuur van de micro:bit in graden Celsius. (temperatuur)\"\"\"\n\ndef set_volume(v: int) -> None:\n \"\"\"Stelt het volume in. (stel volume in)\n\nExample: ``set_volume(127)``\n\n:param v: een waarde tussen 0 (laag) en 255 (hoog).\n\nOut of range values will be clamped to 0 or 255.\n\n**V2** only.\"\"\"\n ...\n\nclass Button:\n \"\"\"De klasse voor de knoppen ``button_a`` en ``button_b``. (knop)\"\"\"\n\n def is_pressed(self) -> bool:\n \"\"\"Controleer of op de knop wordt gedrukt. (is ingedrukt)\n\n:return: ``True`` if the specified button ``button`` is pressed, and ``False`` otherwise.\"\"\"\n ...\n\n def was_pressed(self) -> bool:\n \"\"\"Controleer of de knop was ingedrukt sinds het apparaat is gestart of de laatste keer dat deze methode is gebruikt. (was ingedrukt)\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 \"\"\"Krijg het totale aantal ingedrukte knoppen en reset dit totaal\nnaar nul voordat u terugkeert. (zie knop acties)\n\n:return: The number of presses since the device started or the last time this method was called\"\"\"\n ...\nbutton_a: Button\n\"\"\"Het object van de linker knop ``Button``. (knop a)\"\"\"\nbutton_b: Button\n\"\"\"Het object van de rechter knop ``Button``. (knop b)\"\"\"\n\nclass MicroBitDigitalPin:\n \"\"\"Een digitale pin\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 \"\"\"Haal de digitale waarde van de pincode op. (digitaal lezen)\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 \"\"\"Stel de digitale waarde van de pin in. (digitaal schrijven)\n\nExample: ``pin0.write_digital(1)``\n\n:param value: (waarde) 1 om de pin hoog of 0 om de pin laag in te stellen\"\"\"\n ...\n\n def set_pull(self, value: int) -> None:\n \"\"\"Zet de pull-status op een van de drie mogelijke waarden: ``PULL_UP``, ``PULL_DOWN`` of ``NO_PULL``. (pull instellen)\n\nExample: ``pin0.set_pull(pin0.PULL_UP)``\n\n:param value: (waarde) De pull-status van de relevante pincode, bijvoorbeeld ``pin0.PULL_UP``.\"\"\"\n ...\n\n def get_pull(self) -> int:\n \"\"\"Bekijk de pull status van een pin. (pull instellen)\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 \"\"\"Geeft de pinmodus weer. (Bekijk modus)\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 \"\"\"Voer een PWM-signaal uit op de pin, waarbij de taakcyclus proportioneel is aan ``value``. (analoge schrijven)\n\nExample: ``pin0.write_analog(254)``\n\n:param value: (waarde) Een geheel getal of een zwevend punt getal tussen 0 (0% tariefcyclus) en 1023 (100% belasting).\"\"\"\n\n def set_analog_period(self, period: int) -> None:\n \"\"\"Stel de periode in van het PWM-signaal dat uitgevoerd wordt naar ``period`` in milliseconden. (gebruik analoge periode)\n\nExample: ``pin0.set_analog_period(10)``\n\n:param period: (periode) De periode in milliseconden met een minimale geldige waarde van 1 ms.\"\"\"\n\n def set_analog_period_microseconds(self, period: int) -> None:\n \"\"\"Stel de periode in van het PWM-signaal dat uitgevoerd wordt naar ``period`` in milliseconden. (microseconden analoge periode instellen)\n\nExample: ``pin0.set_analog_period_microseconds(512)``\n\n:param period: (periode) De periode in microseconden met een minimumwaarde van 256 mres.\"\"\"\n\nclass MicroBitAnalogDigitalPin(MicroBitDigitalPin):\n \"\"\"Een pin met analoge en digitale functies.\"\"\"\n\n def read_analog(self) -> int:\n \"\"\"Lees de spanning op de pin. (lees analoge)\n\nExample: ``pin0.read_analog()``\n\n:return: An integer between 0 (meaning 0V) and 1023 (meaning 3.3V).\"\"\"\n\nclass MicroBitTouchPin(MicroBitAnalogDigitalPin):\n \"\"\"Een pin met analoge, digitale en touch functies.\"\"\"\n CAPACITIVE: int\n RESISTIVE: int\n\n def is_touched(self) -> bool:\n \"\"\"Controleer of de pin aangeraakt wordt. (is aangeraakt)\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 \"\"\"Stel de aanraakmodus voor de pin in. (aanraakmodus instellen)\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: (waarde) ``CAPACITIVE`` of ``RESISTIVE`` van de relevante speler.\"\"\"\n ...\npin0: MicroBitTouchPin\n\"\"\"Pin met digitale, analoge en touch functies.\"\"\"\npin1: MicroBitTouchPin\n\"\"\"Pin met digitale, analoge en aanraak functies.\"\"\"\npin2: MicroBitTouchPin\n\"\"\"Pin met digitale, analoge en aanraak functies.\"\"\"\npin3: MicroBitAnalogDigitalPin\n\"\"\"Pin met digitale, analoge en aanraak functies.\"\"\"\npin4: MicroBitAnalogDigitalPin\n\"\"\"Pin met digitale, analoge en aanraak functies.\"\"\"\npin5: MicroBitDigitalPin\n\"\"\"Pin met digitale, analoge en aanraak functies.\"\"\"\npin6: MicroBitDigitalPin\n\"\"\"Pin met digitale functies.\"\"\"\npin7: MicroBitDigitalPin\n\"\"\"Pin met digitale functies.\"\"\"\npin8: MicroBitDigitalPin\n\"\"\"Pin met digitale functies.\"\"\"\npin9: MicroBitDigitalPin\n\"\"\"Pin met digitale functies.\"\"\"\npin10: MicroBitAnalogDigitalPin\n\"\"\"Pin met digitale, analoge en aanraak functies.\"\"\"\npin11: MicroBitDigitalPin\n\"\"\"Pin met digitale, analoge en aanraak functies.\"\"\"\npin12: MicroBitDigitalPin\n\"\"\"Pin met digitale, analoge en aanraak functies.\"\"\"\npin13: MicroBitDigitalPin\n\"\"\"Pin met digitale, analoge en aanraak functies.\"\"\"\npin14: MicroBitDigitalPin\n\"\"\"Pin met digitale, analoge en aanraak functies.\"\"\"\npin15: MicroBitDigitalPin\n\"\"\"Pin met digitale, analoge en aanraak functies.\"\"\"\npin16: MicroBitDigitalPin\n\"\"\"Pin met digitale, analoge en aanraak functies.\"\"\"\npin19: MicroBitDigitalPin\n\"\"\"Pin met digitale, analoge en aanraak functies.\"\"\"\npin20: MicroBitDigitalPin\n\"\"\"Pin met digitale, analoge en aanraak functies.\"\"\"\npin_logo: MicroBitTouchPin\n\"\"\"Een aanraak gevoelige logo pin op de voorkant van de micro:bit, die standaard is ingesteld op capacitieve aanraking modus.\"\"\"\npin_speaker: MicroBitAnalogDigitalPin\n\"\"\"Een pin om de micro:bit luidspreker aan te spreken. (pin luidspreker)\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 \"\"\"Een afbeelding om te laten zien op het micro:bit LED display. (afbeelding)\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 \"\"\"Hart afbeelding (hart)\"\"\"\n HEART_SMALL: Image\n \"\"\"Klein hart afbeelding. (hart klein)\"\"\"\n HAPPY: Image\n \"\"\"Blije gezichtsafbeelding. (blij)\"\"\"\n SMILE: Image\n \"\"\"Glimlach gezicht afbeelding. (glimlach)\"\"\"\n SAD: Image\n \"\"\"Droevige gezichtsafbeelding. (verdrietig)\"\"\"\n CONFUSED: Image\n \"\"\"Verward gezichtsafbeelding. (verward)\"\"\"\n ANGRY: Image\n \"\"\"Boos gezichtsafbeelding. (kwaad)\"\"\"\n ASLEEP: Image\n \"\"\"Slapend gezicht afbeelding. (in slaap)\"\"\"\n SURPRISED: Image\n \"\"\"Verraste gezichtsafbeelding. (verrast)\"\"\"\n SILLY: Image\n \"\"\"Gek gezichtsafbeelding. (gek)\"\"\"\n FABULOUS: Image\n \"\"\"Zonnebril gezichtsafbeelding. (fantastisch)\"\"\"\n MEH: Image\n \"\"\"Niet onder de indruk gezichtsafbeelding.\"\"\"\n YES: Image\n \"\"\"Aanvinken afbeelding. (ja)\"\"\"\n NO: Image\n \"\"\"Kruis afbeelding. (nee)\"\"\"\n CLOCK12: Image\n \"\"\"Afbeelding met lijn die naar 12.00 uur wijst. (klok 12)\"\"\"\n CLOCK11: Image\n \"\"\"Afbeelding met lijn die naar 11.00 uur wijst. (klok 11)\"\"\"\n CLOCK10: Image\n \"\"\"Afbeelding met lijn die naar 10.00 uur wijst. (klok 10)\"\"\"\n CLOCK9: Image\n \"\"\"Afbeelding met lijn die naar 9.00 uur wijst. (klok 9)\"\"\"\n CLOCK8: Image\n \"\"\"Afbeelding met lijn die naar 8.00 uur wijst. (klok 8)\"\"\"\n CLOCK7: Image\n \"\"\"Afbeelding met lijn die naar 7.00 uur wijst. (klok 7)\"\"\"\n CLOCK6: Image\n \"\"\"Afbeelding met lijn die naar 6.00 uur wijst. (klok 6)\"\"\"\n CLOCK5: Image\n \"\"\"Afbeelding met lijn die naar 5.00 uur wijst. (klok 5)\"\"\"\n CLOCK4: Image\n \"\"\"Afbeelding met lijn die naar 4.00 uur wijst. (klok 4)\"\"\"\n CLOCK3: Image\n \"\"\"Afbeelding met lijn die naar 3.00 uur wijst. (klok 3)\"\"\"\n CLOCK2: Image\n \"\"\"Afbeelding met lijn die naar 2 uur wijst. (klok2)\"\"\"\n CLOCK1: Image\n \"\"\"Afbeelding met lijn die naar 1 uur wijst. (klok1)\"\"\"\n ARROW_N: Image\n \"\"\"Afbeelding van pijl richting het noorden. (pijl n)\"\"\"\n ARROW_NE: Image\n \"\"\"Afbeelding van pijl richting het noord oosten. (pijl NO)\"\"\"\n ARROW_E: Image\n \"\"\"Afbeelding van pijl richting het oosten. (pijl e)\"\"\"\n ARROW_SE: Image\n \"\"\"Afbeelding van pijl richting het zuid-oosten. (pijl ZO)\"\"\"\n ARROW_S: Image\n \"\"\"Afbeelding van pijltje richting het zuiden. (pijl z)\"\"\"\n ARROW_SW: Image\n \"\"\"Afbeelding van pijl richting het zuid-westen. (pijl ZW)\"\"\"\n ARROW_W: Image\n \"\"\"Afbeelding van pijl richting het westen. (pijl w)\"\"\"\n ARROW_NW: Image\n \"\"\"Afbeelding van pijl richting het noord-westen. (pijl NW)\"\"\"\n TRIANGLE: Image\n \"\"\"Afbeelding van een driehoek die naar boven wijst. (driehoek)\"\"\"\n TRIANGLE_LEFT: Image\n \"\"\"Afbeelding van een driehoek in de linker hoek. (Driehoek links)\"\"\"\n CHESSBOARD: Image\n \"\"\"Alternatieve LED's verlichten in een schaakbord patroon. (schaakbord)\"\"\"\n DIAMOND: Image\n \"\"\"Diamanten afbeelding. (diamant)\"\"\"\n DIAMOND_SMALL: Image\n \"\"\"Kleine diamanten afbeelding. (diamant klein)\"\"\"\n SQUARE: Image\n \"\"\"Vierkante afbeelding (vierkant)\"\"\"\n SQUARE_SMALL: Image\n \"\"\"Kleine vierkante afbeelding. (vierkant klein)\"\"\"\n RABBIT: Image\n \"\"\"Konijn afbeelding. (konijn)\"\"\"\n COW: Image\n \"\"\"Koe afbeelding. (koe)\"\"\"\n MUSIC_CROTCHET: Image\n \"\"\"Kwartnoot afbeelding. (muziek kwartnoot)\"\"\"\n MUSIC_QUAVER: Image\n \"\"\"Kwartnoot afbeelding. (muziek kwartnoot)\"\"\"\n MUSIC_QUAVERS: Image\n \"\"\"Koppel van kwartnoten afbeelding. (muziek kwartnoten)\"\"\"\n PITCHFORK: Image\n \"\"\"Stemvork afbeelding. (stemvork)\"\"\"\n XMAS: Image\n \"\"\"Kerstboom afbeelding. (kerstmis)\"\"\"\n PACMAN: Image\n \"\"\"Pac-Man arcade karakterafbeelding. (Pacman)\"\"\"\n TARGET: Image\n \"\"\"Doel afbeelding. (doel)\"\"\"\n TSHIRT: Image\n \"\"\"T-shirt afbeelding.\"\"\"\n ROLLERSKATE: Image\n \"\"\"Rolschaats afbeelding. (rolschaatsen)\"\"\"\n DUCK: Image\n \"\"\"Eend afbeelding. (eend)\"\"\"\n HOUSE: Image\n \"\"\"Huis afbeelding. (huis)\"\"\"\n TORTOISE: Image\n \"\"\"Schildpad afbeelding. (schildpad)\"\"\"\n BUTTERFLY: Image\n \"\"\"Vlinder afbeelding. (vlinder)\"\"\"\n STICKFIGURE: Image\n \"\"\"Stok figuur afbeelding. (stok figuur)\"\"\"\n GHOST: Image\n \"\"\"Spook afbeelding. (spook)\"\"\"\n SWORD: Image\n \"\"\"Zwaard afbeelding. (zwaard)\"\"\"\n GIRAFFE: Image\n \"\"\"Giraffe afbeelding.\"\"\"\n SKULL: Image\n \"\"\"Schedel afbeelding. (doodshoofd)\"\"\"\n UMBRELLA: Image\n \"\"\"Paraplu afbeelding. (paraplu)\"\"\"\n SNAKE: Image\n \"\"\"Slang afbeelding. (slang)\"\"\"\n SCISSORS: Image\n \"\"\"Schaar afbeelding. (schaar)\"\"\"\n ALL_CLOCKS: List[Image]\n \"\"\"Een lijst met alle CLOCK_ afbeeldingen achter elkaar. (alle klokken)\"\"\"\n ALL_ARROWS: List[Image]\n \"\"\"Een lijst met alle ARROW_ afbeeldingen in reeks. (alle pijlen)\"\"\"\n\n @overload\n def __init__(self, string: str) -> None:\n \"\"\"Maak een afbeelding van een tekenreeks die beschrijft welke LED's zijn. (initialiseren)\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: (tekenreeks) De tekenreeks die de afbeelding beschrijft.\"\"\"\n ...\n\n @overload\n def __init__(self, width: int=5, height: int=5, buffer: ReadableBuffer=None) -> None:\n \"\"\"Maak een lege afbeelding met ``width`` kolommen en ``height`` rijen. (initialiseren)\n\n:param width: (breedte) Optionele breedte van de afbeelding\n:param height: (hoogte) Optionele hoogte van de afbeelding\n:param buffer: Optionele array of bytes van ``width``\u00d7``height`` integers in bereik 0-9 om de afbeelding te initialiseren\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 \"\"\"Haal het aantal kolommen op. (breedte)\n\n:return: The number of columns in the image\"\"\"\n ...\n\n def height(self) -> int:\n \"\"\"Krijg het aantal rijen. (hoogte)\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 \"\"\"Stel de helderheid van een pixel in. (pixel instellen)\n\nExample: ``my_image.set_pixel(0, 0, 9)``\n\n:param x: (\u0445) Het kolom nummer\n:param y: Het rij nummer\n:param value: (waarde) De helderheid als een geheel getal tussen 0 (donker) en 9 (helder)\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 \"\"\"Krijg de helderheid van een pixel. (verkrijg pixel)\n\nExample: ``my_image.get_pixel(0, 0)``\n\n:param x: (\u0445) Het kolom nummer\n:param y: Het rij nummer\n:return: The brightness as an integer between 0 and 9.\"\"\"\n ...\n\n def shift_left(self, n: int) -> Image:\n \"\"\"Maak een nieuwe afbeelding door de afbeelding naar links te verschuiven. (verschuiving naar links)\n\nExample: ``Image.HEART_SMALL.shift_left(1)``\n\n:param n: Het aantal te verschuiven kolommen\n:return: The shifted image\"\"\"\n ...\n\n def shift_right(self, n: int) -> Image:\n \"\"\"Maak een nieuwe afbeelding door de afbeelding rechts te verschuiven. (verschuif Rechts)\n\nExample: ``Image.HEART_SMALL.shift_right(1)``\n\n:param n: Het aantal te verschuiven kolommen\n:return: The shifted image\"\"\"\n ...\n\n def shift_up(self, n: int) -> Image:\n \"\"\"Maak een nieuwe afbeelding door de afbeelding omhoog te schuiven. (verschuiving omhoog)\n\nExample: ``Image.HEART_SMALL.shift_up(1)``\n\n:param n: Het aantal rijen om te verschuiven met\n:return: The shifted image\"\"\"\n ...\n\n def shift_down(self, n: int) -> Image:\n \"\"\"Maak een nieuwe afbeelding door de afbeelding omlaag te verschuiven. (verschuif omlaag)\n\nExample: ``Image.HEART_SMALL.shift_down(1)``\n\n:param n: Het aantal rijen om te verschuiven met\n:return: The shifted image\"\"\"\n ...\n\n def crop(self, x: int, y: int, w: int, h: int) -> Image:\n \"\"\"Maak een nieuwe afbeelding door de afbeelding bij te snijden. (bij snijden)\n\nExample: ``Image.HEART.crop(1, 1, 3, 3)``\n\n:param x: (\u0445) De kolom verschuiving\n:param y: De rij verschuiving\n:param w: De bij snij breedte\n:param h: (uur) Hoogte bijsnijden\n:return: The new image\"\"\"\n ...\n\n def copy(self) -> Image:\n \"\"\"Maak een exacte kopie van de afbeelding. (kopi\u00eber)\n\nExample: ``Image.HEART.copy()``\n\n:return: The new image\"\"\"\n ...\n\n def invert(self) -> Image:\n \"\"\"Maak een nieuwe afbeelding door de helderheid van de pixels in de\nbronafbeelding om te draaien. (omkeren)\n\nExample: ``Image.SMALL_HEART.invert()``\n\n:return: The new image.\"\"\"\n ...\n\n def fill(self, value: int) -> None:\n \"\"\"Stel de helderheid van alle pixels in de afbeelding in. (opvullen)\n\nExample: ``my_image.fill(5)``\n\n:param value: (waarde) De nieuwe helderheid als een getal tussen 0 (donker) en 9 (helder).\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 \"\"\"Kopieer een gebied van een andere afbeelding naar deze afbeelding.\n\nExample: ``my_image.blit(Image.HEART, 1, 1, 3, 3, 1, 1)``\n\n:param src: De bron afbeelding\n:param x: (\u0445) De begin kolom offset in de bron afbeelding\n:param y: De beginkolom offset in de bronafbeelding\n:param w: Het aantal te kopi\u00ebren kolommen\n:param h: (uur) Het aantal te kopi\u00ebren rijen\n:param xdest: De kolomverschuiving om aan te passen in deze afbeelding\n:param ydest: De kolomverschuiving om aan te passen in deze afbeelding\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 \"\"\"Krijg een compacte tekenreeks die de afbeelding vertegenwoordigt.\"\"\"\n ...\n\n def __str__(self) -> str:\n \"\"\"Krijg een leesbare tekenreeks die de afbeelding vertegenwoordigt.\"\"\"\n ...\n\n def __add__(self, other: Image) -> Image:\n \"\"\"Maak een nieuwe afbeelding door de helderheidswaarden van de twee\nafbeeldingen voor elke pixel toe te voegen. (toevoegen)\n\nExample: ``Image.HEART + Image.HAPPY``\n\n:param other: (overige) De afbeelding om toe te voegen.\"\"\"\n ...\n\n def __sub__(self, other: Image) -> Image:\n \"\"\"Maak een nieuw beeld door de helderheidswaarden van de andere afbeelding van deze afbeelding af te trekken.\n\nExample: ``Image.HEART - Image.HEART_SMALL``\n\n:param other: (overige) De afbeelding om af te trekken.\"\"\"\n ...\n\n def __mul__(self, n: float) -> Image:\n \"\"\"Maak een nieuwe afbeelding door de helderheid van elke pixel te vermenigvuldigen met\n``n``.\n\nExample: ``Image.HEART * 0.5``\n\n:param n: De waarde om te vermenigvuldigen.\"\"\"\n ...\n\n def __truediv__(self, n: float) -> Image:\n \"\"\"Maak een nieuwe afbeelding door de helderheid van elke pixel te delen door\n``n``.\n\nExample: ``Image.HEART / 2``\n\n:param n: De waarde om mee te delen.\"\"\"\n ...\n\nclass SoundEvent:\n LOUD: SoundEvent\n \"\"\"Vertegenwoordigt de transitie van geluidsgebeurtenissen, van ``quiet`` tot ``loud`` zoals klappen of roepen. (luid)\"\"\"\n QUIET: SoundEvent\n \"\"\"Vertegenwoordigt de transitie van geluidsgebeurtenissen, van ``loud`` tot ``quiet`` zoals spreken of achtergrondmuziek. (stil)\"\"\"\n\nclass Sound:\n \"\"\"De ingebouwde geluiden kunnen worden aangeroepen met ``audio.play(Sound.NAME)``. (geluid)\"\"\"\n GIGGLE: Sound\n \"\"\"Giechelgeluidjes (giechelen)\"\"\"\n HAPPY: Sound\n \"\"\"Blij geluid. (blij)\"\"\"\n HELLO: Sound\n \"\"\"Groet geluid. (hallo)\"\"\"\n MYSTERIOUS: Sound\n \"\"\"Mysterieus geluid. (mysterieus)\"\"\"\n SAD: Sound\n \"\"\"Droevig geluid. (verdrietig)\"\"\"\n SLIDE: Sound\n \"\"\"Glij geluid. (Veeg)\"\"\"\n SOARING: Sound\n \"\"\"Zweef geluid. (stijgend)\"\"\"\n SPRING: Sound\n \"\"\"Spring geluid. (veer)\"\"\"\n TWINKLE: Sound\n \"\"\"Twinkel geluid. (twinkeling)\"\"\"\n YAWN: Sound\n \"\"\"Geeuwgeluiden (geeuw)\"\"\"", "/typeshed/stdlib/microbit/accelerometer.pyi": "\"\"\"Meet de versnelling van de micro:bit en herken gebaren. (acceleratiemeter)\"\"\"\nfrom typing import Tuple\n\ndef get_x() -> int:\n \"\"\"Krijg de acceleratiemeting in de ``x`` as in milli-g. (krijg 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 \"\"\"Krijg de acceleratiemeting in de ``y`` as in milli-g. (krijg 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 \"\"\"Krijg de acceleratiemeter meting in de ``z`` as in milli-g. (krijg 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 \"\"\"Verkrijg de acceleratiemeter metingen in alle assen tegelijk als een tupel. (krijg waarden)\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 \"\"\"Krijg de versnelling meting van alle assen gecombineerd, als een positief getal. Dit is de Pythagorische som van de X, Y en Z assen. (krijg sterkte)\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 \"\"\"Verkrijg de naam van het huidige gebaar. (huidig gebaar)\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 \"\"\"Controleer of het benoemde gebaar momenteel actief is. (is gebaren)\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: (naam) De naam van het gebaar.\n:return: ``True`` if the gesture is active, ``False`` otherwise.\"\"\"\n ...\n\ndef was_gesture(name: str) -> bool:\n \"\"\"Controleer of het benoemde gebaar actief was sinds het laatste gesprek. (was gebaren)\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: (naam) De naam van het gebaar.\n:return: ``True`` if the gesture was active since the last call, ``False`` otherwise.\"\"\"\n\ndef get_gestures() -> Tuple[str, ...]:\n \"\"\"Geeft als resultaat een reeks van de gebaren geschiedenis. (verkrijg gebaren)\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 \"\"\"Stel het gevoeligheidsbereik van de acceleratiemeter, in g (standaard zwaartekracht), in op de dichtstbijzijnde waarden die door de hardware worden ondersteund, zodat het wordt afgerond op ``2``, ``4`` of ``8`` g. (kies bereik)\n\nExample: ``accelerometer.set_range(8)``\n\n:param value: (waarde) Nieuwe bereik voor de acceleratiemeter, een geheel getal in ``g``.\"\"\"", "/typeshed/stdlib/microbit/audio.pyi": "\"\"\"Geluid afspelen met behulp van de micro:bit (importeer ``audio`` voor V1 compatibiliteit).\"\"\"\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 \"\"\"Een ingebouwde geluid, geluids effect of aangepaste audio frames afspelen. (afspelen)\n\nExample: ``audio.play(Sound.GIGGLE)``\n\n:param source: (bron) Een ingebouwde ``Sound`` zoals ``Sound.GIGGLE``, een ``SoundEffect`` of voorbeeldgegevens als een iteratie van ``AudioFrame`` objecten.\n:param wait: (wacht) Als ``wait`` ``True``is, wordt deze functie geblokkeerd totdat het geluid is voltooid.\n:param pin: Een optioneel argument om de uitvoerpin op te geven kan worden gebruikt om de standaard van ``pin0``te overschrijven. Als we geen geluid willen afspelen, kunnen we ``pin=None`` gebruiken.\n:param return_pin: (retourneer pin) Specificeert een differenti\u00eble rand connector pin om verbinding te maken met een externe luidspreker in plaats van de grond. Dit wordt genegeerd voor de **V2** herziening.\"\"\"\n\ndef is_playing() -> bool:\n \"\"\"Controleer of een geluid wordt gespeeld. (speelt af)\n\nExample: ``audio.is_playing()``\n\n:return: ``True`` if audio is playing, otherwise ``False``.\"\"\"\n ...\n\ndef stop() -> None:\n \"\"\"Stop het afspelen van de audio.\n\nExample: ``audio.stop()``\"\"\"\n ...\n\nclass SoundEffect:\n \"\"\"Een geluidseffect, bestaande uit een set parameters geconfigureerd via de constructor of attributen.\"\"\"\n WAVEFORM_SINE: ClassVar[int]\n \"\"\"De sinusgolf optie gebruikt voor de ``waveform`` parameter. (golfvorm sinus)\"\"\"\n WAVEFORM_SAWTOOTH: ClassVar[int]\n \"\"\"Zaag golf optie gebruikt voor de ``waveform`` parameter. (golfvorm zaagtand)\"\"\"\n WAVEFORM_TRIANGLE: ClassVar[int]\n \"\"\"De drie hoeks golf optie gebruikt voor de ``waveform`` parameter. (golfvorm driehoek)\"\"\"\n WAVEFORM_SQUARE: ClassVar[int]\n \"\"\"Blok golf optie die wordt gebruikt voor de parameter ``waveform``. (golfvorm vierkant)\"\"\"\n WAVEFORM_NOISE: ClassVar[int]\n \"\"\"Noise optie gebruikt voor de ``waveform`` parameter. (golfvormig geluid)\"\"\"\n SHAPE_LINEAR: ClassVar[int]\n \"\"\"Lineaire interpolatie optie die wordt gebruikt voor de ``shape`` parameter. (vorm lineair)\"\"\"\n SHAPE_CURVE: ClassVar[int]\n \"\"\"Curve interpolatie optie gebruikt voor de ``shape`` parameter. (vorm curve)\"\"\"\n SHAPE_LOG: ClassVar[int]\n \"\"\"Logaritmische interpolatie optie gebruikt voor de ``shape`` parameter. (vorm log)\"\"\"\n FX_NONE: ClassVar[int]\n \"\"\"Geen effectoptie gebruikt voor de ``fx`` parameter. (geen fx)\"\"\"\n FX_TREMOLO: ClassVar[int]\n \"\"\"Tremolo effect optie die wordt gebruikt voor de ``fx`` parameter.\"\"\"\n FX_VIBRATO: ClassVar[int]\n \"\"\"Vibrato effect optie die wordt gebruikt voor de ``fx`` parameter.\"\"\"\n FX_WARBLE: ClassVar[int]\n \"\"\"Warble effect optie die wordt gebruikt voor de ``fx`` parameter .\"\"\"\n freq_start: int\n \"\"\"Start frequentie in Hertz (Hz), een getal tussen ``0`` en ``9999`` (frequentie start)\"\"\"\n freq_end: int\n \"\"\"Eind frequentie in Hertz (Hz), een getal tussen ``0`` en ``9999`` (frequentie einde)\"\"\"\n duration: int\n \"\"\"Duur van het geluid in milliseconden, een getal tussen ``0`` en ``9999`` (Duur)\"\"\"\n vol_start: int\n \"\"\"Start volume waarde, een getal tussen ``0`` en ``255``\"\"\"\n vol_end: int\n \"\"\"Eind volume waarde, een getal tussen ``0`` en ``255`` (vol einde)\"\"\"\n waveform: int\n \"\"\"Type van golfvorm, \u00e9\u00e9n van deze waarden: ``WAVEFORM_SINE``, ``WAVEFORM_SAWTOOTH``, ``WAVEFORM_TRIANGLE``, ``WAVEFORM_SQUARE``, ``WAVEFORM_NOISE`` (willekeurig gegenereerde lawaai) (golfvorm)\"\"\"\n fx: int\n \"\"\"Effect om aan het geluid toe te voegen, een van de volgende waarden: ``FX_TREMOLO``, ``FX_VIBRATO``, ``FX_WARBLE``of ``FX_NONE``\"\"\"\n shape: int\n \"\"\"Het type van de interpolatie curve tussen de begin- en eind frequenties, verschillende golfvormen hebben verschillende snelheid bij het wijzigen van de frequentie. Een van de volgende waarden: ``SHAPE_LINEAR``, ``SHAPE_CURVE``, ``SHAPE_LOG`` (vorm)\"\"\"\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 \"\"\"Maak een nieuw geluidseffect. (initialiseren)\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: (frequentie start) Start frequentie in Hertz (Hz), een getal tussen ``0`` en ``9999``.\n:param freq_end: (frequentie einde) Eind frequentie in Hertz (Hz), een getal tussen ``0`` en ``9999``.\n:param duration: (duur) Duur van het geluid in milliseconden, een getal tussen ``0`` en ``9999``.\n:param vol_start: Startvolumewaarde, een getal tussen ``0`` en ``255``.\n:param vol_end: (vol einde) Eindvolumewaarde, een getal tussen ``0`` en ``255``.\n:param waveform: (golfvorm) Type golfvorm, \u00e9\u00e9n van deze waarden: ``WAVEFORM_SINE``, ``WAVEFORM_SAWTOOTH``, ``WAVEFORM_TRIANGLE``, ``WAVEFORM_SQUARE``, ``WAVEFORM_NOISE`` (willekeurig gegenereerde geluid).\n:param fx: Effect om het geluid toe te voegen, een van de volgende waarden: ``FX_TREMOLO``, ``FX_VIBRATO``, ``FX_WARBLE``of ``FX_NONE``.\n:param shape: (vorm) Het type van de interpolatie curve tussen de begin- en eind frequenties, verschillende golfvormen hebben verschillende snelheid bij het wijzigen van de frequentie. Een van de volgende waarden: ``SHAPE_LINEAR``, ``SHAPE_CURVE``, ``SHAPE_LOG``.\"\"\"\n\n def copy(self) -> SoundEffect:\n \"\"\"Maak een kopie van dit ``SoundEffect``. (kopi\u00eber)\n\nExample: ``sound_2 = sound_1.copy()``\n\n:return: A copy of the SoundEffect.\"\"\"\n\nclass AudioFrame:\n \"\"\"Een ``AudioFrame`` object is een lijst van 32 samples elk een niet-ondertekende byte\n(geheel getal tussen 0 en 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 \"\"\"Overschrijf de gegevens in deze ``AudioFrame`` met de gegevens van een andere ``AudioFrame`` instantie. (kopieer van)\n\nExample: ``my_frame.copyfrom(source_frame)``\n\n:param other: (overige) ``AudioFrame`` exemplaar van waar de gegevens worden gekopieerd.\"\"\"\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 ...", @@ -45,7 +45,7 @@ "/typeshed/stdlib/microbit/speaker.pyi": "\"\"\"Beheer de ingebouwde luidspreker (alleen V2). (luidspreker)\"\"\"\n\ndef off() -> None:\n \"\"\"Luidspreker uitschakelen. (uit)\n\nExample: ``speaker.off()``\n\nThis does not disable sound output to an edge connector pin.\"\"\"\n ...\n\ndef on() -> None:\n \"\"\"Luidspreker inschakelen (aan)\n\nExample: ``speaker.on()``\"\"\"\n ...", "/typeshed/stdlib/microbit/spi.pyi": "\"\"\"Communiceer met apparaten met behulp van de seri\u00eble perifere interface (SPI) bus.\"\"\"\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 \"\"\"Initialiseer SPI communicatie. (initialiseren)\n\nExample: ``spi.init()``\n\nFor correct communication, the parameters have to be the same on both communicating devices.\n\n:param baudrate: De snelheid van de communicatie.\n:param bits: De breedte in bits van elke overdracht. Momenteel wordt alleen ``bits=8`` ondersteund. Dit kan echter veranderen in de toekomst.\n:param mode: (modus) Bepaalt de combinatie van klokpolariteit en fase - `zie online tabel `_.\n:param sclk: sclk pin (standaard 13)\n:param mosi: mosi pin (standaard 15)\n:param miso: miso pin (standaard 14)\"\"\"\n ...\n\ndef read(nbytes: int) -> bytes:\n \"\"\"Lees bytes. (lezen)\n\nExample: ``spi.read(64)``\n\n:param nbytes: Maximum aantal te lezen bytes.\n:return: The bytes read.\"\"\"\n ...\n\ndef write(buffer: ReadableBuffer) -> None:\n \"\"\"Schrijf bytes naar de bus. (schrijven)\n\nExample: ``spi.write(bytes([1, 2, 3]))``\n\n:param buffer: Een buffer om gegevens van te lezen.\"\"\"\n ...\n\ndef write_readinto(out: WriteableBuffer, in_: ReadableBuffer) -> None:\n \"\"\"Schrijf de ``out`` buffer naar de bus en lees elke reactie in de ``in_`` buffer. (schrijf readinto)\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: (uit) De buffer om een reactie naar te schrijven.\n:param in_: De buffer om gegevens van te lezen.\"\"\"\n ...", "/typeshed/stdlib/microbit/uart.pyi": "\"\"\"Communiceer met een apparaat via een seri\u00eble interface.\"\"\"\nfrom _typeshed import WriteableBuffer\nfrom ..microbit import MicroBitDigitalPin\nfrom typing import Optional, Union\nODD: int\n\"\"\"Oneven pariteit (oneven)\"\"\"\nEVEN: int\n\"\"\"Even pariteit\"\"\"\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 \"\"\"Initialiseer seri\u00eble communicatie. (initialiseren)\n\nExample: ``uart.init(115200, tx=pin0, rx=pin1)``\n\n:param baudrate: De snelheid van de communicatie.\n:param bits: De grootte van de bytes die worden verzonden. micro:bit ondersteunt slechts 8.\n:param parity: (pariteit) Hoe de pariteit is aangevinkt, ``None``, ``uart.ODD`` of ``uart.EVEN``.\n:param stop: Het aantal stop bits, moet 1 zijn voor micro:bit.\n:param tx: Verzend pin.\n:param rx: Ontvangende pin.\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 \"\"\"Controleer of er nog gegevens staan te wachten. (elke)\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 \"\"\"Lees bytes. (lezen)\n\nExample: ``uart.read()``\n\n:param nbytes: Als ``nbytes`` is gespecificeerd, lees dan maximaal zoveel bytes, anders lees zo veel mogelijk bytes\n:return: A bytes object or ``None`` on timeout\"\"\"\n ...\n\ndef readinto(buf: WriteableBuffer, nbytes: Optional[int]=None) -> Optional[int]:\n \"\"\"Lees bytes in de ``buf``. (inlezen)\n\nExample: ``uart.readinto(input_buffer)``\n\n:param buf: De buffer om naar te schrijven.\n:param nbytes: Als ``nbytes`` is gespecificeerd, lees dan hooguit zoveel bytes, anders lees ``len(buf)`` bytes.\n:return: number of bytes read and stored into ``buf`` or ``None`` on timeout.\"\"\"\n ...\n\ndef readline() -> Optional[bytes]:\n \"\"\"Lees een regel, eindigend in een nieuw karakter regel. (leesregel)\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 \"\"\"Schrijf bytes naar de bus. (schrijven)\n\nExample: ``uart.write('hello world')``\n\n:param buf: Een bytes object of een tekenreeks.\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/_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", "/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 7a977a5b1..622feab42 100644 --- a/src/micropython/main/typeshed.zh-cn.json +++ b/src/micropython/main/typeshed.zh-cn.json @@ -34,7 +34,7 @@ "/typeshed/stdlib/ustruct.pyi": "from struct import *\n", "/typeshed/stdlib/usys.pyi": "from sys import *\n", "/typeshed/stdlib/utime.pyi": "from time import *\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/_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/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 ...", @@ -45,7 +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/_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", "/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 394ed24c4..c348326fa 100644 --- a/src/micropython/main/typeshed.zh-tw.json +++ b/src/micropython/main/typeshed.zh-tw.json @@ -34,7 +34,7 @@ "/typeshed/stdlib/ustruct.pyi": "from struct import *\n", "/typeshed/stdlib/usys.pyi": "from sys import *\n", "/typeshed/stdlib/utime.pyi": "from time import *\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/_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/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 \"\"\"Tremolo 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 ...", @@ -45,7 +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/_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", "/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 From f7f93793e00414d65d1f35b9acc701fb1f426f51 Mon Sep 17 00:00:00 2001 From: Matt Hillsdon Date: Tue, 28 May 2024 09:33:27 +0100 Subject: [PATCH 4/4] Tweaks --- src/documentation/api/ApiNode.tsx | 2 +- src/micropython/main/typeshed.en.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/documentation/api/ApiNode.tsx b/src/documentation/api/ApiNode.tsx index 660a46b71..21c449c85 100644 --- a/src/documentation/api/ApiNode.tsx +++ b/src/documentation/api/ApiNode.tsx @@ -296,7 +296,7 @@ const buildSignature = ( }; const isInitOrOtherNonDunderMethod = (c: ApiDocsEntry) => - !c.name.endsWith("__") || c.name === "__init__"; + !c.name.endsWith("__") || c.name === "__init__" || c.name === "__new__"; const filterChildren = ( children: ApiDocsEntry[] | undefined diff --git a/src/micropython/main/typeshed.en.json b/src/micropython/main/typeshed.en.json index 52d3f3a93..07e3f8885 100644 --- a/src/micropython/main/typeshed.en.json +++ b/src/micropython/main/typeshed.en.json @@ -5,7 +5,7 @@ "/typeshed/stdlib/antigravity.pyi": "", "/typeshed/stdlib/array.pyi": "from typing import Generic, Iterable, MutableSequence, TypeVar, Union, overload\nfrom typing_extensions import Literal\n\n_IntTypeCode = Literal[\"b\", \"B\", \"h\", \"H\", \"i\", \"I\", \"l\", \"L\", \"q\", \"Q\"]\n_FloatTypeCode = Literal[\"f\", \"d\"]\n_TypeCode = Union[_IntTypeCode, _FloatTypeCode]\n\n_T = TypeVar(\"_T\", int, float)\n\nclass array(MutableSequence[_T], Generic[_T]):\n @overload\n def __init__(\n self: array[int],\n typecode: _IntTypeCode,\n __initializer: Union[bytes, Iterable[_T]] = ...,\n ) -> None: ...\n @overload\n def __init__(\n self: array[float],\n typecode: _FloatTypeCode,\n __initializer: Union[bytes, Iterable[_T]] = ...,\n ) -> None: ...\n @overload\n def __init__(\n self, typecode: str, __initializer: Union[bytes, Iterable[_T]] = ...\n ) -> None: ...\n def append(self, __v: _T) -> None: ...\n def decode(self) -> str: ...\n def extend(self, __bb: Iterable[_T]) -> None: ...\n def __len__(self) -> int: ...\n @overload\n def __getitem__(self, i: int) -> _T: ...\n @overload\n def __getitem__(self, s: slice) -> array[_T]: ...\n @overload # type: ignore # Overrides MutableSequence\n def __setitem__(self, i: int, o: _T) -> None: ...\n @overload\n def __setitem__(self, s: slice, o: array[_T]) -> None: ...\n def __add__(self, x: array[_T]) -> array[_T]: ...\n def __iadd__(self, x: array[_T]) -> array[_T]: ... # type: ignore # Overrides MutableSequence\n\nArrayType = array\n", "/typeshed/stdlib/audio.pyi": "\"\"\"Play sounds using the micro:bit (import ``audio`` for V1 compatibility).\n\"\"\"\n\n# Re-export for V1 compatibility.\nfrom .microbit.audio import (\n is_playing as is_playing,\n play as play,\n stop as stop,\n AudioFrame as AudioFrame,\n SoundEffect as SoundEffect,\n)\n", - "/typeshed/stdlib/builtins.pyi": "\"\"\"Built-in classes and functions\n\"\"\"\n\nimport 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 \"\"\"The type class.\n \"\"\"\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 \"\"\"Get the type of an object.\n\n Example: ``type(\"hello, world)``\n\n :return: The type of the object passed in.\n \"\"\"\n ...\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 \"\"\"Get an integer from a number or a string.\n \"\"\"\n @overload\n def __new__(\n cls: Type[_T],\n x: str | bytes | SupportsInt | SupportsIndex | _SupportsTrunc = ...,\n ) -> _T:\n \"\"\"Get an integer from a number or a string.\n\n Example: ``int(\"1.2\")``\n\n :return: Zero if no argument is provided, or an ``int`` from a number or string truncated toward zero.\n \"\"\"\n ...\n @overload\n def __new__(\n cls: Type[_T], x: str | bytes | bytearray, base: SupportsIndex\n ) -> _T:\n \"\"\"Get an integer from a number or a string.\n\n Example: ``int(\"8.3\", 2)``\n\n :param base: (default=10) Allowed bases are 0 and 2\u201336.\n :return: Zero if no argument is provided, or an ``int`` from a number or string truncated toward zero.\n \"\"\"\n ...\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 \"\"\"Get a float from a number or a string.\n \"\"\"\n def __new__(\n cls: Type[_T], x: SupportsFloat | SupportsIndex | str | bytes | bytearray = ...\n ) -> _T:\n \"\"\"Convert a string or number to a floating point number, if possible.\n\n Example: ``float(\"1.2\")``\n\n :return: ``0.0`` if no argument is provided, or a ``float`` from a number or string.\n \"\"\"\n ...\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 \"\"\"Get a string version of an object or new empty string.\n \"\"\"\n @overload\n def __new__(cls: Type[_T], object: object = \"\") -> _T:\n \"\"\"Get a string version of an object.\n\n Example: ``string = str(42)``\n \n :param object: (default=\"\") Object to return a string version of.\n :return: A string reprentation of an object.\n \"\"\"\n ...\n @overload\n def __new__(\n cls: Type[_T], object: bytes = b\"\", encoding: str = \"uft-8\", errors: str = \"strict\"\n ) -> _T:\n \"\"\"Get a string version of an object.\n\n Example: ``string = str(42)``\n \n :param object: (default=b\"\") Object to return a string version of as bytes or a bytearray.\n :param encoding: (default=\"uft-8\") Encoding used to decode object.\n :param errors: (default=\"strict\") Something about error handling...\n :return: A string reprentation of an object.\n \"\"\"\n ...\n def count(\n self,\n x: str,\n start: SupportsIndex | None = ...,\n end: SupportsIndex | None = ...,\n ) -> int:\n \"\"\"Get the number of non-overlapping occurences of a substring in the string.\n\n The optional ``start`` and ``end`` arguments can be used to specify a substring in which to count.\n\n Example: ``count = \"banana\".count(\"na\")``\n \n :param x: The substring to count.\n :param start: Optional argument to specify the start of the substring in which to count.\n :param end: Optional argument to specify the end of the substring in which to count.\n :return: The number of non-overlapping occurences of a substring in the string as an ``int``.\n \"\"\"\n ...\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 \"\"\"Check if the string ends with a substring.\n\n The optional ``start`` and ``end`` arguments can be used to specify the range to test.\n\n Example: ``ends_with_hello = \"hello, world\".endswith(\"hello\")``\n \n :param prefix: The prefix to check for.\n :param start: Optional argument to specify the start of the substring to test.\n :param end: Optional argument to specify the end of the substring to test.\n :return: ``True`` if the string ends with the substring, otherwise ``False``.\n \"\"\"\n ...\n def find(\n self,\n sub: str,\n start: SupportsIndex | None = ...,\n end: SupportsIndex | None = ...,\n ) -> int:\n \"\"\"Get the lowest index of where the substring is found.\n\n The optional ``start`` and ``end`` arguments can be used to specify a substring in which to search.\n\n Example: ``index = \"banana\".find(\"na\")``\n \n :param sub: The substring to find.\n :param start: Optional argument to specify the start of the substring in which to search.\n :param end: Optional argument to specify the end of the substring in which to search.\n :return: The the lowest index of where the substring is found, -1 if not found.\n \"\"\"\n ...\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 \"\"\"Check if all the characters in the string are alphabetical.\n\n Example: ``\"Hello\".isalpha()``\n \n :return: ``True`` if the string is at least one character long and all the characters in the string are alphabetical, otherwise ``False``.\n \"\"\"\n ...\n def isdigit(self) -> bool:\n \"\"\"Check if all the characters in the string are digits.\n\n Example: ``\"123\".isdigit()``\n \n :return: ``True`` if the string is at least one character long and all the characters in the string are digits, otherwise ``False``.\n \"\"\"\n ...\n def islower(self) -> bool:\n \"\"\"Check if all the characters in the string are lower case.\n\n Example: ``\"hello\".islower()``\n \n :return: ``True`` if the string is at least one character long and all the characters in the string are lower case, otherwise ``False``.\n \"\"\"\n ...\n def isspace(self) -> bool:\n \"\"\"Check if all the characters in the string are whitespace characters.\n\n Example: ``\" \".isspace()``\n \n :return: ``True`` if the string is at least one character long and all the characters in the string are whitespace characters, otherwise ``False``.\n \"\"\"\n ...\n def isupper(self) -> bool:\n \"\"\"Check if all the characters in the string are upper case.\n\n Example: ``\"HELLO\".isupper()``\n \n :return: ``True`` if the string is at least one character long and all the characters in the string are upper case, otherwise ``False``.\n \"\"\"\n ...\n def join(self, __iterable: Iterable[str]) -> str: ...\n def lower(self) -> str:\n \"\"\"Get a copy of the string in lower case.\n\n Example: ``as_lower_case = \"HELLO\".lower()``\n \n :return: A copy of the string in lower case.\n \"\"\"\n ...\n def lstrip(self, __chars: str | None = ...) -> str:\n \"\"\"Get a copy of the string with the leading characters removed.\n\n Example: ``stripped = \" hello\".lstrip()``\n \n :param __chars: (default=\" \") The characters to be removed. Defaults to whitespace characters if not provided.\n :return: A copy of the string with the leading characters removed.\n \"\"\"\n ...\n def replace(self, old: str, new: str, count: SupportsIndex = ...) -> str:\n \"\"\"Get a copy of the string with all occurrences of the old substring replaced by new.\n\n Example: ``replaced = \"apple, orange\".replace(\"orange\", \"banana\")``\n \n :param old: The substring to replace.\n :param new: The replacement substring.\n :param count: Optional argument to specify the number of occurences of the old substring that should be replaced.\n :return: A copy of the string with all occurrences of the old substring replaced by new.\n \"\"\"\n ...\n def rfind(\n self,\n sub: str,\n start: SupportsIndex | None = ...,\n end: SupportsIndex | None = ...,\n ) -> int:\n \"\"\"Get the highest index of where the substring is found.\n\n The optional ``start`` and ``end`` arguments can be used to specify a substring in which to search.\n\n Example: ``index = \"banana\".rfind(\"na\")``\n\n :param sub: The substring to find.\n :param start: Optional argument to specify the start of the substring in which to search.\n :param end: Optional argument to specify the end of the substring in which to search.\n :return: The the highest index of where the substring is found, -1 if not found.\n \"\"\"\n ...\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 \"\"\"Get a copy of the string with the trailing characters removed.\n\n Example: ``stripped = \"hello \".rstrip()``\n \n :param __chars: (default=\" \") The characters to be removed. Defaults to whitespace characters if not provided.\n :return: A copy of the string with the trailing characters removed.\n \"\"\"\n ...\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 \"\"\"Check if the string starts with a substring.\n\n The optional ``start`` and ``end`` arguments can be used to specify the range to test.\n\n Example: ``starts_with_hello = \"hello, world\".startswith(\"hello\")``\n \n :param prefix: The prefix to check for.\n :param start: Optional argument to specify the start of the substring to test.\n :param end: Optional argument to specify the end of the substring to test.\n :return: ``True`` if the string starts with the substring, otherwise ``False``.\n \"\"\"\n ...\n def strip(self, chars: str | None = ...) -> str:\n \"\"\"Get a copy of the string with the leading and trailing characters removed.\n\n Example: ``stripped = \" hello \".strip()``\n \n :param chars: (default=\" \") The characters to be removed. Defaults to whitespace characters if not provided.\n :return: A copy of the string with the leading and trailing characters removed.\n \"\"\"\n ...\n def upper(self) -> str:\n \"\"\"Get a copy of the string in upper case.\n\n Example: ``as_upper_case = \"hello\".upper()``\n \n :return: A copy of the string in upper case.\n \"\"\"\n ...\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 frozenset(AbstractSet[_T_co], Generic[_T_co]):\n @overload\n def __new__(cls: type[Self]) -> Self: ...\n @overload\n def __new__(cls: type[Self], __iterable: Iterable[_T_co]) -> Self: ...\n def copy(self) -> FrozenSet[_T_co]: ...\n def difference(self, *s: Iterable[object]) -> FrozenSet[_T_co]: ...\n def intersection(self, *s: Iterable[object]) -> FrozenSet[_T_co]: ...\n def isdisjoint(self, s: Iterable[_T_co]) -> bool: ...\n def issubset(self, s: Iterable[object]) -> bool: ...\n def issuperset(self, s: Iterable[object]) -> bool: ...\n def symmetric_difference(self, s: Iterable[_T_co]) -> FrozenSet[_T_co]: ...\n def union(self, *s: Iterable[_T_co]) -> FrozenSet[_T_co]: ...\n def __len__(self) -> int: ...\n def __contains__(self, o: object) -> bool: ...\n def __iter__(self) -> Iterator[_T_co]: ...\n def __str__(self) -> str: ...\n def __and__(self, s: AbstractSet[_T_co]) -> FrozenSet[_T_co]: ...\n def __or__(self, s: AbstractSet[_S]) -> FrozenSet[_T_co | _S]: ...\n def __sub__(self, s: AbstractSet[_T_co]) -> FrozenSet[_T_co]: ...\n def __xor__(self, s: AbstractSet[_S]) -> FrozenSet[_T_co | _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 if sys.version_info >= (3, 9):\n def __class_getitem__(cls, item: Any) -> GenericAlias: ...\n\nclass list(MutableSequence[_T], Generic[_T]):\n \"\"\"The list data type\n \"\"\"\n @overload\n def __init__(self) -> None: ...\n @overload\n def __init__(self, iterable: Iterable[_T]) -> None: ...\n def clear(self) -> None:\n \"\"\"Remove all items from the list.\n \"\"\"\n ...\n def copy(self) -> list[_T]: ...\n def append(self, object: _T) -> None:\n \"\"\"Add an item to the end of the list.\n\n Example: ``[1, 2, 3].append(4)``\n \n :param object: An item to add the end of the list.\n \"\"\"\n ...\n def extend(self, __iterable: Iterable[_T]) -> None: ...\n def pop(self, index: SupportsIndex = ...) -> _T:\n \"\"\"Remove and return an item from the list.\n\n If no ``index`` is provided, the last item in the list is removed.\n An ``IndexError`` is raised if the ``index`` is outside of the list range.\n\n Example: ``[1, 2, 3, 4].pop()``\n \n :param __index: The index of the item to remove.\n :return: An item from the list.\n \"\"\"\n ...\n def index(\n self, value: _T, start: SupportsIndex = ..., stop: SupportsIndex = ...\n ) -> int: ...\n def count(self, value: _T) -> int:\n \"\"\"Get the number of times an item appears in the list.\n\n Example: ``[\"a\", \"b\", \"a\"].count(\"a\")``\n \n :param value: The item to count.\n :return: The number of times an item appears in the list.\n \"\"\"\n ...\n def insert(self, index: SupportsIndex, object: _T) -> None:\n \"\"\"Insert an item into the list at a given position.\n\n Example: ``[\"a\", \"b\", \"a\"].insert(2, \"c\")``\n \n :param index: The position at which to insert the item.\n :param object: The item to insert.\n \"\"\"\n ...\n def remove(self, value: _T) -> None:\n \"\"\"Remove the first occurence of a value from the list.\n\n A ``ValueError`` is raised if the ``value`` does not appear in the list.\n\n Example: ``[\"a\", \"b\", \"a\"].remove(\"a\")``\n \n :param value: The item to remove.\n \"\"\"\n ...\n def reverse(self) -> None:\n \"\"\"Reverses the order of the items in the list, in place.\n\n Example: ``[3, 2, 1].reverse()`\n \"\"\"\n ...\n @overload\n def sort(\n self: list[SupportsLessThanT], *, key: None = None, reverse: bool = False\n ) -> None:\n \"\"\"Sorts the items in the list, in place.\n\n Example: ``[1, 3, 2].sort()`\n\n :param key: A function used to specify the comparison between items in the list.\n :param reverse: A ``bool`` used to reverse the sorting order.\n \"\"\"\n ...\n @overload\n def sort(\n self, *, key: Callable[[_T], SupportsLessThan], reverse: bool = False\n ) -> None:\n \"\"\"Sorts the items in the list, in place.\n\n Example: ``['Watermelon', 'avocado'].sort(str.lower)``\n\n :param key: A function used to specify the comparison between items in the list.\n :param reverse: A ``bool`` used to reverse the sorting order.\n \"\"\"\n ...\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 \"\"\" The range class.\n \"\"\"\n start: int\n stop: int\n step: int\n @overload\n def __init__(self, stop: SupportsIndex) -> None:\n \"\"\"Get a range of values from 0 up tp the stop parameter.\n\n Example: ``rangeTimesTwo = [x * 2 for x in range(5)]``\n \n :param stop: An integer to determine the end of the range (exclusive).\n :return: A range object\n \"\"\"\n ...\n @overload\n def __init__(\n self, start: SupportsIndex, stop: SupportsIndex, step: SupportsIndex = ...\n ) -> None:\n \"\"\"Get a range of values from 0 up tp the stop parameter.\n\n Example: ``rangeTimesTwo = [x * 2 for x in range(1, 11, 2)]``\n \n :param start: (default=0) An integer to determine the start of the range (inclusive).\n :param stop: An integer to determine the end of the range (exclusive).\n :param step: (default=1) The increment for each value in the range.\n :return: A range object\n \"\"\"\n ...\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:\n \"\"\"Get the absolute value of a number.\n\n Example: ``abs(-42)``\n\n :param x: A number.\n :return: The length of or number of items in an object. \n \"\"\" \n ...\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 \"\"\"Get a Unicode string representation of an integer.\n\n Example: ``chr(97)``\n\n :param i: An integer within the range 0..1,114,111.\n :return: A Unicode string representation of a number within a valid range. \n \"\"\" \n ...\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(request: object) -> None:\n \"\"\"Starts interactive help or provides help for the request object, if valid.\n\n Example: ``help(\"print\")``\n \"\"\"\n ...\ndef hex(number: int | SupportsIndex) -> str:\n \"\"\"Get the hexadecimal representation of an integer.\n\n Example: ``hex(42)``\n \n :return: The hexadecimal representation of an integer as a string.\n \"\"\"\n ...\ndef id(__obj: object) -> int: ...\ndef input(prompt: object = \"\") -> str:\n \"\"\"Get user input as a string.\n\n Example: ``prompt(\"Enter your name: \")``\n\n :param prompt: (default=\"\") Text prompt seen by users.\n :return: The length of or number of items in an object.\n \"\"\"\n ...\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:\n \"\"\"Get the length of, or number of items in an object.\n\n Example: ``len(\"Hello, world\")``\n\n :param __obj: A sequence (such as a string, bytes, tuple, list, or range) or a collection (such as a dictionary, set, or frozen set).\n :return: The length of or number of items in an object.\n \"\"\" \n ...\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:\n \"\"\"Get an integer representation of a Unicode character.\n\n Example: ``ord(\"a\")``\n\n :param c: A Unicode character.\n :return: The length of or number of items in an object.\n \"\"\"\n ...\ndef print(\n *values: object,\n sep: str | None = \" \",\n end: str | None = \"\\n\",\n file: SupportsWrite[str] | None = None,\n flush: bool = False,\n) -> None:\n \"\"\"Prints values to a stream or standard output, typically the serial console.\n\n Example: ``print(\"Hello, world\")``\n\n :param *values: Arguments or literals to print.\n :param sep: (default=\" \") A string separator inserted between values.\n :param end: (default=\"\\n\") A string appended after the last value.\n :param file: (default=None) A file-like object (stream).\n :param flush: (default=False) Whether to forcibly flush the stream.\n \"\"\"\n ...\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 \"\"\"Round a number to the nearest integer.\n\n Example: ``round(42.42)``\n\n :param number: A number to round to the nearest integer.\n :return: Round a number to the nearest integer.\n \"\"\"\n ...\n@overload\ndef round(number: SupportsRound[Any], ndigits: None) -> int:\n \"\"\"Round a number to the nearest integer.\n\n Example: ``round(42.42, None)``\n\n :param number: A number to round to the nearest integer.\n :param ndigits: The number of decimal digits to round to.\n :return: Round a number to the nearest integer.\n \"\"\"\n ...\n@overload\ndef round(number: SupportsRound[_T], ndigits: SupportsIndex) -> _T:\n \"\"\"Round a number to the nearest integer.\n\n Example: ``round(42.42, 1)``\n\n :param number: A number to round to the number of decimal digits specified.\n :param ndigits: The number of decimal digits to round to.\n :return: The input number rounded to the number of decimal digits specified.\n \"\"\"\n ...\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/builtins.pyi": "\"\"\"Built-in classes and functions\n\nYou do not need to import the ``builtins`` module.\n\"\"\"\n\nimport 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 \"\"\"The type class.\n \"\"\"\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 \"\"\"Get the type of an object.\n\n Example: ``type(\"hello, world)``\n\n :return: The type of the object passed in.\n \"\"\"\n ...\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 \"\"\"Get an integer from a number or a string.\n \"\"\"\n @overload\n def __new__(\n cls: Type[_T],\n x: str | bytes | SupportsInt | SupportsIndex | _SupportsTrunc = ...,\n ) -> _T:\n \"\"\"Get an integer from a number or a string.\n\n Example: ``int(\"1.2\")``\n\n :return: Zero if no argument is provided, or an ``int`` from a number or string truncated toward zero.\n \"\"\"\n ...\n @overload\n def __new__(\n cls: Type[_T], x: str | bytes | bytearray, base: SupportsIndex\n ) -> _T:\n \"\"\"Get an integer from a number or a string.\n\n Example: ``int(\"8.3\", 2)``\n\n :param base: (default=10) Allowed bases are 0 and 2\u201336.\n :return: Zero if no argument is provided, or an ``int`` from a number or string truncated toward zero.\n \"\"\"\n ...\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 \"\"\"Get a float from a number or a string.\n \"\"\"\n def __new__(\n cls: Type[_T], x: SupportsFloat | SupportsIndex | str | bytes | bytearray = ...\n ) -> _T:\n \"\"\"Convert a string or number to a floating point number, if possible.\n\n Example: ``float(\"1.2\")``\n\n :return: ``0.0`` if no argument is provided, or a ``float`` from a number or string.\n \"\"\"\n ...\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 \"\"\"Get a string version of an object or new empty string.\n \"\"\"\n @overload\n def __new__(cls: Type[_T], object: object = \"\") -> _T:\n \"\"\"Get a string version of an object.\n\n Example: ``string = str(42)``\n \n :param object: (default=\"\") Object to return a string version of.\n :return: A string reprentation of an object.\n \"\"\"\n ...\n @overload\n def __new__(\n cls: Type[_T], object: bytes = b\"\", encoding: str = \"uft-8\", errors: str = \"strict\"\n ) -> _T:\n \"\"\"Get a string version of an object.\n\n Example: ``string = str(42)``\n \n :param object: (default=b\"\") Object to return a string version of as bytes or a bytearray.\n :param encoding: (default=\"uft-8\") Encoding used to decode object.\n :param errors: (default=\"strict\") Something about error handling...\n :return: A string reprentation of an object.\n \"\"\"\n ...\n def count(\n self,\n x: str,\n start: SupportsIndex | None = ...,\n end: SupportsIndex | None = ...,\n ) -> int:\n \"\"\"Get the number of non-overlapping occurences of a substring in the string.\n\n The optional ``start`` and ``end`` arguments can be used to specify a substring in which to count.\n\n Example: ``count = \"banana\".count(\"na\")``\n \n :param x: The substring to count.\n :param start: Optional argument to specify the start of the substring in which to count.\n :param end: Optional argument to specify the end of the substring in which to count.\n :return: The number of non-overlapping occurences of a substring in the string as an ``int``.\n \"\"\"\n ...\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 \"\"\"Check if the string ends with a substring.\n\n The optional ``start`` and ``end`` arguments can be used to specify the range to test.\n\n Example: ``ends_with_hello = \"hello, world\".endswith(\"hello\")``\n \n :param prefix: The prefix to check for.\n :param start: Optional argument to specify the start of the substring to test.\n :param end: Optional argument to specify the end of the substring to test.\n :return: ``True`` if the string ends with the substring, otherwise ``False``.\n \"\"\"\n ...\n def find(\n self,\n sub: str,\n start: SupportsIndex | None = ...,\n end: SupportsIndex | None = ...,\n ) -> int:\n \"\"\"Get the lowest index of where the substring is found.\n\n The optional ``start`` and ``end`` arguments can be used to specify a substring in which to search.\n\n Example: ``index = \"banana\".find(\"na\")``\n \n :param sub: The substring to find.\n :param start: Optional argument to specify the start of the substring in which to search.\n :param end: Optional argument to specify the end of the substring in which to search.\n :return: The the lowest index of where the substring is found, -1 if not found.\n \"\"\"\n ...\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 \"\"\"Check if all the characters in the string are alphabetical.\n\n Example: ``\"Hello\".isalpha()``\n \n :return: ``True`` if the string is at least one character long and all the characters in the string are alphabetical, otherwise ``False``.\n \"\"\"\n ...\n def isdigit(self) -> bool:\n \"\"\"Check if all the characters in the string are digits.\n\n Example: ``\"123\".isdigit()``\n \n :return: ``True`` if the string is at least one character long and all the characters in the string are digits, otherwise ``False``.\n \"\"\"\n ...\n def islower(self) -> bool:\n \"\"\"Check if all the characters in the string are lower case.\n\n Example: ``\"hello\".islower()``\n \n :return: ``True`` if the string is at least one character long and all the characters in the string are lower case, otherwise ``False``.\n \"\"\"\n ...\n def isspace(self) -> bool:\n \"\"\"Check if all the characters in the string are whitespace characters.\n\n Example: ``\" \".isspace()``\n \n :return: ``True`` if the string is at least one character long and all the characters in the string are whitespace characters, otherwise ``False``.\n \"\"\"\n ...\n def isupper(self) -> bool:\n \"\"\"Check if all the characters in the string are upper case.\n\n Example: ``\"HELLO\".isupper()``\n \n :return: ``True`` if the string is at least one character long and all the characters in the string are upper case, otherwise ``False``.\n \"\"\"\n ...\n def join(self, __iterable: Iterable[str]) -> str: ...\n def lower(self) -> str:\n \"\"\"Get a copy of the string in lower case.\n\n Example: ``as_lower_case = \"HELLO\".lower()``\n \n :return: A copy of the string in lower case.\n \"\"\"\n ...\n def lstrip(self, __chars: str | None = ...) -> str:\n \"\"\"Get a copy of the string with the leading characters removed.\n\n Example: ``stripped = \" hello\".lstrip()``\n \n :param __chars: (default=\" \") The characters to be removed. Defaults to whitespace characters if not provided.\n :return: A copy of the string with the leading characters removed.\n \"\"\"\n ...\n def replace(self, old: str, new: str, count: SupportsIndex = ...) -> str:\n \"\"\"Get a copy of the string with all occurrences of the old substring replaced by new.\n\n Example: ``replaced = \"apple, orange\".replace(\"orange\", \"banana\")``\n \n :param old: The substring to replace.\n :param new: The replacement substring.\n :param count: Optional argument to specify the number of occurences of the old substring that should be replaced.\n :return: A copy of the string with all occurrences of the old substring replaced by new.\n \"\"\"\n ...\n def rfind(\n self,\n sub: str,\n start: SupportsIndex | None = ...,\n end: SupportsIndex | None = ...,\n ) -> int:\n \"\"\"Get the highest index of where the substring is found.\n\n The optional ``start`` and ``end`` arguments can be used to specify a substring in which to search.\n\n Example: ``index = \"banana\".rfind(\"na\")``\n\n :param sub: The substring to find.\n :param start: Optional argument to specify the start of the substring in which to search.\n :param end: Optional argument to specify the end of the substring in which to search.\n :return: The the highest index of where the substring is found, -1 if not found.\n \"\"\"\n ...\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 \"\"\"Get a copy of the string with the trailing characters removed.\n\n Example: ``stripped = \"hello \".rstrip()``\n \n :param __chars: (default=\" \") The characters to be removed. Defaults to whitespace characters if not provided.\n :return: A copy of the string with the trailing characters removed.\n \"\"\"\n ...\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 \"\"\"Check if the string starts with a substring.\n\n The optional ``start`` and ``end`` arguments can be used to specify the range to test.\n\n Example: ``starts_with_hello = \"hello, world\".startswith(\"hello\")``\n \n :param prefix: The prefix to check for.\n :param start: Optional argument to specify the start of the substring to test.\n :param end: Optional argument to specify the end of the substring to test.\n :return: ``True`` if the string starts with the substring, otherwise ``False``.\n \"\"\"\n ...\n def strip(self, chars: str | None = ...) -> str:\n \"\"\"Get a copy of the string with the leading and trailing characters removed.\n\n Example: ``stripped = \" hello \".strip()``\n \n :param chars: (default=\" \") The characters to be removed. Defaults to whitespace characters if not provided.\n :return: A copy of the string with the leading and trailing characters removed.\n \"\"\"\n ...\n def upper(self) -> str:\n \"\"\"Get a copy of the string in upper case.\n\n Example: ``as_upper_case = \"hello\".upper()``\n \n :return: A copy of the string in upper case.\n \"\"\"\n ...\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 frozenset(AbstractSet[_T_co], Generic[_T_co]):\n @overload\n def __new__(cls: type[Self]) -> Self: ...\n @overload\n def __new__(cls: type[Self], __iterable: Iterable[_T_co]) -> Self: ...\n def copy(self) -> FrozenSet[_T_co]: ...\n def difference(self, *s: Iterable[object]) -> FrozenSet[_T_co]: ...\n def intersection(self, *s: Iterable[object]) -> FrozenSet[_T_co]: ...\n def isdisjoint(self, s: Iterable[_T_co]) -> bool: ...\n def issubset(self, s: Iterable[object]) -> bool: ...\n def issuperset(self, s: Iterable[object]) -> bool: ...\n def symmetric_difference(self, s: Iterable[_T_co]) -> FrozenSet[_T_co]: ...\n def union(self, *s: Iterable[_T_co]) -> FrozenSet[_T_co]: ...\n def __len__(self) -> int: ...\n def __contains__(self, o: object) -> bool: ...\n def __iter__(self) -> Iterator[_T_co]: ...\n def __str__(self) -> str: ...\n def __and__(self, s: AbstractSet[_T_co]) -> FrozenSet[_T_co]: ...\n def __or__(self, s: AbstractSet[_S]) -> FrozenSet[_T_co | _S]: ...\n def __sub__(self, s: AbstractSet[_T_co]) -> FrozenSet[_T_co]: ...\n def __xor__(self, s: AbstractSet[_S]) -> FrozenSet[_T_co | _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 if sys.version_info >= (3, 9):\n def __class_getitem__(cls, item: Any) -> GenericAlias: ...\n\nclass list(MutableSequence[_T], Generic[_T]):\n \"\"\"The list data type\n \"\"\"\n @overload\n def __init__(self) -> None: ...\n @overload\n def __init__(self, iterable: Iterable[_T]) -> None: ...\n def clear(self) -> None:\n \"\"\"Remove all items from the list.\n \"\"\"\n ...\n def copy(self) -> list[_T]: ...\n def append(self, object: _T) -> None:\n \"\"\"Add an item to the end of the list.\n\n Example: ``[1, 2, 3].append(4)``\n \n :param object: An item to add the end of the list.\n \"\"\"\n ...\n def extend(self, __iterable: Iterable[_T]) -> None: ...\n def pop(self, index: SupportsIndex = ...) -> _T:\n \"\"\"Remove and return an item from the list.\n\n If no ``index`` is provided, the last item in the list is removed.\n An ``IndexError`` is raised if the ``index`` is outside of the list range.\n\n Example: ``[1, 2, 3, 4].pop()``\n \n :param __index: The index of the item to remove.\n :return: An item from the list.\n \"\"\"\n ...\n def index(\n self, value: _T, start: SupportsIndex = ..., stop: SupportsIndex = ...\n ) -> int: ...\n def count(self, value: _T) -> int:\n \"\"\"Get the number of times an item appears in the list.\n\n Example: ``[\"a\", \"b\", \"a\"].count(\"a\")``\n \n :param value: The item to count.\n :return: The number of times an item appears in the list.\n \"\"\"\n ...\n def insert(self, index: SupportsIndex, object: _T) -> None:\n \"\"\"Insert an item into the list at a given position.\n\n Example: ``[\"a\", \"b\", \"a\"].insert(2, \"c\")``\n \n :param index: The position at which to insert the item.\n :param object: The item to insert.\n \"\"\"\n ...\n def remove(self, value: _T) -> None:\n \"\"\"Remove the first occurence of a value from the list.\n\n A ``ValueError`` is raised if the ``value`` does not appear in the list.\n\n Example: ``[\"a\", \"b\", \"a\"].remove(\"a\")``\n \n :param value: The item to remove.\n \"\"\"\n ...\n def reverse(self) -> None:\n \"\"\"Reverses the order of the items in the list, in place.\n\n Example: ``[3, 2, 1].reverse()`\n \"\"\"\n ...\n @overload\n def sort(\n self: list[SupportsLessThanT], *, key: None = None, reverse: bool = False\n ) -> None:\n \"\"\"Sorts the items in the list, in place.\n\n Example: ``[1, 3, 2].sort()`\n\n :param key: A function used to specify the comparison between items in the list.\n :param reverse: A ``bool`` used to reverse the sorting order.\n \"\"\"\n ...\n @overload\n def sort(\n self, *, key: Callable[[_T], SupportsLessThan], reverse: bool = False\n ) -> None:\n \"\"\"Sorts the items in the list, in place.\n\n Example: ``['Watermelon', 'avocado'].sort(str.lower)``\n\n :param key: A function used to specify the comparison between items in the list.\n :param reverse: A ``bool`` used to reverse the sorting order.\n \"\"\"\n ...\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 \"\"\" The range class.\n \"\"\"\n start: int\n stop: int\n step: int\n @overload\n def __init__(self, stop: SupportsIndex) -> None:\n \"\"\"Get a range of values from 0 up tp the stop parameter.\n\n Example: ``rangeTimesTwo = [x * 2 for x in range(5)]``\n \n :param stop: An integer to determine the end of the range (exclusive).\n :return: A range object\n \"\"\"\n ...\n @overload\n def __init__(\n self, start: SupportsIndex, stop: SupportsIndex, step: SupportsIndex = ...\n ) -> None:\n \"\"\"Get a range of values from 0 up tp the stop parameter.\n\n Example: ``rangeTimesTwo = [x * 2 for x in range(1, 11, 2)]``\n \n :param start: (default=0) An integer to determine the start of the range (inclusive).\n :param stop: An integer to determine the end of the range (exclusive).\n :param step: (default=1) The increment for each value in the range.\n :return: A range object\n \"\"\"\n ...\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:\n \"\"\"Get the absolute value of a number.\n\n Example: ``abs(-42)``\n\n :param x: A number.\n :return: The length of or number of items in an object. \n \"\"\" \n ...\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 \"\"\"Get a Unicode string representation of an integer.\n\n Example: ``chr(97)``\n\n :param i: An integer within the range 0..1,114,111.\n :return: A Unicode string representation of a number within a valid range. \n \"\"\" \n ...\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(request: object) -> None:\n \"\"\"Starts interactive help or provides help for the request object, if valid.\n\n Example: ``help(\"print\")``\n \"\"\"\n ...\ndef hex(number: int | SupportsIndex) -> str:\n \"\"\"Get the hexadecimal representation of an integer.\n\n Example: ``hex(42)``\n \n :return: The hexadecimal representation of an integer as a string.\n \"\"\"\n ...\ndef id(__obj: object) -> int: ...\ndef input(prompt: object = \"\") -> str:\n \"\"\"Get user input as a string.\n\n Example: ``prompt(\"Enter your name: \")``\n\n :param prompt: (default=\"\") Text prompt seen by users.\n :return: The length of or number of items in an object.\n \"\"\"\n ...\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:\n \"\"\"Get the length of, or number of items in an object.\n\n Example: ``len(\"Hello, world\")``\n\n :param __obj: A sequence (such as a string, bytes, tuple, list, or range) or a collection (such as a dictionary, set, or frozen set).\n :return: The length of or number of items in an object.\n \"\"\" \n ...\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:\n \"\"\"Get an integer representation of a Unicode character.\n\n Example: ``ord(\"a\")``\n\n :param c: A Unicode character.\n :return: The length of or number of items in an object.\n \"\"\"\n ...\ndef print(\n *values: object,\n sep: str | None = \" \",\n end: str | None = \"\\n\",\n file: SupportsWrite[str] | None = None,\n flush: bool = False,\n) -> None:\n \"\"\"Prints values to a stream or standard output, typically the serial console.\n\n Example: ``print(\"Hello, world\")``\n\n :param *values: Arguments or literals to print.\n :param sep: (default=\" \") A string separator inserted between values.\n :param end: (default=\"\\n\") A string appended after the last value.\n :param file: (default=None) A file-like object (stream).\n :param flush: (default=False) Whether to forcibly flush the stream.\n \"\"\"\n ...\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 \"\"\"Round a number to the nearest integer.\n\n Example: ``round(42.42)``\n\n :param number: A number to round to the nearest integer.\n :return: Round a number to the nearest integer.\n \"\"\"\n ...\n@overload\ndef round(number: SupportsRound[Any], ndigits: None) -> int:\n \"\"\"Round a number to the nearest integer.\n\n Example: ``round(42.42, None)``\n\n :param number: A number to round to the nearest integer.\n :param ndigits: The number of decimal digits to round to.\n :return: Round a number to the nearest integer.\n \"\"\"\n ...\n@overload\ndef round(number: SupportsRound[_T], ndigits: SupportsIndex) -> _T:\n \"\"\"Round a number to the nearest integer.\n\n Example: ``round(42.42, 1)``\n\n :param number: A number to round to the number of decimal digits specified.\n :param ndigits: The number of decimal digits to round to.\n :return: The input number rounded to the number of decimal digits specified.\n \"\"\"\n ...\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": "\"\"\"Control the garbage collector\"\"\"\n\nfrom typing import overload\n\ndef enable() -> None:\n \"\"\"Enable automatic garbage collection.\"\"\"\n ...\n\ndef disable() -> None:\n \"\"\"Disable automatic garbage collection.\n\n Heap memory can still be allocated,\n and garbage collection can still be initiated manually using ``gc.collect``.\"\"\"\n\ndef collect() -> None:\n \"\"\"Run a garbage collection.\"\"\"\n ...\n\ndef mem_alloc() -> int:\n \"\"\"Get the number of bytes of heap RAM that are allocated.\n\n :return: The number of bytes allocated.\n\n This function is MicroPython extension.\n \"\"\"\n ...\n\ndef mem_free() -> int:\n \"\"\"Get the number of bytes of available heap RAM, or -1 if this amount is not known.\n\n :return: The number of bytes free.\n\n This function is MicroPython extension.\n \"\"\"\n ...\n\n@overload\ndef threshold() -> int:\n \"\"\"Query the additional GC allocation threshold.\n\n :return: The GC allocation threshold.\n\n This function is a MicroPython extension. CPython has a similar\n function - ``set_threshold()``, but due to different GC\n implementations, its signature and semantics are different.\n \"\"\"\n ...\n\n@overload\ndef threshold(amount: int) -> None:\n \"\"\"Set the additional GC allocation threshold.\n\n Normally, a collection is triggered only when a new allocation\n cannot be satisfied, i.e. on an out-of-memory (OOM) condition.\n If this function is called, in addition to OOM, a collection\n will be triggered each time after ``amount`` bytes have been\n allocated (in total, since the previous time such an amount of bytes\n have been allocated). ``amount`` is usually specified as less than the\n full heap size, with the intention to trigger a collection earlier than when the\n heap becomes exhausted, and in the hope that an early collection will prevent\n excessive memory fragmentation. This is a heuristic measure, the effect\n of which will vary from application to application, as well as\n the optimal value of the ``amount`` parameter.\n\n A value of -1 means a disabled allocation threshold.\n\n This function is a MicroPython extension. CPython has a similar\n function - ``set_threshold()``, but due to different GC\n implementations, its signature and semantics are different.\n\n :param amount: The number of bytes after which a garbage collection should be triggered.\n \"\"\"\n ...\n", "/typeshed/stdlib/log.pyi": "\"\"\"Log data to your micro:bit V2.\"\"\"\n\nfrom typing import Literal, Mapping, Optional, Union, overload\n\nMILLISECONDS = 1\n\"\"\"Milliseconds timestamp format.\"\"\"\n\nSECONDS = 10\n\"\"\"Seconds timestamp format.\"\"\"\n\nMINUTES = 600\n\"\"\"Minutes timestamp format.\"\"\"\n\nHOURS = 36000\n\"\"\"Hours timestamp format.\"\"\"\n\nDAYS = 864000\n\"\"\"Days timestamp format.\"\"\"\n\ndef set_labels(\n *labels: str, timestamp: Optional[Literal[1, 10, 36000, 864000]] = SECONDS\n) -> None:\n \"\"\"Set up the log file header.\n\n Example: ``log.set_labels('X', 'Y', 'Z', timestamp=log.MINUTES)``\n\n Ideally this function should be called a single time, before any data is\n logged, to configure the data table header once.\n\n If a log file already exists when the program starts, or if this function\n is called multiple times, it will check the labels already defined in the\n log file. If this function call contains any new labels not already\n present, it will generate a new header row with the additional columns.\n\n By default the first column contains a timestamp for each row. The time\n unit 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: 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\n@overload\ndef add(\n data_dictionary: Optional[Mapping[str, Union[str, int, float]]],\n) -> None:\n \"\"\"Add a data row to the log by passing a dictionary of headers and values.\n\n Example: ``log.add({ 'temp': temperature() })``\n\n Each call to this function adds a row to the log.\n\n New labels not previously specified via the set_labels function, or by a\n previous call to this function, will trigger a new header entry to be added\n to the log with the extra labels.\n\n Labels previously specified and not present in a call to this function will\n be 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\n@overload\ndef add(**kwargs: Union[str, int, float]) -> None:\n \"\"\"Add a data row to the log using keyword arguments.\n\n Example: ``log.add(temp=temperature())``\n\n Each call to this function adds a row to the log.\n\n New labels not previously specified via the set_labels function, or by a\n previous call to this function, will trigger a new header entry to be added\n to the log with the extra labels.\n\n Labels previously specified and not present in a call to this function will\n be skipped with an empty value in the log row.\n \"\"\"\n ...\n\ndef delete(full=False):\n \"\"\"Deletes the contents of the log, including headers.\n\n Example: ``log.delete()``\n\n To add the log headers again the ``set_labels`` function should to be called after this function.\n\n There are two erase modes; \u201cfull\u201d completely removes the data from the physical storage,\n and \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 ...\n\ndef set_mirroring(serial: bool):\n \"\"\"Configure mirroring of the data logging activity to the serial output.\n\n Example: ``log.set_mirroring(True)``\n\n Serial 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 \"\"\"\n ...\n",