diff --git a/src/documentation/api/ApiNode.tsx b/src/documentation/api/ApiNode.tsx index d245123d2..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 @@ -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/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.de.json b/src/micropython/main/typeshed.de.json index 9835b2b1c..713598273 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 ...", @@ -35,14 +35,14 @@ "/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/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", diff --git a/src/micropython/main/typeshed.en.json b/src/micropython/main/typeshed.en.json index bc1ca4af5..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": "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": "\"\"\"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", diff --git a/src/micropython/main/typeshed.es-es.json b/src/micropython/main/typeshed.es-es.json index 391c800ce..fa2e1cd07 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 ...", @@ -35,16 +35,16 @@ "/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/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/microbit/uart.pyi": "\"\"\"Comunicarse con un dispositivo usando una interfaz serie.\"\"\"\nfrom _typeshed import WriteableBuffer\nfrom ..microbit import MicroBitDigitalPin\nfrom typing import Optional, Union\nODD: int\n\"\"\"Paridad impar (impar)\"\"\"\nEVEN: int\n\"\"\"Paridad par (par)\"\"\"\n\ndef init(baudrate: int=9600, bits: int=8, parity: Optional[int]=None, stop: int=1, tx: Optional[MicroBitDigitalPin]=None, rx: Optional[MicroBitDigitalPin]=None) -> None:\n \"\"\"Inicializa la comunicaci\u00f3n serie.\n\nExample: ``uart.init(115200, tx=pin0, rx=pin1)``\n\n:param baudrate: (tasa de baudios) La velocidad de comunicaci\u00f3n.\n:param bits: El tama\u00f1o de bytes transmitidos; micro:bit solo admite 8.\n:param parity: (paridad) C\u00f3mo se comprueba la paridad: ``None``, ``uart.ODD`` o ``uart.EVEN``.\n:param stop: (detener) El n\u00famero de bits de parada; tiene que ser 1 para el micro:bit.\n:param tx: Pin transmisor.\n:param rx: Pin receptor.\n\nInitializing the UART on external pins will cause the Python console on\nUSB to become unaccessible, as it uses the same hardware. To bring the\nconsole back you must reinitialize the UART without passing anything for\n``tx`` or ``rx`` (or passing ``None`` to these arguments). This means\nthat calling ``uart.init(115200)`` is enough to restore the Python console.\n\nFor more details see `the online documentation `_.\"\"\"\n ...\n\ndef any() -> bool:\n \"\"\"Comprueba si hay alg\u00fan dato esperando. (alg\u00fan)\n\nExample: ``uart.any()``\n\n:return: ``True`` if any data is waiting, else ``False``.\"\"\"\n ...\n\ndef read(nbytes: Optional[int]=None) -> Optional[bytes]:\n \"\"\"Lee bytes. (leer)\n\nExample: ``uart.read()``\n\n:param nbytes: Si se especifica ``nbytes``, lee como m\u00e1ximo ese n\u00famero de bytes; si no, lee tantos bytes como sea posible\n:return: A bytes object or ``None`` on timeout\"\"\"\n ...\n\ndef readinto(buf: WriteableBuffer, nbytes: Optional[int]=None) -> Optional[int]:\n \"\"\"Lee bytes en el ``buf``. (leeren)\n\nExample: ``uart.readinto(input_buffer)``\n\n:param buf: (b\u00faf) El b\u00fafer en el que escribir.\n:param nbytes: Si se especifica ``nbytes``, lee como m\u00e1ximo ese n\u00famero de bytes; si no, lee ``len(buf)`` bytes.\n:return: number of bytes read and stored into ``buf`` or ``None`` on timeout.\"\"\"\n ...\n\ndef readline() -> Optional[bytes]:\n \"\"\"Lee una l\u00ednea, terminando en un car\u00e1cter de nueva l\u00ednea. (leerl\u00ednea)\n\nExample: ``uart.readline()``\n\n:return: The line read or ``None`` on timeout. The newline character is included in the returned bytes.\"\"\"\n ...\n\ndef write(buf: Union[bytes, str]) -> Optional[int]:\n \"\"\"Escribe un b\u00fafer en el bus. (escribir)\n\nExample: ``uart.write('hello world')``\n\n:param buf: (b\u00faf) Un objeto de bytes o una cadena.\n:return: The number of bytes written, or ``None`` on timeout.\n\nExamples::\n\n uart.write('hello world')\n uart.write(b'hello world')\n uart.write(bytes([1, 2, 3]))\"\"\"\n ...", "/typeshed/stdlib/collections/__init__.pyi": "import sys\nfrom typing import (\n Any,\n Dict,\n Generic,\n ItemsView,\n Iterable,\n Iterator,\n KeysView,\n Optional,\n Reversible,\n Tuple,\n Type,\n TypeVar,\n Union,\n ValuesView,\n)\n\n_S = TypeVar(\"_S\")\n_T = TypeVar(\"_T\")\n_KT = TypeVar(\"_KT\")\n_VT = TypeVar(\"_VT\")\n\nif sys.version_info >= (3, 7):\n def namedtuple(\n typename: str,\n field_names: Union[str, Iterable[str]],\n *,\n rename: bool = ...,\n module: Optional[str] = ...,\n defaults: Optional[Iterable[Any]] = ...,\n ) -> Type[Tuple[Any, ...]]: ...\n\nelse:\n def namedtuple(\n typename: str,\n field_names: Union[str, Iterable[str]],\n *,\n verbose: bool = ...,\n rename: bool = ...,\n module: Optional[str] = ...,\n ) -> Type[Tuple[Any, ...]]: ...\n\nclass _OrderedDictKeysView(KeysView[_KT], Reversible[_KT]):\n def __reversed__(self) -> Iterator[_KT]: ...\n\nclass _OrderedDictItemsView(ItemsView[_KT, _VT], Reversible[Tuple[_KT, _VT]]):\n def __reversed__(self) -> Iterator[Tuple[_KT, _VT]]: ...\n\nclass _OrderedDictValuesView(ValuesView[_VT], Reversible[_VT]):\n def __reversed__(self) -> Iterator[_VT]: ...\n\nclass OrderedDict(Dict[_KT, _VT], Reversible[_KT], Generic[_KT, _VT]):\n def popitem(self, last: bool = ...) -> Tuple[_KT, _VT]: ...\n def move_to_end(self, key: _KT, last: bool = ...) -> None: ...\n def copy(self: _S) -> _S: ...\n def __reversed__(self) -> Iterator[_KT]: ...\n def keys(self) -> _OrderedDictKeysView[_KT]: ...\n def items(self) -> _OrderedDictItemsView[_KT, _VT]: ...\n def values(self) -> _OrderedDictValuesView[_VT]: ...\n", "/src/pyrightconfig.json": "{ \n \"pythonVersion\": \"3.6\",\n \"pythonPlatform\": \"Linux\",\n \"typeCheckingMode\": \"basic\",\n \"typeshedPath\": \"/typeshed/\",\n \"reportMissingModuleSource\": false,\n \"reportWildcardImportFromLibrary\": false,\n \"verboseOutput\": true\n }\n" }