From e03fd2372b6d315b4730f10a68dedcebd193e6b7 Mon Sep 17 00:00:00 2001 From: Matt Hillsdon Date: Fri, 23 Aug 2024 12:23:59 +0100 Subject: [PATCH] Sync and add Polish I've also added the Crowdin pseudo language which we've shipped in the Python Editor to enable in-context translations using a Crowdin feature. --- crowdin/translated/api.ca.json | 16 +- crowdin/translated/api.de.json | 112 +- crowdin/translated/api.es-es.json | 66 +- crowdin/translated/api.fr.json | 16 +- crowdin/translated/api.ja.json | 16 +- crowdin/translated/api.ko.json | 36 +- crowdin/translated/api.lol.json | 18 +- crowdin/translated/api.nl.json | 16 +- crowdin/translated/api.pl.json | 5266 +++++++++++++++++ crowdin/translated/api.zh-cn.json | 18 +- crowdin/translated/api.zh-tw.json | 16 +- lang/ca/typeshed/stdlib/microbit/spi.pyi | 3 +- lang/de/typeshed/stdlib/log.pyi | 4 +- lang/de/typeshed/stdlib/microbit/__init__.pyi | 6 +- .../stdlib/microbit/accelerometer.pyi | 12 +- lang/de/typeshed/stdlib/microbit/audio.pyi | 2 +- lang/de/typeshed/stdlib/microbit/compass.pyi | 6 +- lang/de/typeshed/stdlib/microbit/display.pyi | 38 +- lang/de/typeshed/stdlib/microbit/speaker.pyi | 2 +- lang/de/typeshed/stdlib/microbit/spi.pyi | 3 +- lang/de/typeshed/stdlib/neopixel.pyi | 4 +- lang/de/typeshed/stdlib/radio.pyi | 2 +- lang/es-es/typeshed/stdlib/log.pyi | 6 +- .../typeshed/stdlib/microbit/__init__.pyi | 14 +- .../stdlib/microbit/accelerometer.pyi | 4 +- lang/es-es/typeshed/stdlib/microbit/audio.pyi | 16 +- lang/es-es/typeshed/stdlib/microbit/spi.pyi | 3 +- lang/es-es/typeshed/stdlib/microbit/uart.pyi | 2 +- lang/es-es/typeshed/stdlib/neopixel.pyi | 2 +- lang/fr/typeshed/stdlib/microbit/spi.pyi | 3 +- lang/ja/typeshed/stdlib/microbit/spi.pyi | 3 +- lang/ko/typeshed/stdlib/log.pyi | 2 +- lang/ko/typeshed/stdlib/microbit/__init__.pyi | 18 +- lang/ko/typeshed/stdlib/microbit/spi.pyi | 3 +- lang/lol/typeshed/stdlib/VERSIONS | 50 + .../typeshed/stdlib/_typeshed/__init__.pyi | 168 + lang/lol/typeshed/stdlib/abc.pyi | 28 + lang/lol/typeshed/stdlib/antigravity.pyi | 0 lang/lol/typeshed/stdlib/array.pyi | 42 + lang/lol/typeshed/stdlib/audio.pyi | 11 + lang/lol/typeshed/stdlib/builtins.pyi | 1334 +++++ .../typeshed/stdlib/collections/__init__.pyi | 60 + lang/lol/typeshed/stdlib/errno.pyi | 26 + lang/lol/typeshed/stdlib/gc.pyi | 68 + lang/lol/typeshed/stdlib/log.pyi | 89 + lang/lol/typeshed/stdlib/love.pyi | 1 + lang/lol/typeshed/stdlib/machine.pyi | 84 + lang/lol/typeshed/stdlib/math.pyi | 246 + .../lol/typeshed/stdlib/microbit/__init__.pyi | 706 +++ .../stdlib/microbit/accelerometer.pyi | 103 + lang/lol/typeshed/stdlib/microbit/audio.pyi | 123 + lang/lol/typeshed/stdlib/microbit/compass.pyi | 70 + lang/lol/typeshed/stdlib/microbit/display.pyi | 92 + lang/lol/typeshed/stdlib/microbit/i2c.pyi | 49 + .../typeshed/stdlib/microbit/microphone.pyi | 62 + lang/lol/typeshed/stdlib/microbit/speaker.pyi | 15 + lang/lol/typeshed/stdlib/microbit/spi.pyi | 47 + lang/lol/typeshed/stdlib/microbit/uart.pyi | 79 + lang/lol/typeshed/stdlib/micropython.pyi | 131 + lang/lol/typeshed/stdlib/music.pyi | 128 + lang/lol/typeshed/stdlib/neopixel.pyi | 81 + lang/lol/typeshed/stdlib/os.pyi | 63 + lang/lol/typeshed/stdlib/power.pyi | 53 + lang/lol/typeshed/stdlib/radio.pyi | 123 + lang/lol/typeshed/stdlib/random.pyi | 80 + lang/lol/typeshed/stdlib/speech.pyi | 76 + lang/lol/typeshed/stdlib/struct.pyi | 56 + lang/lol/typeshed/stdlib/sys.pyi | 93 + lang/lol/typeshed/stdlib/this.pyi | 1 + lang/lol/typeshed/stdlib/time.pyi | 110 + lang/lol/typeshed/stdlib/types.pyi | 413 ++ lang/lol/typeshed/stdlib/typing.pyi | 716 +++ .../lol/typeshed/stdlib/typing_extensions.pyi | 115 + lang/lol/typeshed/stdlib/uarray.pyi | 1 + lang/lol/typeshed/stdlib/ucollections.pyi | 1 + lang/lol/typeshed/stdlib/uerrno.pyi | 1 + lang/lol/typeshed/stdlib/urandom.pyi | 1 + lang/lol/typeshed/stdlib/ustruct.pyi | 1 + lang/lol/typeshed/stdlib/usys.pyi | 1 + lang/lol/typeshed/stdlib/utime.pyi | 1 + lang/nl/typeshed/stdlib/microbit/spi.pyi | 3 +- lang/pl/typeshed/stdlib/VERSIONS | 50 + .../pl/typeshed/stdlib/_typeshed/__init__.pyi | 168 + lang/pl/typeshed/stdlib/abc.pyi | 28 + lang/pl/typeshed/stdlib/antigravity.pyi | 0 lang/pl/typeshed/stdlib/array.pyi | 42 + lang/pl/typeshed/stdlib/audio.pyi | 11 + lang/pl/typeshed/stdlib/builtins.pyi | 1334 +++++ .../typeshed/stdlib/collections/__init__.pyi | 60 + lang/pl/typeshed/stdlib/errno.pyi | 26 + lang/pl/typeshed/stdlib/gc.pyi | 68 + lang/pl/typeshed/stdlib/log.pyi | 89 + lang/pl/typeshed/stdlib/love.pyi | 1 + lang/pl/typeshed/stdlib/machine.pyi | 84 + lang/pl/typeshed/stdlib/math.pyi | 246 + lang/pl/typeshed/stdlib/microbit/__init__.pyi | 711 +++ .../stdlib/microbit/accelerometer.pyi | 103 + lang/pl/typeshed/stdlib/microbit/audio.pyi | 123 + lang/pl/typeshed/stdlib/microbit/compass.pyi | 70 + lang/pl/typeshed/stdlib/microbit/display.pyi | 92 + lang/pl/typeshed/stdlib/microbit/i2c.pyi | 49 + .../typeshed/stdlib/microbit/microphone.pyi | 62 + lang/pl/typeshed/stdlib/microbit/speaker.pyi | 15 + lang/pl/typeshed/stdlib/microbit/spi.pyi | 47 + lang/pl/typeshed/stdlib/microbit/uart.pyi | 79 + lang/pl/typeshed/stdlib/micropython.pyi | 132 + lang/pl/typeshed/stdlib/music.pyi | 128 + lang/pl/typeshed/stdlib/neopixel.pyi | 81 + lang/pl/typeshed/stdlib/os.pyi | 63 + lang/pl/typeshed/stdlib/power.pyi | 53 + lang/pl/typeshed/stdlib/radio.pyi | 130 + lang/pl/typeshed/stdlib/random.pyi | 81 + lang/pl/typeshed/stdlib/speech.pyi | 79 + lang/pl/typeshed/stdlib/struct.pyi | 56 + lang/pl/typeshed/stdlib/sys.pyi | 96 + lang/pl/typeshed/stdlib/this.pyi | 1 + lang/pl/typeshed/stdlib/time.pyi | 117 + lang/pl/typeshed/stdlib/types.pyi | 413 ++ lang/pl/typeshed/stdlib/typing.pyi | 716 +++ lang/pl/typeshed/stdlib/typing_extensions.pyi | 115 + lang/pl/typeshed/stdlib/uarray.pyi | 1 + lang/pl/typeshed/stdlib/ucollections.pyi | 1 + lang/pl/typeshed/stdlib/uerrno.pyi | 1 + lang/pl/typeshed/stdlib/urandom.pyi | 1 + lang/pl/typeshed/stdlib/ustruct.pyi | 1 + lang/pl/typeshed/stdlib/usys.pyi | 1 + lang/pl/typeshed/stdlib/utime.pyi | 1 + lang/zh-cn/typeshed/stdlib/microbit/spi.pyi | 5 +- lang/zh-tw/typeshed/stdlib/microbit/spi.pyi | 3 +- scripts/build-translations.sh | 4 +- 130 files changed, 17187 insertions(+), 207 deletions(-) create mode 100644 crowdin/translated/api.pl.json create mode 100644 lang/lol/typeshed/stdlib/VERSIONS create mode 100644 lang/lol/typeshed/stdlib/_typeshed/__init__.pyi create mode 100644 lang/lol/typeshed/stdlib/abc.pyi create mode 100644 lang/lol/typeshed/stdlib/antigravity.pyi create mode 100644 lang/lol/typeshed/stdlib/array.pyi create mode 100644 lang/lol/typeshed/stdlib/audio.pyi create mode 100644 lang/lol/typeshed/stdlib/builtins.pyi create mode 100644 lang/lol/typeshed/stdlib/collections/__init__.pyi create mode 100644 lang/lol/typeshed/stdlib/errno.pyi create mode 100644 lang/lol/typeshed/stdlib/gc.pyi create mode 100644 lang/lol/typeshed/stdlib/log.pyi create mode 100644 lang/lol/typeshed/stdlib/love.pyi create mode 100644 lang/lol/typeshed/stdlib/machine.pyi create mode 100644 lang/lol/typeshed/stdlib/math.pyi create mode 100644 lang/lol/typeshed/stdlib/microbit/__init__.pyi create mode 100644 lang/lol/typeshed/stdlib/microbit/accelerometer.pyi create mode 100644 lang/lol/typeshed/stdlib/microbit/audio.pyi create mode 100644 lang/lol/typeshed/stdlib/microbit/compass.pyi create mode 100644 lang/lol/typeshed/stdlib/microbit/display.pyi create mode 100644 lang/lol/typeshed/stdlib/microbit/i2c.pyi create mode 100644 lang/lol/typeshed/stdlib/microbit/microphone.pyi create mode 100644 lang/lol/typeshed/stdlib/microbit/speaker.pyi create mode 100644 lang/lol/typeshed/stdlib/microbit/spi.pyi create mode 100644 lang/lol/typeshed/stdlib/microbit/uart.pyi create mode 100644 lang/lol/typeshed/stdlib/micropython.pyi create mode 100644 lang/lol/typeshed/stdlib/music.pyi create mode 100644 lang/lol/typeshed/stdlib/neopixel.pyi create mode 100644 lang/lol/typeshed/stdlib/os.pyi create mode 100644 lang/lol/typeshed/stdlib/power.pyi create mode 100644 lang/lol/typeshed/stdlib/radio.pyi create mode 100644 lang/lol/typeshed/stdlib/random.pyi create mode 100644 lang/lol/typeshed/stdlib/speech.pyi create mode 100644 lang/lol/typeshed/stdlib/struct.pyi create mode 100644 lang/lol/typeshed/stdlib/sys.pyi create mode 100644 lang/lol/typeshed/stdlib/this.pyi create mode 100644 lang/lol/typeshed/stdlib/time.pyi create mode 100644 lang/lol/typeshed/stdlib/types.pyi create mode 100644 lang/lol/typeshed/stdlib/typing.pyi create mode 100644 lang/lol/typeshed/stdlib/typing_extensions.pyi create mode 100644 lang/lol/typeshed/stdlib/uarray.pyi create mode 100644 lang/lol/typeshed/stdlib/ucollections.pyi create mode 100644 lang/lol/typeshed/stdlib/uerrno.pyi create mode 100644 lang/lol/typeshed/stdlib/urandom.pyi create mode 100644 lang/lol/typeshed/stdlib/ustruct.pyi create mode 100644 lang/lol/typeshed/stdlib/usys.pyi create mode 100644 lang/lol/typeshed/stdlib/utime.pyi create mode 100644 lang/pl/typeshed/stdlib/VERSIONS create mode 100644 lang/pl/typeshed/stdlib/_typeshed/__init__.pyi create mode 100644 lang/pl/typeshed/stdlib/abc.pyi create mode 100644 lang/pl/typeshed/stdlib/antigravity.pyi create mode 100644 lang/pl/typeshed/stdlib/array.pyi create mode 100644 lang/pl/typeshed/stdlib/audio.pyi create mode 100644 lang/pl/typeshed/stdlib/builtins.pyi create mode 100644 lang/pl/typeshed/stdlib/collections/__init__.pyi create mode 100644 lang/pl/typeshed/stdlib/errno.pyi create mode 100644 lang/pl/typeshed/stdlib/gc.pyi create mode 100644 lang/pl/typeshed/stdlib/log.pyi create mode 100644 lang/pl/typeshed/stdlib/love.pyi create mode 100644 lang/pl/typeshed/stdlib/machine.pyi create mode 100644 lang/pl/typeshed/stdlib/math.pyi create mode 100644 lang/pl/typeshed/stdlib/microbit/__init__.pyi create mode 100644 lang/pl/typeshed/stdlib/microbit/accelerometer.pyi create mode 100644 lang/pl/typeshed/stdlib/microbit/audio.pyi create mode 100644 lang/pl/typeshed/stdlib/microbit/compass.pyi create mode 100644 lang/pl/typeshed/stdlib/microbit/display.pyi create mode 100644 lang/pl/typeshed/stdlib/microbit/i2c.pyi create mode 100644 lang/pl/typeshed/stdlib/microbit/microphone.pyi create mode 100644 lang/pl/typeshed/stdlib/microbit/speaker.pyi create mode 100644 lang/pl/typeshed/stdlib/microbit/spi.pyi create mode 100644 lang/pl/typeshed/stdlib/microbit/uart.pyi create mode 100644 lang/pl/typeshed/stdlib/micropython.pyi create mode 100644 lang/pl/typeshed/stdlib/music.pyi create mode 100644 lang/pl/typeshed/stdlib/neopixel.pyi create mode 100644 lang/pl/typeshed/stdlib/os.pyi create mode 100644 lang/pl/typeshed/stdlib/power.pyi create mode 100644 lang/pl/typeshed/stdlib/radio.pyi create mode 100644 lang/pl/typeshed/stdlib/random.pyi create mode 100644 lang/pl/typeshed/stdlib/speech.pyi create mode 100644 lang/pl/typeshed/stdlib/struct.pyi create mode 100644 lang/pl/typeshed/stdlib/sys.pyi create mode 100644 lang/pl/typeshed/stdlib/this.pyi create mode 100644 lang/pl/typeshed/stdlib/time.pyi create mode 100644 lang/pl/typeshed/stdlib/types.pyi create mode 100644 lang/pl/typeshed/stdlib/typing.pyi create mode 100644 lang/pl/typeshed/stdlib/typing_extensions.pyi create mode 100644 lang/pl/typeshed/stdlib/uarray.pyi create mode 100644 lang/pl/typeshed/stdlib/ucollections.pyi create mode 100644 lang/pl/typeshed/stdlib/uerrno.pyi create mode 100644 lang/pl/typeshed/stdlib/urandom.pyi create mode 100644 lang/pl/typeshed/stdlib/ustruct.pyi create mode 100644 lang/pl/typeshed/stdlib/usys.pyi create mode 100644 lang/pl/typeshed/stdlib/utime.pyi diff --git a/crowdin/translated/api.ca.json b/crowdin/translated/api.ca.json index e0dbd52..6206889 100644 --- a/crowdin/translated/api.ca.json +++ b/crowdin/translated/api.ca.json @@ -1441,11 +1441,11 @@ }, "microbit.Image.SMILE": { "message": "somriure", - "description": "(field name) Smiling face image." + "description": "(field name) Smiling mouth image." }, "microbit.Image.SMILE.summary": { "message": "Imatge d'una cara somrient", - "description": "Smiling face image." + "description": "Smiling mouth image." }, "microbit.Image.SAD": { "message": "tristesa", @@ -3457,11 +3457,11 @@ }, "microbit.spi.read": { "message": "llegeix", - "description": "(function name) Read bytes." + "description": "(function name) Read at most ``nbytes`` while continuously writing the single byte given by ``out``." }, "microbit.spi.read.summary": { "message": "Llegeix bytes", - "description": "Read bytes." + "description": "Read at most ``nbytes`` while continuously writing the single byte given by ``out``." }, "microbit.spi.read.param-name.nbytes": { "message": "nbytes", @@ -3471,6 +3471,14 @@ "message": "Nombre màxim de bytes per llegir.", "description": "Parameter docs" }, + "microbit.spi.read.param-name.out": { + "message": "out", + "description": "(parameter name) The byte value to write (default 0)." + }, + "microbit.spi.read.param-doc.out": { + "message": "The byte value to write (default 0).", + "description": "Parameter docs" + }, "microbit.spi.write": { "message": "escriu", "description": "(function name) Write bytes to the bus." diff --git a/crowdin/translated/api.de.json b/crowdin/translated/api.de.json index ad2ff50..3050b28 100644 --- a/crowdin/translated/api.de.json +++ b/crowdin/translated/api.de.json @@ -112,7 +112,7 @@ "description": "Hours timestamp format." }, "log.DAYS": { - "message": "tage", + "message": "days", "description": "(field name) Days timestamp format." }, "log.DAYS.summary": { @@ -136,7 +136,7 @@ "description": "Parameter docs" }, "log.set_labels.param-name.timestamp": { - "message": "Zeitstempel", + "message": "timestamp", "description": "(parameter name) 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``." }, "log.set_labels.param-doc.timestamp": { @@ -856,7 +856,7 @@ "description": "Parameter docs" }, "microbit.run_every.param-name.days": { - "message": "tage", + "message": "days", "description": "(parameter name) Sets the day mark for the scheduling." }, "microbit.run_every.param-doc.days": { @@ -900,7 +900,7 @@ "description": "(function name) Enter a panic mode." }, "microbit.panic.summary": { - "message": "In einen Panik-Modus gehen.", + "message": "In einen Panik-Modus wechseln.", "description": "Enter a panic mode." }, "microbit.panic.param-name.n": { @@ -976,7 +976,7 @@ "description": "Parameter docs" }, "microbit.scale-2.param-name.value": { - "message": "wert", + "message": "value", "description": "(parameter name) A number to convert." }, "microbit.scale-2.param-doc.value": { @@ -1441,11 +1441,11 @@ }, "microbit.Image.SMILE": { "message": "smile", - "description": "(field name) Smiling face image." + "description": "(field name) Smiling mouth image." }, "microbit.Image.SMILE.summary": { "message": "Lächelndes Gesichtsbild.", - "description": "Smiling face image." + "description": "Smiling mouth image." }, "microbit.Image.SAD": { "message": "sad", @@ -2456,7 +2456,7 @@ "description": "Measure the acceleration of the micro:bit and recognise gestures." }, "microbit.accelerometer.get_x": { - "message": "erhalte x", + "message": "get x", "description": "(function name) Get the acceleration measurement in the ``x`` axis in milli-g." }, "microbit.accelerometer.get_x.summary": { @@ -2464,7 +2464,7 @@ "description": "Get the acceleration measurement in the ``x`` axis in milli-g." }, "microbit.accelerometer.get_y": { - "message": "erhalte y", + "message": "get y", "description": "(function name) Get the acceleration measurement in the ``y`` axis in milli-g." }, "microbit.accelerometer.get_y.summary": { @@ -2472,7 +2472,7 @@ "description": "Get the acceleration measurement in the ``y`` axis in milli-g." }, "microbit.accelerometer.get_z": { - "message": "erhalte z", + "message": "get z", "description": "(function name) Get the acceleration measurement in the ``z`` axis in milli-g." }, "microbit.accelerometer.get_z.summary": { @@ -2480,7 +2480,7 @@ "description": "Get the acceleration measurement in the ``z`` axis in milli-g." }, "microbit.accelerometer.get_values": { - "message": "Werte erhalten", + "message": "get values", "description": "(function name) Get the acceleration measurements in all axes at once as a tuple." }, "microbit.accelerometer.get_values.summary": { @@ -2488,7 +2488,7 @@ "description": "Get the acceleration measurements in all axes at once as a tuple." }, "microbit.accelerometer.get_strength": { - "message": "erhalte Stärke", + "message": "get strength", "description": "(function name) Get the acceleration measurement of all axes combined, as a positive integer. This is the Pythagorean sum of the X, Y and Z axes." }, "microbit.accelerometer.get_strength.summary": { @@ -2536,7 +2536,7 @@ "description": "Parameter docs" }, "microbit.accelerometer.get_gestures": { - "message": "erhalte Gesten", + "message": "get gestures", "description": "(function name) Return a tuple of the gesture history." }, "microbit.accelerometer.get_gestures.summary": { @@ -2584,7 +2584,7 @@ "description": "Parameter docs" }, "microbit.audio.play.param-name.return_pin": { - "message": "erhalte Pin", + "message": "return pin", "description": "(parameter name) Specifies a differential edge connector pin to connect to an external speaker instead of ground. This is ignored for the **V2** revision." }, "microbit.audio.play.param-doc.return_pin": { @@ -2928,27 +2928,27 @@ "description": "Undoes the calibration, making the compass uncalibrated again." }, "microbit.compass.get_x": { - "message": "erhalte x", + "message": "get x", "description": "(function name) Get the magnetic field strength on the ``x`` axis." }, "microbit.compass.get_x.summary": { - "message": "Ermittle die Magnetfeldstärke der {{x}}-Achse. ", + "message": "Liefert die Magnetfeldstärke der {{x}}-Achse. ", "description": "Get the magnetic field strength on the ``x`` axis." }, "microbit.compass.get_y": { - "message": "erhalte y", + "message": "get y", "description": "(function name) Get the magnetic field strength on the ``y`` axis." }, "microbit.compass.get_y.summary": { - "message": "Ermittle die Magnetfeldstärke der {{y}}-Achse. ", + "message": "Liefert die Magnetfeldstärke der {{y}}-Achse. ", "description": "Get the magnetic field strength on the ``y`` axis." }, "microbit.compass.get_z": { - "message": "erhalte z", + "message": "get z", "description": "(function name) Get the magnetic field strength on the ``z`` axis." }, "microbit.compass.get_z.summary": { - "message": "Ermittle die Magnetfeldstärke der {{z}}-Achse. ", + "message": "Liefert die Magnetfeldstärke der {{z}}-Achse. ", "description": "Get the magnetic field strength on the ``z`` axis." }, "microbit.compass.heading": { @@ -2976,11 +2976,11 @@ "description": "Show text, images and animations on the 5×5 LED display." }, "microbit.display.get_pixel": { - "message": "Pixelwerte holen", + "message": "get pixel", "description": "(function name) Get the brightness of the LED at column ``x`` and row ``y``." }, "microbit.display.get_pixel.summary": { - "message": "Ermittle die Helligkeit der LED auf Spalte {{x}} und Zeile {{y}}. ", + "message": "Ermittelt die Helligkeit der LED in Spalte {{x}} und Zeile {{y}}.", "description": "Get the brightness of the LED at column ``x`` and row ``y``." }, "microbit.display.get_pixel.param-name.x": { @@ -3000,15 +3000,15 @@ "description": "Parameter docs" }, "microbit.display.set_pixel": { - "message": "Pixelwerte setzen", + "message": "set pixel", "description": "(function name) Set the brightness of the LED at column ``x`` and row ``y``." }, "microbit.display.set_pixel.summary": { - "message": "Ändere die Helligkeit der LED auf Spalte {{x}} und Zeile {{y}}. ", + "message": "Stellt die Helligkeit der LED in Spalte {{x}} und Zeile {{y}} ein.", "description": "Set the brightness of the LED at column ``x`` and row ``y``." }, "microbit.display.set_pixel.param-name.value": { - "message": "wert", + "message": "value", "description": "(parameter name) The brightness between 0 (off) and 9 (bright)" }, "microbit.display.set_pixel.param-doc.value": { @@ -3032,7 +3032,7 @@ "description": "Parameter docs" }, "microbit.display.clear": { - "message": "löschen", + "message": "clear", "description": "(function name) Set the brightness of all LEDs to 0 (off)." }, "microbit.display.clear.summary": { @@ -3048,19 +3048,19 @@ "description": "Shows images, letters or digits on the LED display." }, "microbit.display.show.param-name.clear": { - "message": "löschen", + "message": "clear", "description": "(parameter name) If ``clear`` is ``True``, the display will be cleared after the sequence has finished." }, "microbit.display.show.param-doc.clear": { - "message": "Wenn {{clear}} {{True}}ist, wird die Anzeige ausgeschaltet, nachdem die Sequenz beendet ist.", + "message": "Wenn {{clear}} {{True}} ist, wird die Anzeige nach Beendigung der Sequenz gelöscht.", "description": "Parameter docs" }, "microbit.display.show.param-name.delay": { - "message": "Verzögerung", + "message": "delay", "description": "(parameter name) Each letter, digit or image is shown with ``delay`` milliseconds between them." }, "microbit.display.show.param-doc.delay": { - "message": "Jeder Buchstabe, Ziffer oder Bild wird mit {{delay}} Millisekunden zwischen ihnen angezeigt.", + "message": "Jeder Buchstabe, jede Ziffer oder jedes Bild wird mit einer Verzögerung von {{delay}} Millisekunden angezeigt.", "description": "Parameter docs" }, "microbit.display.show.param-name.image": { @@ -3068,7 +3068,7 @@ "description": "(parameter name) A string, number, image or list of images to show." }, "microbit.display.show.param-doc.image": { - "message": "Eine Zeichenkette, Nummer, Bild oder Liste der anzuzeigenden Bilder.", + "message": "Eine Zeichenkette, eine Zahl, ein Bild oder eine Liste von Bildern, die angezeigt werden sollen.", "description": "Parameter docs" }, "microbit.display.show.param-name.loop": { @@ -3076,7 +3076,7 @@ "description": "(parameter name) If ``loop`` is ``True``, the animation will repeat forever." }, "microbit.display.show.param-doc.loop": { - "message": "Wenn {{loop}} {{True}}ist, wird sich die Animation für immer wiederholen.", + "message": "Wenn {{loop}} {{True}} ist, wird die Animation endlos wiederholt.", "description": "Parameter docs" }, "microbit.display.show.param-name.wait": { @@ -3084,11 +3084,11 @@ "description": "(parameter name) If ``wait`` is ``True``, this function will block until the animation is finished, otherwise the animation will happen in the background." }, "microbit.display.show.param-doc.wait": { - "message": "Wenn {{wait}} {{True}}ist, wird diese Funktion blockiert, bis die Animation beendet ist, andernfalls wird die Animation im Hintergrund stattfinden.", + "message": "Wenn {{wait}} {{True}} ist, wird diese Funktion das Programm so lange anhalten, bis die Animation beendet ist, andernfalls wird die Animation im Hintergrund ausgeführt.", "description": "Parameter docs" }, "microbit.display.scroll": { - "message": "scrollen", + "message": "scroll", "description": "(function name) Scrolls a number or text on the LED display." }, "microbit.display.scroll.summary": { @@ -3096,11 +3096,11 @@ "description": "Scrolls a number or text on the LED display." }, "microbit.display.scroll.param-name.delay": { - "message": "Verzögerung", + "message": "delay", "description": "(parameter name) The ``delay`` parameter controls how fast the text is scrolling." }, "microbit.display.scroll.param-doc.delay": { - "message": "Der {{delay}} -Parameter bestimmt, wie schnell der Text scrollt.", + "message": "Der Parameter {{delay}} bestimmt, wie schnell der Text gescrollt wird.", "description": "Parameter docs" }, "microbit.display.scroll.param-name.loop": { @@ -3108,11 +3108,11 @@ "description": "(parameter name) If ``loop`` is ``True``, the animation will repeat forever." }, "microbit.display.scroll.param-doc.loop": { - "message": "Wenn {{loop}} {{True}}ist, wird sich die Animation für immer wiederholen.", + "message": "Wenn {{loop}} {{True}} ist, wird die Animation endlos wiederholt.", "description": "Parameter docs" }, "microbit.display.scroll.param-name.monospace": { - "message": "Monospace", + "message": "monospace", "description": "(parameter name) If ``monospace`` is ``True``, the characters will all take up 5 pixel-columns in width, otherwise there will be exactly 1 blank pixel-column between each character as they scroll." }, "microbit.display.scroll.param-doc.monospace": { @@ -3124,7 +3124,7 @@ "description": "(parameter name) The string to scroll. If ``text`` is an integer or float it is first converted to a string using ``str()``." }, "microbit.display.scroll.param-doc.text": { - "message": "Der zu wiederzugebende String. Wenn {{text}} eine Ganzzahl oder ein Float ist, wird er zuerst mit {{str()}} in einen String konvertiert.", + "message": "Die zu scrollende Zeichenkette. Wenn {{text}} ein Integer oder Float ist, wird der Text vorher mit {{str()}} in einen String umgewandelt.", "description": "Parameter docs" }, "microbit.display.scroll.param-name.wait": { @@ -3132,15 +3132,15 @@ "description": "(parameter name) If ``wait`` is ``True``, this function will block until the animation is finished, otherwise the animation will happen in the background." }, "microbit.display.scroll.param-doc.wait": { - "message": "Wenn {{wait}} {{True}}ist, wird diese Funktion blockiert, bis die Animation beendet ist, andernfalls wird die Animation im Hintergrund stattfinden.", + "message": "Wenn {{wait}} {{True}} ist, wird diese Funktion das Programm anhalten, bis die Animation beendet ist, andernfalls läuft die Animation im Hintergrund ab.", "description": "Parameter docs" }, "microbit.display.on": { - "message": "an", + "message": "on", "description": "(function name) Turn on the LED display." }, "microbit.display.on.summary": { - "message": "Schalten Sie das LED-Display ein.", + "message": "Das LED-Display einschalten.", "description": "Turn on the LED display." }, "microbit.display.off": { @@ -3148,19 +3148,19 @@ "description": "(function name) Turn off the LED display (disabling the display allows you to re-use the GPIO pins for other purposes)." }, "microbit.display.off.summary": { - "message": "Schalten Sie die LED-Anzeige aus (das Deaktivieren des Displays erlaubt es Ihnen, die GPIO-Pins für andere Zwecke zu verwenden).", + "message": "Die LED-Anzeige ausschalten (Deaktivieren des Displays ermöglicht es dir, die GPIO-Pins für andere Zwecke zu verwenden).", "description": "Turn off the LED display (disabling the display allows you to re-use the GPIO pins for other purposes)." }, "microbit.display.is_on": { - "message": "ist an", + "message": "is on", "description": "(function name) Check whether the LED display is enabled." }, "microbit.display.is_on.summary": { - "message": "Überprüfen Sie, ob die LED-Anzeige aktiviert ist.", + "message": "Überprüfung, ob die LED-Anzeige aktiviert ist.", "description": "Check whether the LED display is enabled." }, "microbit.display.read_light_level": { - "message": "bestimme Licht Intensität", + "message": "read light level", "description": "(function name) Read the light level." }, "microbit.display.read_light_level.summary": { @@ -3384,7 +3384,7 @@ "description": "Turn the speaker off." }, "microbit.speaker.on": { - "message": "an", + "message": "on", "description": "(function name) Turn the speaker on." }, "microbit.speaker.on.summary": { @@ -3457,11 +3457,11 @@ }, "microbit.spi.read": { "message": "read", - "description": "(function name) Read bytes." + "description": "(function name) Read at most ``nbytes`` while continuously writing the single byte given by ``out``." }, "microbit.spi.read.summary": { "message": "Bytes lesen.", - "description": "Read bytes." + "description": "Read at most ``nbytes`` while continuously writing the single byte given by ``out``." }, "microbit.spi.read.param-name.nbytes": { "message": "nbytes", @@ -3471,6 +3471,14 @@ "message": "Maximum der zu lesenden Bytes. ", "description": "Parameter docs" }, + "microbit.spi.read.param-name.out": { + "message": "out", + "description": "(parameter name) The byte value to write (default 0)." + }, + "microbit.spi.read.param-doc.out": { + "message": "The byte value to write (default 0).", + "description": "Parameter docs" + }, "microbit.spi.write": { "message": "schreiben", "description": "(function name) Write bytes to the bus." @@ -4136,7 +4144,7 @@ "description": "Parameter docs" }, "neopixel.NeoPixel.clear": { - "message": "löschen", + "message": "clear", "description": "(function name) Clear all the pixels." }, "neopixel.NeoPixel.clear.summary": { @@ -4220,7 +4228,7 @@ "description": "(function name) Get length of this pixel strip." }, "neopixel.NeoPixel.__len__.summary": { - "message": "Erhalte die Länge des Pixelstreifens.", + "message": "Liefert die Länge des Pixelstreifens.", "description": "Get length of this pixel strip." }, "os": { @@ -4352,7 +4360,7 @@ "description": "Constant used to indicate a throughput of 2 MBit a second." }, "radio.on": { - "message": "an", + "message": "on", "description": "(function name) Turns the radio on." }, "radio.on.summary": { diff --git a/crowdin/translated/api.es-es.json b/crowdin/translated/api.es-es.json index 7479f1a..afb04f1 100644 --- a/crowdin/translated/api.es-es.json +++ b/crowdin/translated/api.es-es.json @@ -140,7 +140,7 @@ "description": "(parameter name) 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``." }, "log.set_labels.param-doc.timestamp": { - "message": "Seleccione la unidad de marca de tiempo que se añadirá automáticamente 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}}.", + "message": "Selecciona la unidad de marca de tiempo que se añadirá automáticamente 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}}.", "description": "Parameter docs" }, "log.add-1": { @@ -156,7 +156,7 @@ "description": "(parameter name) The data to log as a dictionary with a key for each header." }, "log.add-1.param-doc.data_dictionary": { - "message": "Los datos a registrar como un diccionario con una clave para cada cabecera.", + "message": "Los datos que se registrarán como un diccionario con una clave para cada cabecera.", "description": "Parameter docs" }, "log.add-2": { @@ -188,7 +188,7 @@ "description": "(function name) Configure mirroring of the data logging activity to the serial output." }, "log.set_mirroring.summary": { - "message": "Configure la duplicación de la actividad de registro de datos en la salida en serie.", + "message": "Configura la duplicación de la actividad de registro de datos en la salida serie.", "description": "Configure mirroring of the data logging activity to the serial output." }, "log.set_mirroring.param-name.serial": { @@ -844,7 +844,7 @@ "description": "(function name) Schedule to run a function at the interval specified by the time arguments **V2 only**." }, "microbit.run_every.summary": { - "message": "Programe para ejecutar una función en el intervalo especificado por los argumentos de tiempo **V2 solamente**.", + "message": "Programa la ejecución de una función en el intervalo especificado por los argumentos de tiempo **Sólo V2**.", "description": "Schedule to run a function at the interval specified by the time arguments **V2 only**." }, "microbit.run_every.param-name.callback": { @@ -852,7 +852,7 @@ "description": "(parameter name) Function to call at the provided interval. Omit when using as a decorator." }, "microbit.run_every.param-doc.callback": { - "message": "Función para llamar al intervalo proporcionado. Omitir cuando se utiliza como decorador.", + "message": "Función a llamar en el intervalo proporcionado. Omitir cuando se utiliza como un decorador.", "description": "Parameter docs" }, "microbit.run_every.param-name.days": { @@ -860,7 +860,7 @@ "description": "(parameter name) Sets the day mark for the scheduling." }, "microbit.run_every.param-doc.days": { - "message": "Establece la marca del día para la programación.", + "message": "Configura la marca del día para la programación.", "description": "Parameter docs" }, "microbit.run_every.param-name.h": { @@ -868,7 +868,7 @@ "description": "(parameter name) Sets the hour mark for the scheduling." }, "microbit.run_every.param-doc.h": { - "message": "Establece la marca de hora para la programación.", + "message": "Configura la marca de la hora para la programación.", "description": "Parameter docs" }, "microbit.run_every.param-name.min": { @@ -876,7 +876,7 @@ "description": "(parameter name) Sets the minute mark for the scheduling." }, "microbit.run_every.param-doc.min": { - "message": "Establece la marca de minuto para la programación.", + "message": "Configura la marca de los minutos para la programación.", "description": "Parameter docs" }, "microbit.run_every.param-name.ms": { @@ -884,7 +884,7 @@ "description": "(parameter name) Sets the millisecond mark for the scheduling." }, "microbit.run_every.param-doc.ms": { - "message": "Establece la marca de milisegundos para la programación.", + "message": "Configura la marca de los milisegundos para la programación.", "description": "Parameter docs" }, "microbit.run_every.param-name.s": { @@ -892,7 +892,7 @@ "description": "(parameter name) Sets the second mark for the scheduling." }, "microbit.run_every.param-doc.s": { - "message": "Establece la segunda marca para la programación.", + "message": "Configura la segunda marca para la programación.", "description": "Parameter docs" }, "microbit.panic": { @@ -1441,11 +1441,11 @@ }, "microbit.Image.SMILE": { "message": "sonrisa", - "description": "(field name) Smiling face image." + "description": "(field name) Smiling mouth image." }, "microbit.Image.SMILE.summary": { "message": "Imagen de una cara sonriente.", - "description": "Smiling face image." + "description": "Smiling mouth image." }, "microbit.Image.SAD": { "message": "triste", @@ -2492,7 +2492,7 @@ "description": "(function name) Get the acceleration measurement of all axes combined, as a positive integer. This is the Pythagorean sum of the X, Y and Z axes." }, "microbit.accelerometer.get_strength.summary": { - "message": "Obtener la medición de aceleración de todos los ejes combinados, como un entero positivo. Esta es la suma de Pitagórica de los ejes X, Y y Z.", + "message": "Obtiene la medida de la aceleración de todos los ejes combinados, como un entero positivo. Es la suma Pitagórica de los ejes X, Y y Z.", "description": "Get the acceleration measurement of all axes combined, as a positive integer. This is the Pythagorean sum of the X, Y and Z axes." }, "microbit.accelerometer.current_gesture": { @@ -2544,11 +2544,11 @@ "description": "Return a tuple of the gesture history." }, "microbit.accelerometer.set_range": { - "message": "establecer rango", + "message": "configurar rango", "description": "(function name) Set the accelerometer sensitivity range, in g (standard gravity), to the closest values supported by the hardware, so it rounds to either ``2``, ``4``, or ``8`` g." }, "microbit.accelerometer.set_range.summary": { - "message": "Establecer el rango de sensibilidad acelerómetro, en g (gravedad estándar), a los valores más cercanos soportados por el hardware, así que se redondea a {{2}}, {{4}}o {{8}} g.", + "message": "Configura el rango de sensibilidad del acelerómetro, en g (gravedad estándar), a los valores más cercanos soportados por el hardware, por lo que redondea a {{2}}, {{4}}, u {{8}} g.", "description": "Set the accelerometer sensitivity range, in g (standard gravity), to the closest values supported by the hardware, so it rounds to either ``2``, ``4``, or ``8`` g." }, "microbit.accelerometer.set_range.param-name.value": { @@ -2572,7 +2572,7 @@ "description": "(function name) Play a built-in sound, sound effect or custom audio frames." }, "microbit.audio.play.summary": { - "message": "Reproducir un sonido, un efecto de sonido o marcos de audio personalizados.", + "message": "Reproduce un sonido integrado, un efecto de sonido o marcos de audio personalizados.", "description": "Play a built-in sound, sound effect or custom audio frames." }, "microbit.audio.play.param-name.pin": { @@ -2624,7 +2624,7 @@ "description": "Stop all audio playback." }, "microbit.audio.SoundEffect": { - "message": "efecto de sonido", + "message": "efectosonido", "description": "(class name) A sound effect, composed by a set of parameters configured via the constructor or attributes." }, "microbit.audio.SoundEffect.summary": { @@ -2632,15 +2632,15 @@ "description": "A sound effect, composed by a set of parameters configured via the constructor or attributes." }, "microbit.audio.SoundEffect.WAVEFORM_SINE": { - "message": "forma de onda sinusoidal", + "message": "forma de onda senoidal", "description": "(field name) Sine wave option used for the ``waveform`` parameter." }, "microbit.audio.SoundEffect.WAVEFORM_SINE.summary": { - "message": "Opción de onda sinusoidal utilizada para el parámetro {{waveform}}.", + "message": "Opción de onda senoidal utilizada para el parámetro {{waveform}}.", "description": "Sine wave option used for the ``waveform`` parameter." }, "microbit.audio.SoundEffect.WAVEFORM_SAWTOOTH": { - "message": "diente de sierra de forma de onda", + "message": "forma de onda diente de sierra", "description": "(field name) Sawtooth wave option used for the ``waveform`` parameter." }, "microbit.audio.SoundEffect.WAVEFORM_SAWTOOTH.summary": { @@ -2704,7 +2704,7 @@ "description": "No effect option used for the ``fx`` parameter." }, "microbit.audio.SoundEffect.FX_TREMOLO": { - "message": "fx tremolo", + "message": "fx trémolo", "description": "(field name) Tremolo effect option used for the ``fx`` parameter." }, "microbit.audio.SoundEffect.FX_TREMOLO.summary": { @@ -2796,7 +2796,7 @@ "description": "(function name) Create a new sound effect." }, "microbit.audio.SoundEffect.__init__.summary": { - "message": "Crear un nuevo efecto de sonido.", + "message": "Crea un nuevo efecto de sonido.", "description": "Create a new sound effect." }, "microbit.audio.SoundEffect.__init__.param-name.duration": { @@ -2868,7 +2868,7 @@ "description": "(function name) Create a copy of this ``SoundEffect``." }, "microbit.audio.SoundEffect.copy.summary": { - "message": "Crear una copia de este {{SoundEffect}}.", + "message": "Crea una copia de este {{SoundEffect}}.", "description": "Create a copy of this ``SoundEffect``." }, "microbit.audio.AudioFrame": { @@ -2880,11 +2880,11 @@ "description": "An ``AudioFrame`` object is a list of 32 samples each of which is a unsigned byte\n(whole number between 0 and 255)." }, "microbit.audio.AudioFrame.copyfrom": { - "message": "copiar forma", + "message": "copiadesde", "description": "(function name) Overwrite the data in this ``AudioFrame`` with the data from another ``AudioFrame`` instance." }, "microbit.audio.AudioFrame.copyfrom.summary": { - "message": "Sobrescribir los datos en este {{AudioFrame}} con los datos de otra instancia de {{AudioFrame}}.", + "message": "Sobrescribe los datos de este {{AudioFrame}} con los datos de otra instancia {{AudioFrame}}.", "description": "Overwrite the data in this ``AudioFrame`` with the data from another ``AudioFrame`` instance." }, "microbit.audio.AudioFrame.copyfrom.param-name.other": { @@ -3457,11 +3457,11 @@ }, "microbit.spi.read": { "message": "leer", - "description": "(function name) Read bytes." + "description": "(function name) Read at most ``nbytes`` while continuously writing the single byte given by ``out``." }, "microbit.spi.read.summary": { "message": "Lee bytes.", - "description": "Read bytes." + "description": "Read at most ``nbytes`` while continuously writing the single byte given by ``out``." }, "microbit.spi.read.param-name.nbytes": { "message": "nbytes", @@ -3471,6 +3471,14 @@ "message": "Número máximo de bytes a leer.", "description": "Parameter docs" }, + "microbit.spi.read.param-name.out": { + "message": "a", + "description": "(parameter name) The byte value to write (default 0)." + }, + "microbit.spi.read.param-doc.out": { + "message": "The byte value to write (default 0).", + "description": "Parameter docs" + }, "microbit.spi.write": { "message": "escribir", "description": "(function name) Write bytes to the bus." @@ -3596,7 +3604,7 @@ "description": "(function name) Check if any data is waiting." }, "microbit.uart.any.summary": { - "message": "Comprueba si hay algún dato esperando.", + "message": "Comprueba si hay datos en espera.", "description": "Check if any data is waiting." }, "microbit.uart.read": { @@ -4116,7 +4124,7 @@ "description": "(parameter name) Bytes per pixel. For RGBW neopixel support, pass 4 rather than the default of 3 for RGB and GRB." }, "neopixel.NeoPixel.__init__.param-doc.bpp": { - "message": "Bytes por píxel. Para compatibilidad con NeoPixel RGBW, pasa 4 en lugar del valor predeterminado 3 para RGB y GRB.", + "message": "Bytes por píxel. Para compatibilidad de neopíxeles RGBW, pasa 4 en lugar del valor predeterminado de 3 para RGB y GRB.", "description": "Parameter docs" }, "neopixel.NeoPixel.__init__.param-name.n": { diff --git a/crowdin/translated/api.fr.json b/crowdin/translated/api.fr.json index 75499ce..14b6a92 100644 --- a/crowdin/translated/api.fr.json +++ b/crowdin/translated/api.fr.json @@ -1441,11 +1441,11 @@ }, "microbit.Image.SMILE": { "message": "smile", - "description": "(field name) Smiling face image." + "description": "(field name) Smiling mouth image." }, "microbit.Image.SMILE.summary": { "message": "Image de visage souriant.", - "description": "Smiling face image." + "description": "Smiling mouth image." }, "microbit.Image.SAD": { "message": "sad", @@ -3457,11 +3457,11 @@ }, "microbit.spi.read": { "message": "read", - "description": "(function name) Read bytes." + "description": "(function name) Read at most ``nbytes`` while continuously writing the single byte given by ``out``." }, "microbit.spi.read.summary": { "message": "Lire des octets.", - "description": "Read bytes." + "description": "Read at most ``nbytes`` while continuously writing the single byte given by ``out``." }, "microbit.spi.read.param-name.nbytes": { "message": "nbytes", @@ -3471,6 +3471,14 @@ "message": "Nombre maximal d'octets à lire.", "description": "Parameter docs" }, + "microbit.spi.read.param-name.out": { + "message": "out", + "description": "(parameter name) The byte value to write (default 0)." + }, + "microbit.spi.read.param-doc.out": { + "message": "The byte value to write (default 0).", + "description": "Parameter docs" + }, "microbit.spi.write": { "message": "write", "description": "(function name) Write bytes to the bus." diff --git a/crowdin/translated/api.ja.json b/crowdin/translated/api.ja.json index f320ef9..ea86681 100644 --- a/crowdin/translated/api.ja.json +++ b/crowdin/translated/api.ja.json @@ -1441,11 +1441,11 @@ }, "microbit.Image.SMILE": { "message": "smile", - "description": "(field name) Smiling face image." + "description": "(field name) Smiling mouth image." }, "microbit.Image.SMILE.summary": { "message": "「笑顔」イメージ。", - "description": "Smiling face image." + "description": "Smiling mouth image." }, "microbit.Image.SAD": { "message": "sad", @@ -3457,11 +3457,11 @@ }, "microbit.spi.read": { "message": "read", - "description": "(function name) Read bytes." + "description": "(function name) Read at most ``nbytes`` while continuously writing the single byte given by ``out``." }, "microbit.spi.read.summary": { "message": "バイト列を読み取ります。", - "description": "Read bytes." + "description": "Read at most ``nbytes`` while continuously writing the single byte given by ``out``." }, "microbit.spi.read.param-name.nbytes": { "message": "nbytes", @@ -3471,6 +3471,14 @@ "message": "読み取る最大バイト数。", "description": "Parameter docs" }, + "microbit.spi.read.param-name.out": { + "message": "out", + "description": "(parameter name) The byte value to write (default 0)." + }, + "microbit.spi.read.param-doc.out": { + "message": "The byte value to write (default 0).", + "description": "Parameter docs" + }, "microbit.spi.write": { "message": "write", "description": "(function name) Write bytes to the bus." diff --git a/crowdin/translated/api.ko.json b/crowdin/translated/api.ko.json index 27072d8..26dc758 100644 --- a/crowdin/translated/api.ko.json +++ b/crowdin/translated/api.ko.json @@ -196,7 +196,7 @@ "description": "(parameter name) ``True`` enables mirroring data to the serial output." }, "log.set_mirroring.param-doc.serial": { - "message": "{{True}} enables mirroring data to the serial output.", + "message": "{{True}}로 설정할 경우 시리얼 출력 인터페이스에 데이터를 미러링하는 것이 허용됩니다.", "description": "Parameter docs" }, "machine": { @@ -844,7 +844,7 @@ "description": "(function name) Schedule to run a function at the interval specified by the time arguments **V2 only**." }, "microbit.run_every.summary": { - "message": "Schedule to run a function at the interval specified by the time arguments **V2 only**.", + "message": "매개 변수로 주어진 일정한 시간(밀리초, ms)마다 특정 함수를 호출합니다. **micro:bit V2 전용**", "description": "Schedule to run a function at the interval specified by the time arguments **V2 only**." }, "microbit.run_every.param-name.callback": { @@ -852,7 +852,7 @@ "description": "(parameter name) Function to call at the provided interval. Omit when using as a decorator." }, "microbit.run_every.param-doc.callback": { - "message": "Function to call at the provided interval. Omit when using as a decorator.", + "message": "주어진 시간이 되었을 때 호출할 함수. 데코레이터(장식자)로 사용할 때 호출.", "description": "Parameter docs" }, "microbit.run_every.param-name.days": { @@ -860,7 +860,7 @@ "description": "(parameter name) Sets the day mark for the scheduling." }, "microbit.run_every.param-doc.days": { - "message": "Sets the day mark for the scheduling.", + "message": "함수 호출 반복 시간의 날 단위를 정합니다.", "description": "Parameter docs" }, "microbit.run_every.param-name.h": { @@ -868,7 +868,7 @@ "description": "(parameter name) Sets the hour mark for the scheduling." }, "microbit.run_every.param-doc.h": { - "message": "Sets the hour mark for the scheduling.", + "message": "함수 호출 반복 시간의 시간 단위를 정합니다.", "description": "Parameter docs" }, "microbit.run_every.param-name.min": { @@ -876,7 +876,7 @@ "description": "(parameter name) Sets the minute mark for the scheduling." }, "microbit.run_every.param-doc.min": { - "message": "Sets the minute mark for the scheduling.", + "message": "함수 호출 반복 시간의 분 단위를 정합니다.", "description": "Parameter docs" }, "microbit.run_every.param-name.ms": { @@ -884,7 +884,7 @@ "description": "(parameter name) Sets the millisecond mark for the scheduling." }, "microbit.run_every.param-doc.ms": { - "message": "Sets the millisecond mark for the scheduling.", + "message": "함수 호출 반복 시간의 밀리초 단위를 정합니다.", "description": "Parameter docs" }, "microbit.run_every.param-name.s": { @@ -892,7 +892,7 @@ "description": "(parameter name) Sets the second mark for the scheduling." }, "microbit.run_every.param-doc.s": { - "message": "Sets the second mark for the scheduling.", + "message": "함수 호출 반복 시간의 초 단위를 정합니다.", "description": "Parameter docs" }, "microbit.panic": { @@ -932,7 +932,7 @@ "description": "(parameter name) A tuple to define the range to convert from." }, "microbit.scale-1.param-doc.from_": { - "message": "A tuple to define the range to convert from.", + "message": "변환할 범위를 정의할 튜플 값", "description": "Parameter docs" }, "microbit.scale-1.param-name.to": { @@ -964,7 +964,7 @@ "description": "(parameter name) A tuple to define the range to convert from." }, "microbit.scale-2.param-doc.from_": { - "message": "A tuple to define the range to convert from.", + "message": "변환할 범위를 정의할 튜플 값", "description": "Parameter docs" }, "microbit.scale-2.param-name.to": { @@ -1441,11 +1441,11 @@ }, "microbit.Image.SMILE": { "message": "smile", - "description": "(field name) Smiling face image." + "description": "(field name) Smiling mouth image." }, "microbit.Image.SMILE.summary": { "message": "미소 짓는 얼굴 이미지입니다.", - "description": "Smiling face image." + "description": "Smiling mouth image." }, "microbit.Image.SAD": { "message": "sad", @@ -3457,11 +3457,11 @@ }, "microbit.spi.read": { "message": "read", - "description": "(function name) Read bytes." + "description": "(function name) Read at most ``nbytes`` while continuously writing the single byte given by ``out``." }, "microbit.spi.read.summary": { "message": "바이트를 읽습니다.", - "description": "Read bytes." + "description": "Read at most ``nbytes`` while continuously writing the single byte given by ``out``." }, "microbit.spi.read.param-name.nbytes": { "message": "nbytes", @@ -3471,6 +3471,14 @@ "message": "읽을 바이트의 최대 수입니다.", "description": "Parameter docs" }, + "microbit.spi.read.param-name.out": { + "message": "out", + "description": "(parameter name) The byte value to write (default 0)." + }, + "microbit.spi.read.param-doc.out": { + "message": "The byte value to write (default 0).", + "description": "Parameter docs" + }, "microbit.spi.write": { "message": "write", "description": "(function name) Write bytes to the bus." diff --git a/crowdin/translated/api.lol.json b/crowdin/translated/api.lol.json index 90e1443..c441f41 100644 --- a/crowdin/translated/api.lol.json +++ b/crowdin/translated/api.lol.json @@ -1441,11 +1441,11 @@ }, "microbit.Image.SMILE": { "message": "crwdns329418:0crwdne329418:0", - "description": "(field name) Smiling face image." + "description": "(field name) Smiling mouth image." }, "microbit.Image.SMILE.summary": { "message": "crwdns329420:0crwdne329420:0", - "description": "Smiling face image." + "description": "Smiling mouth image." }, "microbit.Image.SAD": { "message": "crwdns329422:0crwdne329422:0", @@ -3457,11 +3457,11 @@ }, "microbit.spi.read": { "message": "crwdns330282:0crwdne330282:0", - "description": "(function name) Read bytes." + "description": "(function name) Read at most ``nbytes`` while continuously writing the single byte given by ``out``." }, "microbit.spi.read.summary": { - "message": "crwdns330284:0crwdne330284:0", - "description": "Read bytes." + "message": "crwdns330284:0{{nbytes}}crwdnd330284:0{{out}}crwdne330284:0", + "description": "Read at most ``nbytes`` while continuously writing the single byte given by ``out``." }, "microbit.spi.read.param-name.nbytes": { "message": "crwdns330286:0crwdne330286:0", @@ -3471,6 +3471,14 @@ "message": "crwdns330288:0crwdne330288:0", "description": "Parameter docs" }, + "microbit.spi.read.param-name.out": { + "message": "crwdns360362:0crwdne360362:0", + "description": "(parameter name) The byte value to write (default 0)." + }, + "microbit.spi.read.param-doc.out": { + "message": "crwdns360364:0crwdne360364:0", + "description": "Parameter docs" + }, "microbit.spi.write": { "message": "crwdns330290:0crwdne330290:0", "description": "(function name) Write bytes to the bus." diff --git a/crowdin/translated/api.nl.json b/crowdin/translated/api.nl.json index a8b50d4..84a0a03 100644 --- a/crowdin/translated/api.nl.json +++ b/crowdin/translated/api.nl.json @@ -1441,11 +1441,11 @@ }, "microbit.Image.SMILE": { "message": "glimlach", - "description": "(field name) Smiling face image." + "description": "(field name) Smiling mouth image." }, "microbit.Image.SMILE.summary": { "message": "Glimlach gezicht afbeelding.", - "description": "Smiling face image." + "description": "Smiling mouth image." }, "microbit.Image.SAD": { "message": "verdrietig", @@ -3457,11 +3457,11 @@ }, "microbit.spi.read": { "message": "lezen", - "description": "(function name) Read bytes." + "description": "(function name) Read at most ``nbytes`` while continuously writing the single byte given by ``out``." }, "microbit.spi.read.summary": { "message": "Lees bytes.", - "description": "Read bytes." + "description": "Read at most ``nbytes`` while continuously writing the single byte given by ``out``." }, "microbit.spi.read.param-name.nbytes": { "message": "nbytes", @@ -3471,6 +3471,14 @@ "message": "Maximum aantal te lezen bytes.", "description": "Parameter docs" }, + "microbit.spi.read.param-name.out": { + "message": "uit", + "description": "(parameter name) The byte value to write (default 0)." + }, + "microbit.spi.read.param-doc.out": { + "message": "The byte value to write (default 0).", + "description": "Parameter docs" + }, "microbit.spi.write": { "message": "schrijven", "description": "(function name) Write bytes to the bus." diff --git a/crowdin/translated/api.pl.json b/crowdin/translated/api.pl.json new file mode 100644 index 0000000..4738739 --- /dev/null +++ b/crowdin/translated/api.pl.json @@ -0,0 +1,5266 @@ +{ + "gc": { + "message": "gc", + "description": "(module name) Control the garbage collector" + }, + "gc.summary": { + "message": "Steruj zbieraniem sieci", + "description": "Control the garbage collector" + }, + "gc.enable": { + "message": "enable", + "description": "(function name) Enable automatic garbage collection." + }, + "gc.enable.summary": { + "message": "Włącz automatyczne zbieranie śmieci.", + "description": "Enable automatic garbage collection." + }, + "gc.disable": { + "message": "disable", + "description": "(function name) Disable automatic garbage collection." + }, + "gc.disable.summary": { + "message": "Wyłącz automatyczne zbieranie śmieci.", + "description": "Disable automatic garbage collection." + }, + "gc.collect": { + "message": "collect", + "description": "(function name) Run a garbage collection." + }, + "gc.collect.summary": { + "message": "Uruchom zbieranie śmieci.", + "description": "Run a garbage collection." + }, + "gc.mem_alloc": { + "message": "mem alloc", + "description": "(function name) Get the number of bytes of heap RAM that are allocated." + }, + "gc.mem_alloc.summary": { + "message": "Znajdź liczbę przydzielonych bajtów sterty pamięci RAM.", + "description": "Get the number of bytes of heap RAM that are allocated." + }, + "gc.mem_free": { + "message": "mem free", + "description": "(function name) Get the number of bytes of available heap RAM, or -1 if this amount is not known." + }, + "gc.mem_free.summary": { + "message": "Znajdź liczbę bajtów dostępnej sterty pamięci RAM lub -1, jeśli ta liczba nie jest znana.", + "description": "Get the number of bytes of available heap RAM, or -1 if this amount is not known." + }, + "gc.threshold-1": { + "message": "threshold", + "description": "(function name) Query the additional GC allocation threshold." + }, + "gc.threshold-1.summary": { + "message": "Zapytanie o dodatkowy próg przydziału GC.", + "description": "Query the additional GC allocation threshold." + }, + "gc.threshold-2": { + "message": "threshold", + "description": "(function name) Set the additional GC allocation threshold." + }, + "gc.threshold-2.summary": { + "message": "Ustaw próg dodatkowego przydziału GC.", + "description": "Set the additional GC allocation threshold." + }, + "gc.threshold-2.param-name.amount": { + "message": "amount", + "description": "(parameter name) The number of bytes after which a garbage collection should be triggered." + }, + "gc.threshold-2.param-doc.amount": { + "message": "Liczba bajtów, po których powinno zostać uruchomione zbieranie śmieci.", + "description": "Parameter docs" + }, + "log": { + "message": "log", + "description": "(module name) Log data to your micro:bit V2." + }, + "log.summary": { + "message": "Zaloguj dane do swojego micro:bita V2.", + "description": "Log data to your micro:bit V2." + }, + "log.MILLISECONDS": { + "message": "milliseconds", + "description": "(field name) Milliseconds timestamp format." + }, + "log.MILLISECONDS.summary": { + "message": "Format znacznika czasu w milisekundach.", + "description": "Milliseconds timestamp format." + }, + "log.SECONDS": { + "message": "seconds", + "description": "(field name) Seconds timestamp format." + }, + "log.SECONDS.summary": { + "message": "Format znacznika czasu w sekundach.", + "description": "Seconds timestamp format." + }, + "log.MINUTES": { + "message": "minutes", + "description": "(field name) Minutes timestamp format." + }, + "log.MINUTES.summary": { + "message": "Format znacznika czasu w minutach.", + "description": "Minutes timestamp format." + }, + "log.HOURS": { + "message": "hours", + "description": "(field name) Hours timestamp format." + }, + "log.HOURS.summary": { + "message": "Format znacznika czasu w godzinach.", + "description": "Hours timestamp format." + }, + "log.DAYS": { + "message": "days", + "description": "(field name) Days timestamp format." + }, + "log.DAYS.summary": { + "message": "Format znacznika czasu w dniach.", + "description": "Days timestamp format." + }, + "log.set_labels": { + "message": "set labels", + "description": "(function name) Set up the log file header." + }, + "log.set_labels.summary": { + "message": "Ustaw nagłówek pliku dziennika.", + "description": "Set up the log file header." + }, + "log.set_labels.param-name.*labels": { + "message": "*labels", + "description": "(parameter name) Any number of positional arguments, each corresponding to an entry in the log header." + }, + "log.set_labels.param-doc.*labels": { + "message": "Dowolna liczba argumentów pozycyjnych, każdy odpowiadający wpisowi w nagłówku dziennika.", + "description": "Parameter docs" + }, + "log.set_labels.param-name.timestamp": { + "message": "timestamp", + "description": "(parameter name) 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``." + }, + "log.set_labels.param-doc.timestamp": { + "message": "Wybierz jednostkę znacznika czasu, która będzie automatycznie dodana jako pierwsza kolumna w każdym wierszu. Wartości znacznika czasu mogą być jedną z {{log.MILLISECONDS}}, {{log.SECONDS}}, {{log.MINUTES}}, {{log.HOURS}}, {{log.DAYS}} lub {{None}}, aby wyłączyć znacznik czasu. Wartością domyślną jest {{log.SECONDS}}.", + "description": "Parameter docs" + }, + "log.add-1": { + "message": "add", + "description": "(function name) Add a data row to the log by passing a dictionary of headers and values." + }, + "log.add-1.summary": { + "message": "Dodaj wiersz danych do dziennika poprzez podanie słownika nagłówków i wartości.", + "description": "Add a data row to the log by passing a dictionary of headers and values." + }, + "log.add-1.param-name.data_dictionary": { + "message": "data dictionary", + "description": "(parameter name) The data to log as a dictionary with a key for each header." + }, + "log.add-1.param-doc.data_dictionary": { + "message": "Dane do logowania jako słownik z kluczem dla każdego nagłówka.", + "description": "Parameter docs" + }, + "log.add-2": { + "message": "dodaj", + "description": "(function name) Add a data row to the log using keyword arguments." + }, + "log.add-2.summary": { + "message": "Dodaj wiersz danych do dziennika używając argumentów słów kluczowych.", + "description": "Add a data row to the log using keyword arguments." + }, + "log.delete": { + "message": "delete", + "description": "(function name) Deletes the contents of the log, including headers." + }, + "log.delete.summary": { + "message": "Usuwa zawartość wpisu, w tym nagłówki.", + "description": "Deletes the contents of the log, including headers." + }, + "log.delete.param-name.full": { + "message": "full", + "description": "(parameter name) ``True`` selects a “full” erase and ``False`` selects the “fast” erase method." + }, + "log.delete.param-doc.full": { + "message": "{{True}} wybiera usunięcie \"pełne\" i {{False}} wybiera metodę \"szybkiego\" usunięcia.", + "description": "Parameter docs" + }, + "log.set_mirroring": { + "message": "set mirroring", + "description": "(function name) Configure mirroring of the data logging activity to the serial output." + }, + "log.set_mirroring.summary": { + "message": "Skonfiguruj lustrzane odbicie logowania danych do wyjścia szeregowego.", + "description": "Configure mirroring of the data logging activity to the serial output." + }, + "log.set_mirroring.param-name.serial": { + "message": "serial", + "description": "(parameter name) ``True`` enables mirroring data to the serial output." + }, + "log.set_mirroring.param-doc.serial": { + "message": "{{True}} umożliwia odbicie lustrzane danych na szeregowe wyjście.", + "description": "Parameter docs" + }, + "machine": { + "message": "machine", + "description": "(module name) Low-level utilities." + }, + "machine.summary": { + "message": "Narzędzia niskiego poziomu.", + "description": "Low-level utilities." + }, + "machine.unique_id": { + "message": "unique id", + "description": "(function name) Get a byte string with a unique identifier of a board." + }, + "machine.unique_id.summary": { + "message": "Pobierz ciąg bajtów z unikatowym identyfikatorem płytki.", + "description": "Get a byte string with a unique identifier of a board." + }, + "machine.reset": { + "message": "reset", + "description": "(function name) Reset the device in a manner similar to pushing the external RESET button." + }, + "machine.reset.summary": { + "message": "Zresetuj urządzenie w sposób podobny do naciśnięcia zewnętrznego przycisku RESET.", + "description": "Reset the device in a manner similar to pushing the external RESET button." + }, + "machine.freq": { + "message": "freq", + "description": "(function name) Get the CPU frequency in hertz." + }, + "machine.freq.summary": { + "message": "Uzyskaj częstotliwość procesora w hercach", + "description": "Get the CPU frequency in hertz." + }, + "machine.disable_irq": { + "message": "disable irq", + "description": "(function name) Disable interrupt requests." + }, + "machine.disable_irq.summary": { + "message": "Wyłącz żądania przerwań.", + "description": "Disable interrupt requests." + }, + "machine.enable_irq": { + "message": "enable irq", + "description": "(function name) Re-enable interrupt requests." + }, + "machine.enable_irq.summary": { + "message": "Ponownie włącz żądania przerwań.", + "description": "Re-enable interrupt requests." + }, + "machine.enable_irq.param-name.state": { + "message": "state", + "description": "(parameter name) The value that was returned from the most recent call to the ``disable_irq`` function." + }, + "machine.enable_irq.param-doc.state": { + "message": "Wartość, która została zwrócona z ostatniego wywołania funkcji {{disable_irq}}.", + "description": "Parameter docs" + }, + "machine.time_pulse_us": { + "message": "time pulse us", + "description": "(function name) Time a pulse on a pin." + }, + "machine.time_pulse_us.summary": { + "message": "Czas pulsowania na pinie.", + "description": "Time a pulse on a pin." + }, + "machine.time_pulse_us.param-name.pin": { + "message": "pin", + "description": "(parameter name) The pin to use" + }, + "machine.time_pulse_us.param-doc.pin": { + "message": "Pin do użycia", + "description": "Parameter docs" + }, + "machine.time_pulse_us.param-name.pulse_level": { + "message": "pulse level", + "description": "(parameter name) 0 to time a low pulse or 1 to time a high pulse" + }, + "machine.time_pulse_us.param-doc.pulse_level": { + "message": "0 do czasu niskiego pulsu lub 1 do czasu wysokiego pulsu", + "description": "Parameter docs" + }, + "machine.time_pulse_us.param-name.timeout_us": { + "message": "timeout us", + "description": "(parameter name) A microsecond timeout" + }, + "machine.time_pulse_us.param-doc.timeout_us": { + "message": "Mikrosekundowy limit czasu", + "description": "Parameter docs" + }, + "machine.mem": { + "message": "mem", + "description": "(class name) The class for the ``mem8``, ``mem16`` and ``mem32`` memory views." + }, + "machine.mem.summary": { + "message": "Klasa dla widoków pamięci {{mem8}}, {{mem16}} i {{mem32}}.", + "description": "The class for the ``mem8``, ``mem16`` and ``mem32`` memory views." + }, + "machine.mem.__getitem__": { + "message": "getitem", + "description": "(function name) Access a value from memory." + }, + "machine.mem.__getitem__.summary": { + "message": "Uzyskaj dostęp do wartości z pamięci.", + "description": "Access a value from memory." + }, + "machine.mem.__getitem__.param-name.address": { + "message": "address", + "description": "(parameter name) The memory address." + }, + "machine.mem.__getitem__.param-doc.address": { + "message": "Adres pamięci.", + "description": "Parameter docs" + }, + "machine.mem.__setitem__": { + "message": "setitem", + "description": "(function name) Set a value at the given address." + }, + "machine.mem.__setitem__.summary": { + "message": "Ustaw wartość dla podanego adresu.", + "description": "Set a value at the given address." + }, + "machine.mem.__setitem__.param-name.address": { + "message": "address", + "description": "(parameter name) The memory address." + }, + "machine.mem.__setitem__.param-doc.address": { + "message": "Adres pamięci.", + "description": "Parameter docs" + }, + "machine.mem.__setitem__.param-name.value": { + "message": "value", + "description": "(parameter name) The integer value to set." + }, + "machine.mem.__setitem__.param-doc.value": { + "message": "Wartość całkowita do ustawiania.", + "description": "Parameter docs" + }, + "machine.mem8": { + "message": "mem8", + "description": "(field name) 8-bit (byte) view of memory." + }, + "machine.mem8.summary": { + "message": "8-bitowy widok pamięci.", + "description": "8-bit (byte) view of memory." + }, + "machine.mem16": { + "message": "mem16", + "description": "(field name) 16-bit view of memory." + }, + "machine.mem16.summary": { + "message": "16-bitowy widok pamięci.", + "description": "16-bit view of memory." + }, + "machine.mem32": { + "message": "mem32", + "description": "(field name) 32-bit view of memory." + }, + "machine.mem32.summary": { + "message": "32-bitowy widok pamięci.", + "description": "32-bit view of memory." + }, + "math": { + "message": "math", + "description": "(module name) Mathematical functions." + }, + "math.summary": { + "message": "Funkcje matematyczne.", + "description": "Mathematical functions." + }, + "math.acos": { + "message": "acos", + "description": "(function name) Calculate the inverse cosine." + }, + "math.acos.summary": { + "message": "Obliczyć odwrotność cosinusa.", + "description": "Calculate the inverse cosine." + }, + "math.acos.param-name.x": { + "message": "x", + "description": "(parameter name) A number" + }, + "math.acos.param-doc.x": { + "message": "Liczba", + "description": "Parameter docs" + }, + "math.asin": { + "message": "asin", + "description": "(function name) Calculate the inverse sine." + }, + "math.asin.summary": { + "message": "Obliczyć odwrotność sinusa.", + "description": "Calculate the inverse sine." + }, + "math.asin.param-name.x": { + "message": "x", + "description": "(parameter name) A number" + }, + "math.asin.param-doc.x": { + "message": "Liczba", + "description": "Parameter docs" + }, + "math.atan": { + "message": "atan", + "description": "(function name) Calculate the inverse tangent." + }, + "math.atan.summary": { + "message": "Oblicz odwrotność tangensa.", + "description": "Calculate the inverse tangent." + }, + "math.atan.param-name.x": { + "message": "x", + "description": "(parameter name) A number" + }, + "math.atan.param-doc.x": { + "message": "Liczba", + "description": "Parameter docs" + }, + "math.atan2": { + "message": "atan2", + "description": "(function name) Calculate the principal value of the inverse tangent of ``y/x``." + }, + "math.atan2.summary": { + "message": "Oblicz wartość główną odwrotności tangensa {{y/x}}.", + "description": "Calculate the principal value of the inverse tangent of ``y/x``." + }, + "math.atan2.param-name.x": { + "message": "x", + "description": "(parameter name) A number" + }, + "math.atan2.param-doc.x": { + "message": "Liczba", + "description": "Parameter docs" + }, + "math.atan2.param-name.y": { + "message": "y", + "description": "(parameter name) A number" + }, + "math.atan2.param-doc.y": { + "message": "Liczba", + "description": "Parameter docs" + }, + "math.ceil": { + "message": "ceil", + "description": "(function name) Round a number towards positive infinity." + }, + "math.ceil.summary": { + "message": "Zaokrąglij liczbę w kierunku dodatniej nieskończoności.", + "description": "Round a number towards positive infinity." + }, + "math.ceil.param-name.x": { + "message": "x", + "description": "(parameter name) A number" + }, + "math.ceil.param-doc.x": { + "message": "Liczba", + "description": "Parameter docs" + }, + "math.copysign": { + "message": "copysign", + "description": "(function name) Calculate ``x`` with the sign of ``y``." + }, + "math.copysign.summary": { + "message": "Oblicz {{x}} ze znakiem {{y}}.", + "description": "Calculate ``x`` with the sign of ``y``." + }, + "math.copysign.param-name.x": { + "message": "x", + "description": "(parameter name) A number" + }, + "math.copysign.param-doc.x": { + "message": "Liczba", + "description": "Parameter docs" + }, + "math.copysign.param-name.y": { + "message": "y", + "description": "(parameter name) The source of the sign for the return value" + }, + "math.copysign.param-doc.y": { + "message": "Źródło znaku dla wartości zwracanej", + "description": "Parameter docs" + }, + "math.cos": { + "message": "cos", + "description": "(function name) Calculate the cosine of ``x``." + }, + "math.cos.summary": { + "message": "Oblicz cosinus {{x}}.", + "description": "Calculate the cosine of ``x``." + }, + "math.cos.param-name.x": { + "message": "x", + "description": "(parameter name) A number" + }, + "math.cos.param-doc.x": { + "message": "Liczba", + "description": "Parameter docs" + }, + "math.degrees": { + "message": "degrees", + "description": "(function name) Convert radians to degrees." + }, + "math.degrees.summary": { + "message": "Konwertuj radiany na stopnie.", + "description": "Convert radians to degrees." + }, + "math.degrees.param-name.x": { + "message": "x", + "description": "(parameter name) A value in radians" + }, + "math.degrees.param-doc.x": { + "message": "Wartość w radianach", + "description": "Parameter docs" + }, + "math.exp": { + "message": "exp", + "description": "(function name) Calculate the exponential of ``x``." + }, + "math.exp.summary": { + "message": "Oblicz potęgę {{x}}.", + "description": "Calculate the exponential of ``x``." + }, + "math.exp.param-name.x": { + "message": "x", + "description": "(parameter name) A number" + }, + "math.exp.param-doc.x": { + "message": "Liczba", + "description": "Parameter docs" + }, + "math.fabs": { + "message": "fabs", + "description": "(function name) Return the absolute value of ``x``." + }, + "math.fabs.summary": { + "message": "Zwróć wartość bezwzględną {{x}}.", + "description": "Return the absolute value of ``x``." + }, + "math.fabs.param-name.x": { + "message": "x", + "description": "(parameter name) A number" + }, + "math.fabs.param-doc.x": { + "message": "Liczba", + "description": "Parameter docs" + }, + "math.floor": { + "message": "floor", + "description": "(function name) Round a number towards negative infinity." + }, + "math.floor.summary": { + "message": "Zaokrąglij liczbę w kierunku ujemnej nieskończoności.", + "description": "Round a number towards negative infinity." + }, + "math.floor.param-name.x": { + "message": "x", + "description": "(parameter name) A number" + }, + "math.floor.param-doc.x": { + "message": "Liczba", + "description": "Parameter docs" + }, + "math.fmod": { + "message": "fmod", + "description": "(function name) Calculate the remainder of ``x/y``." + }, + "math.fmod.summary": { + "message": "Oblicz resztę z {{x/y}}.", + "description": "Calculate the remainder of ``x/y``." + }, + "math.fmod.param-name.x": { + "message": "x", + "description": "(parameter name) The numerator" + }, + "math.fmod.param-doc.x": { + "message": "Licznik", + "description": "Parameter docs" + }, + "math.fmod.param-name.y": { + "message": "y", + "description": "(parameter name) The denominator" + }, + "math.fmod.param-doc.y": { + "message": "Mianownik", + "description": "Parameter docs" + }, + "math.frexp": { + "message": "frexp", + "description": "(function name) Decomposes a floating-point number into its mantissa and exponent." + }, + "math.frexp.summary": { + "message": "Rozkłada liczbę zmiennopozycyjną na mantysę i wykładnik.", + "description": "Decomposes a floating-point number into its mantissa and exponent." + }, + "math.frexp.param-name.x": { + "message": "x", + "description": "(parameter name) A floating-point number" + }, + "math.frexp.param-doc.x": { + "message": "Liczba zmiennopozycyjna", + "description": "Parameter docs" + }, + "math.isfinite": { + "message": "isfinite", + "description": "(function name) Check if a value is finite." + }, + "math.isfinite.summary": { + "message": "Sprawdź, czy wartość jest skończona.", + "description": "Check if a value is finite." + }, + "math.isfinite.param-name.x": { + "message": "x", + "description": "(parameter name) A number." + }, + "math.isfinite.param-doc.x": { + "message": "Liczba.", + "description": "Parameter docs" + }, + "math.isinf": { + "message": "isinf", + "description": "(function name) Check if a value is infinite." + }, + "math.isinf.summary": { + "message": "Sprawdź, czy wartość jest nieskończona.", + "description": "Check if a value is infinite." + }, + "math.isinf.param-name.x": { + "message": "x", + "description": "(parameter name) A number." + }, + "math.isinf.param-doc.x": { + "message": "Liczba.", + "description": "Parameter docs" + }, + "math.isnan": { + "message": "isnan", + "description": "(function name) Check if a value is not-a-number (NaN)." + }, + "math.isnan.summary": { + "message": "Sprawdź, czy wartość nie jest liczbą (NaN).", + "description": "Check if a value is not-a-number (NaN)." + }, + "math.isnan.param-name.x": { + "message": "x", + "description": "(parameter name) A number" + }, + "math.isnan.param-doc.x": { + "message": "Liczba", + "description": "Parameter docs" + }, + "math.ldexp": { + "message": "ldexp", + "description": "(function name) Calculate ``x * (2**exp)``." + }, + "math.ldexp.summary": { + "message": "Oblicz {{x * (2**exp)}}.", + "description": "Calculate ``x * (2**exp)``." + }, + "math.ldexp.param-name.exp": { + "message": "exp", + "description": "(parameter name) Integer exponent" + }, + "math.ldexp.param-doc.exp": { + "message": "Wykładnik całkowity", + "description": "Parameter docs" + }, + "math.ldexp.param-name.x": { + "message": "x", + "description": "(parameter name) A number" + }, + "math.ldexp.param-doc.x": { + "message": "Liczba", + "description": "Parameter docs" + }, + "math.log": { + "message": "log", + "description": "(function name) Calculate the logarithm of ``x`` to the given base (defaults to natural logorithm)." + }, + "math.log.summary": { + "message": "Oblicz logarytm z {{x}} przy podanej podstawie (domyślnie loggorytm naturalny).", + "description": "Calculate the logarithm of ``x`` to the given base (defaults to natural logorithm)." + }, + "math.log.param-name.base": { + "message": "base", + "description": "(parameter name) The base to use" + }, + "math.log.param-doc.base": { + "message": "Podstawa do użycia", + "description": "Parameter docs" + }, + "math.log.param-name.x": { + "message": "x", + "description": "(parameter name) A number" + }, + "math.log.param-doc.x": { + "message": "Liczba", + "description": "Parameter docs" + }, + "math.modf": { + "message": "modf", + "description": "(function name) Calculate the fractional and integral parts of ``x``." + }, + "math.modf.summary": { + "message": "Oblicz część ułamkową i całkowitą z {{x}}.", + "description": "Calculate the fractional and integral parts of ``x``." + }, + "math.modf.param-name.x": { + "message": "x", + "description": "(parameter name) A number" + }, + "math.modf.param-doc.x": { + "message": "Liczba", + "description": "Parameter docs" + }, + "math.pow": { + "message": "pow", + "description": "(function name) Returns ``x`` to the power of ``y``." + }, + "math.pow.summary": { + "message": "Zwraca {{x}} do potęgi {{y}}.", + "description": "Returns ``x`` to the power of ``y``." + }, + "math.pow.param-name.x": { + "message": "x", + "description": "(parameter name) A number" + }, + "math.pow.param-doc.x": { + "message": "Liczba", + "description": "Parameter docs" + }, + "math.pow.param-name.y": { + "message": "y", + "description": "(parameter name) The exponent" + }, + "math.pow.param-doc.y": { + "message": "Wykładnik", + "description": "Parameter docs" + }, + "math.radians": { + "message": "radians", + "description": "(function name) Convert a degrees to radians." + }, + "math.radians.summary": { + "message": "Konwertuj stopnie na radiany.", + "description": "Convert a degrees to radians." + }, + "math.radians.param-name.x": { + "message": "x", + "description": "(parameter name) A value in degrees" + }, + "math.radians.param-doc.x": { + "message": "Wartość w stopniach", + "description": "Parameter docs" + }, + "math.sin": { + "message": "sin", + "description": "(function name) Calculate the sine of ``x``." + }, + "math.sin.summary": { + "message": "Oblicz sinus {{x}}.", + "description": "Calculate the sine of ``x``." + }, + "math.sin.param-name.x": { + "message": "x", + "description": "(parameter name) A number" + }, + "math.sin.param-doc.x": { + "message": "Liczba", + "description": "Parameter docs" + }, + "math.sqrt": { + "message": "sqrt", + "description": "(function name) Calculate the square root of ``x``." + }, + "math.sqrt.summary": { + "message": "Oblicz pierwiastek kwadratowy z {{x}}.", + "description": "Calculate the square root of ``x``." + }, + "math.sqrt.param-name.x": { + "message": "x", + "description": "(parameter name) A number" + }, + "math.sqrt.param-doc.x": { + "message": "Liczba", + "description": "Parameter docs" + }, + "math.tan": { + "message": "tan", + "description": "(function name) Calculate the tangent of ``x``." + }, + "math.tan.summary": { + "message": "Oblicz tangens z {{x}}.", + "description": "Calculate the tangent of ``x``." + }, + "math.tan.param-name.x": { + "message": "x", + "description": "(parameter name) A number" + }, + "math.tan.param-doc.x": { + "message": "Liczba", + "description": "Parameter docs" + }, + "math.trunc": { + "message": "trunc", + "description": "(function name) Round a number towards 0." + }, + "math.trunc.summary": { + "message": "Zaokrąglij liczbę w kierunku 0.", + "description": "Round a number towards 0." + }, + "math.trunc.param-name.x": { + "message": "x", + "description": "(parameter name) A number" + }, + "math.trunc.param-doc.x": { + "message": "Liczba", + "description": "Parameter docs" + }, + "math.e": { + "message": "e", + "description": "(field name) Base of the natural logarithm" + }, + "math.e.summary": { + "message": "Podstawa logarytmu naturalnego", + "description": "Base of the natural logarithm" + }, + "math.pi": { + "message": "pi", + "description": "(field name) The ratio of a circle's circumference to its diameter" + }, + "math.pi.summary": { + "message": "Stosunek obwodu okręgu do jego średnicy", + "description": "The ratio of a circle's circumference to its diameter" + }, + "microbit": { + "message": "microbit", + "description": "(module name) Pins, images, sounds, temperature and volume." + }, + "microbit.summary": { + "message": "Piny, obrazy, dźwięki, temperatura i głośność.", + "description": "Pins, images, sounds, temperature and volume." + }, + "microbit.run_every": { + "message": "run every", + "description": "(function name) Schedule to run a function at the interval specified by the time arguments **V2 only**." + }, + "microbit.run_every.summary": { + "message": "Zaplanuj uruchomienie funkcji w przedziale określonym przez argumenty czasu **tylko V2**.", + "description": "Schedule to run a function at the interval specified by the time arguments **V2 only**." + }, + "microbit.run_every.param-name.callback": { + "message": "callback", + "description": "(parameter name) Function to call at the provided interval. Omit when using as a decorator." + }, + "microbit.run_every.param-doc.callback": { + "message": "Funkcja wywoływana w podanym przedziale. Pomiń, jeśli używasz jako dekorator.", + "description": "Parameter docs" + }, + "microbit.run_every.param-name.days": { + "message": "days", + "description": "(parameter name) Sets the day mark for the scheduling." + }, + "microbit.run_every.param-doc.days": { + "message": "Ustawia oznaczenie dnia dla harmonogramu.", + "description": "Parameter docs" + }, + "microbit.run_every.param-name.h": { + "message": "h", + "description": "(parameter name) Sets the hour mark for the scheduling." + }, + "microbit.run_every.param-doc.h": { + "message": "Ustawia znak godziny dla harmonogramu.", + "description": "Parameter docs" + }, + "microbit.run_every.param-name.min": { + "message": "min", + "description": "(parameter name) Sets the minute mark for the scheduling." + }, + "microbit.run_every.param-doc.min": { + "message": "Ustawia znak minuty dla harmonogramu.", + "description": "Parameter docs" + }, + "microbit.run_every.param-name.ms": { + "message": "ms", + "description": "(parameter name) Sets the millisecond mark for the scheduling." + }, + "microbit.run_every.param-doc.ms": { + "message": "Ustawia znak milisekundy dla harmonogramu.", + "description": "Parameter docs" + }, + "microbit.run_every.param-name.s": { + "message": "s", + "description": "(parameter name) Sets the second mark for the scheduling." + }, + "microbit.run_every.param-doc.s": { + "message": "Ustawia znak sekundy dla harmonogramu.", + "description": "Parameter docs" + }, + "microbit.panic": { + "message": "panic", + "description": "(function name) Enter a panic mode." + }, + "microbit.panic.summary": { + "message": "Wejdź w tryb paniki.", + "description": "Enter a panic mode." + }, + "microbit.panic.param-name.n": { + "message": "n", + "description": "(parameter name) An arbitrary integer <= 255 to indicate a status." + }, + "microbit.panic.param-doc.n": { + "message": "Dowolna liczba całkowita <= 255 dla wskazania statusu.", + "description": "Parameter docs" + }, + "microbit.reset": { + "message": "reset", + "description": "(function name) Restart the board." + }, + "microbit.reset.summary": { + "message": "Uruchom ponownie płytkę.", + "description": "Restart the board." + }, + "microbit.scale-1": { + "message": "scale", + "description": "(function name) Converts a value from a range to an integer range." + }, + "microbit.scale-1.summary": { + "message": "Konwertuje wartość z zakresu do zakresu liczb całkowitych.", + "description": "Converts a value from a range to an integer range." + }, + "microbit.scale-1.param-name.from_": { + "message": "from", + "description": "(parameter name) A tuple to define the range to convert from." + }, + "microbit.scale-1.param-doc.from_": { + "message": "Krotka do zdefiniowania zakresu dla konwersji z.", + "description": "Parameter docs" + }, + "microbit.scale-1.param-name.to": { + "message": "to", + "description": "(parameter name) A tuple to define the range to convert to." + }, + "microbit.scale-1.param-doc.to": { + "message": "Krotka do zdefiniowania zakresu dla konwersji do.", + "description": "Parameter docs" + }, + "microbit.scale-1.param-name.value": { + "message": "value", + "description": "(parameter name) A number to convert." + }, + "microbit.scale-1.param-doc.value": { + "message": "Liczba do konwersji.", + "description": "Parameter docs" + }, + "microbit.scale-2": { + "message": "scale", + "description": "(function name) Converts a value from a range to a floating point range." + }, + "microbit.scale-2.summary": { + "message": "Konwertuje wartość z zakresu do zakresu o zmiennopozycyjnego.", + "description": "Converts a value from a range to a floating point range." + }, + "microbit.scale-2.param-name.from_": { + "message": "from", + "description": "(parameter name) A tuple to define the range to convert from." + }, + "microbit.scale-2.param-doc.from_": { + "message": "Krotka do zdefiniowania zakresu dla konwersji z.", + "description": "Parameter docs" + }, + "microbit.scale-2.param-name.to": { + "message": "to", + "description": "(parameter name) A tuple to define the range to convert to." + }, + "microbit.scale-2.param-doc.to": { + "message": "Krotka do zdefiniowania zakresu, na jaki konwertować.", + "description": "Parameter docs" + }, + "microbit.scale-2.param-name.value": { + "message": "value", + "description": "(parameter name) A number to convert." + }, + "microbit.scale-2.param-doc.value": { + "message": "Liczba do konwersji.", + "description": "Parameter docs" + }, + "microbit.sleep": { + "message": "sleep", + "description": "(function name) Wait for ``n`` milliseconds." + }, + "microbit.sleep.summary": { + "message": "Poczekaj {{n}} milisekund.", + "description": "Wait for ``n`` milliseconds." + }, + "microbit.sleep.param-name.n": { + "message": "n", + "description": "(parameter name) The number of milliseconds to wait" + }, + "microbit.sleep.param-doc.n": { + "message": "Liczba milisekund oczekiwania", + "description": "Parameter docs" + }, + "microbit.running_time": { + "message": "running time", + "description": "(function name) Get the running time of the board." + }, + "microbit.running_time.summary": { + "message": "Uzyskaj czas pracy płytki.", + "description": "Get the running time of the board." + }, + "microbit.temperature": { + "message": "temperature", + "description": "(function name) Get the temperature of the micro:bit in degrees Celsius." + }, + "microbit.temperature.summary": { + "message": "Uzyskaj temperaturę micro:bita w stopniach Celsjusza.", + "description": "Get the temperature of the micro:bit in degrees Celsius." + }, + "microbit.set_volume": { + "message": "set volume", + "description": "(function name) Sets the volume." + }, + "microbit.set_volume.summary": { + "message": "Ustawia głośność.", + "description": "Sets the volume." + }, + "microbit.set_volume.param-name.v": { + "message": "v", + "description": "(parameter name) a value between 0 (low) and 255 (high)." + }, + "microbit.set_volume.param-doc.v": { + "message": "wartość między 0 (niska) a 255 (wysoka).", + "description": "Parameter docs" + }, + "microbit.Button": { + "message": "button", + "description": "(class name) The class for the buttons ``button_a`` and ``button_b``." + }, + "microbit.Button.summary": { + "message": "Klasa dla przycisków {{button_a}} i {{button_b}}.", + "description": "The class for the buttons ``button_a`` and ``button_b``." + }, + "microbit.Button.is_pressed": { + "message": "is pressed", + "description": "(function name) Check if the button is pressed." + }, + "microbit.Button.is_pressed.summary": { + "message": "Sprawdź, czy przycisk jest naciśnięty.", + "description": "Check if the button is pressed." + }, + "microbit.Button.was_pressed": { + "message": "was pressed", + "description": "(function name) Check if the button was pressed since the device started or the last time this method was called." + }, + "microbit.Button.was_pressed.summary": { + "message": "Sprawdź, czy przycisk został naciśnięty od momentu uruchomienia urządzenia lub kiedy ta metoda została wywołana.", + "description": "Check if the button was pressed since the device started or the last time this method was called." + }, + "microbit.Button.get_presses": { + "message": "get presses", + "description": "(function name) Get the running total of button presses, and resets this total\nto zero before returning." + }, + "microbit.Button.get_presses.summary": { + "message": "Pobierz sumę naciśnięć przycisków i zresetuje tę sumę\ndo zera przed powrotem.", + "description": "Get the running total of button presses, and resets this total\nto zero before returning." + }, + "microbit.button_a": { + "message": "button a", + "description": "(field name) The left button ``Button`` object." + }, + "microbit.button_a.summary": { + "message": "Lewy przycisk {{Button}} obiekt.", + "description": "The left button ``Button`` object." + }, + "microbit.button_b": { + "message": "button b", + "description": "(field name) The right button ``Button`` object." + }, + "microbit.button_b.summary": { + "message": "Prawy przycisk {{Button}} obiekt.", + "description": "The right button ``Button`` object." + }, + "microbit.MicroBitDigitalPin": { + "message": "microbitdigitalpin", + "description": "(class name) A digital pin." + }, + "microbit.MicroBitDigitalPin.summary": { + "message": "Cyfrowy pin.", + "description": "A digital pin." + }, + "microbit.MicroBitDigitalPin.read_digital": { + "message": "read digital", + "description": "(function name) Get the digital value of the pin." + }, + "microbit.MicroBitDigitalPin.read_digital.summary": { + "message": "Uzyskaj cyfrową wartość pinu.", + "description": "Get the digital value of the pin." + }, + "microbit.MicroBitDigitalPin.write_digital": { + "message": "write digital", + "description": "(function name) Set the digital value of the pin." + }, + "microbit.MicroBitDigitalPin.write_digital.summary": { + "message": "Ustaw cyfrową wartość pinu.", + "description": "Set the digital value of the pin." + }, + "microbit.MicroBitDigitalPin.write_digital.param-name.value": { + "message": "value", + "description": "(parameter name) 1 to set the pin high or 0 to set the pin low" + }, + "microbit.MicroBitDigitalPin.write_digital.param-doc.value": { + "message": "1, aby ustawić wysoką wartość pinu lub 0, aby ustawić niską wartość pinu", + "description": "Parameter docs" + }, + "microbit.MicroBitDigitalPin.set_pull": { + "message": "set pull", + "description": "(function name) Set the pull state to one of three possible values: ``PULL_UP``, ``PULL_DOWN`` or ``NO_PULL``." + }, + "microbit.MicroBitDigitalPin.set_pull.summary": { + "message": "Ustaw stan ciągnięcia na jedną z trzech możliwych wartości: {{PULL_UP}}, {{PULL_DOWN}} lub {{NO_PULL}}.", + "description": "Set the pull state to one of three possible values: ``PULL_UP``, ``PULL_DOWN`` or ``NO_PULL``." + }, + "microbit.MicroBitDigitalPin.set_pull.param-name.value": { + "message": "value", + "description": "(parameter name) The pull state from the relevant pin, e.g. ``pin0.PULL_UP``." + }, + "microbit.MicroBitDigitalPin.set_pull.param-doc.value": { + "message": "Stan ciągnięcia z odpowiedniego pinu, np. {{pin0.PULL_UP}}.", + "description": "Parameter docs" + }, + "microbit.MicroBitDigitalPin.get_pull": { + "message": "get pull", + "description": "(function name) Get the pull state on a pin." + }, + "microbit.MicroBitDigitalPin.get_pull.summary": { + "message": "Uzyskaj stan cignięcia na pinie.", + "description": "Get the pull state on a pin." + }, + "microbit.MicroBitDigitalPin.get_mode": { + "message": "get mode", + "description": "(function name) Returns the pin mode." + }, + "microbit.MicroBitDigitalPin.get_mode.summary": { + "message": "Zwraca tryb pinu.", + "description": "Returns the pin mode." + }, + "microbit.MicroBitDigitalPin.write_analog": { + "message": "write analog", + "description": "(function name) Output a PWM signal on the pin, with the duty cycle proportional to ``value``." + }, + "microbit.MicroBitDigitalPin.write_analog.summary": { + "message": "Wysyłaj sygnał PWM na pin, z cyklem pracy proporcjonalnym do {{value}}.", + "description": "Output a PWM signal on the pin, with the duty cycle proportional to ``value``." + }, + "microbit.MicroBitDigitalPin.write_analog.param-name.value": { + "message": "value", + "description": "(parameter name) An integer or a floating point number between 0 (0% duty cycle) and 1023 (100% duty)." + }, + "microbit.MicroBitDigitalPin.write_analog.param-doc.value": { + "message": "Liczba całkowita lub liczba zmiennopozycyjna między 0 (0% cyklu pracy) a 1023 (100% cyklu pracy).", + "description": "Parameter docs" + }, + "microbit.MicroBitDigitalPin.set_analog_period": { + "message": "set analog period", + "description": "(function name) Set the period of the PWM signal being output to ``period`` in milliseconds." + }, + "microbit.MicroBitDigitalPin.set_analog_period.summary": { + "message": "Ustaw okres wyjścia sygnału PWM na {{period}} w milisekundach.", + "description": "Set the period of the PWM signal being output to ``period`` in milliseconds." + }, + "microbit.MicroBitDigitalPin.set_analog_period.param-name.period": { + "message": "period", + "description": "(parameter name) The period in milliseconds with a minimum valid value of 1ms." + }, + "microbit.MicroBitDigitalPin.set_analog_period.param-doc.period": { + "message": "Okres w milisekundach z minimalną poprawną wartością 1 ms.", + "description": "Parameter docs" + }, + "microbit.MicroBitDigitalPin.set_analog_period_microseconds": { + "message": "ustaw mikrosekundy okresu analogowego", + "description": "(function name) Set the period of the PWM signal being output to ``period`` in microseconds." + }, + "microbit.MicroBitDigitalPin.set_analog_period_microseconds.summary": { + "message": "Ustaw okres wyjścia sygnału PWM na {{period}} w mikrosekundach.", + "description": "Set the period of the PWM signal being output to ``period`` in microseconds." + }, + "microbit.MicroBitDigitalPin.set_analog_period_microseconds.param-name.period": { + "message": "period", + "description": "(parameter name) The period in microseconds with a minimum valid value of 256µs." + }, + "microbit.MicroBitDigitalPin.set_analog_period_microseconds.param-doc.period": { + "message": "Okres w mikrosekundach z minimalną poprawną wartością 256µs.", + "description": "Parameter docs" + }, + "microbit.MicroBitAnalogDigitalPin": { + "message": "microbitanalogdigitalpin", + "description": "(class name) A pin with analog and digital features." + }, + "microbit.MicroBitAnalogDigitalPin.summary": { + "message": "Pin z funkcjami analogowymi i cyfrowymi.", + "description": "A pin with analog and digital features." + }, + "microbit.MicroBitAnalogDigitalPin.read_analog": { + "message": "read analog", + "description": "(function name) Read the voltage applied to the pin." + }, + "microbit.MicroBitAnalogDigitalPin.read_analog.summary": { + "message": "Odczytaj napięcie przyłożone do pinu.", + "description": "Read the voltage applied to the pin." + }, + "microbit.MicroBitTouchPin": { + "message": "microbittouchpin", + "description": "(class name) A pin with analog, digital and touch features." + }, + "microbit.MicroBitTouchPin.summary": { + "message": "Pin z funkcjami analogowymi, cyfrowymi i dotykowymi.", + "description": "A pin with analog, digital and touch features." + }, + "microbit.MicroBitTouchPin.is_touched": { + "message": "is touched", + "description": "(function name) Check if the pin is being touched." + }, + "microbit.MicroBitTouchPin.is_touched.summary": { + "message": "Sprawdź, czy pin został dotknięty.", + "description": "Check if the pin is being touched." + }, + "microbit.MicroBitTouchPin.set_touch_mode": { + "message": "set touch mode", + "description": "(function name) Set the touch mode for the pin." + }, + "microbit.MicroBitTouchPin.set_touch_mode.summary": { + "message": "Ustaw tryb dotykowy dla pinu.", + "description": "Set the touch mode for the pin." + }, + "microbit.MicroBitTouchPin.set_touch_mode.param-name.value": { + "message": "value", + "description": "(parameter name) ``CAPACITIVE`` or ``RESISTIVE`` from the relevant pin." + }, + "microbit.MicroBitTouchPin.set_touch_mode.param-doc.value": { + "message": "{{CAPACITIVE}} lub {{RESISTIVE}} z odpowiedniego pinu.", + "description": "Parameter docs" + }, + "microbit.pin0": { + "message": "pin0", + "description": "(field name) Pin with digital, analog and touch features." + }, + "microbit.pin0.summary": { + "message": "Pin z funkcjami cyfrową, analogową i dotykową.", + "description": "Pin with digital, analog and touch features." + }, + "microbit.pin1": { + "message": "pin1", + "description": "(field name) Pin with digital, analog and touch features." + }, + "microbit.pin1.summary": { + "message": "Pin z funkcjami cyfrową, analogową i dotykową.", + "description": "Pin with digital, analog and touch features." + }, + "microbit.pin2": { + "message": "pin2", + "description": "(field name) Pin with digital, analog and touch features." + }, + "microbit.pin2.summary": { + "message": "Pin z funkcjami cyfrową, analogową i dotykową.", + "description": "Pin with digital, analog and touch features." + }, + "microbit.pin3": { + "message": "pin3", + "description": "(field name) Pin with digital and analog features." + }, + "microbit.pin3.summary": { + "message": "Pin z funkcjami cyfrowymi i analogowymi.", + "description": "Pin with digital and analog features." + }, + "microbit.pin4": { + "message": "pin4", + "description": "(field name) Pin with digital and analog features." + }, + "microbit.pin4.summary": { + "message": "Pin z funkcjami cyfrowymi i analogowymi.", + "description": "Pin with digital and analog features." + }, + "microbit.pin5": { + "message": "pin5", + "description": "(field name) Pin with digital features." + }, + "microbit.pin5.summary": { + "message": "Pin z funkcjami cyfrowymi.", + "description": "Pin with digital features." + }, + "microbit.pin6": { + "message": "pin6", + "description": "(field name) Pin with digital features." + }, + "microbit.pin6.summary": { + "message": "Pin z funkcjami cyfrowymi.", + "description": "Pin with digital features." + }, + "microbit.pin7": { + "message": "pin7", + "description": "(field name) Pin with digital features." + }, + "microbit.pin7.summary": { + "message": "Pin z funkcjami cyfrowymi.", + "description": "Pin with digital features." + }, + "microbit.pin8": { + "message": "pin8", + "description": "(field name) Pin with digital features." + }, + "microbit.pin8.summary": { + "message": "Pin z funkcjami cyfrowymi.", + "description": "Pin with digital features." + }, + "microbit.pin9": { + "message": "pin9", + "description": "(field name) Pin with digital features." + }, + "microbit.pin9.summary": { + "message": "Pin z funkcjami cyfrowymi.", + "description": "Pin with digital features." + }, + "microbit.pin10": { + "message": "pin10", + "description": "(field name) Pin with digital and analog features." + }, + "microbit.pin10.summary": { + "message": "Pin z funkcjami cyfrowymi i analogowymi.", + "description": "Pin with digital and analog features." + }, + "microbit.pin11": { + "message": "pin11", + "description": "(field name) Pin with digital features." + }, + "microbit.pin11.summary": { + "message": "Pin z funkcjami cyfrowymi.", + "description": "Pin with digital features." + }, + "microbit.pin12": { + "message": "pin12", + "description": "(field name) Pin with digital features." + }, + "microbit.pin12.summary": { + "message": "Pin z funkcjami cyfrowymi.", + "description": "Pin with digital features." + }, + "microbit.pin13": { + "message": "pin13", + "description": "(field name) Pin with digital features." + }, + "microbit.pin13.summary": { + "message": "Pin z funkcjami cyfrowymi.", + "description": "Pin with digital features." + }, + "microbit.pin14": { + "message": "pin14", + "description": "(field name) Pin with digital features." + }, + "microbit.pin14.summary": { + "message": "Pin z funkcjami cyfrowymi.", + "description": "Pin with digital features." + }, + "microbit.pin15": { + "message": "pin15", + "description": "(field name) Pin with digital features." + }, + "microbit.pin15.summary": { + "message": "Pin z funkcjami cyfrowymi.", + "description": "Pin with digital features." + }, + "microbit.pin16": { + "message": "pin16", + "description": "(field name) Pin with digital features." + }, + "microbit.pin16.summary": { + "message": "Pin z funkcjami cyfrowymi.", + "description": "Pin with digital features." + }, + "microbit.pin19": { + "message": "pin19", + "description": "(field name) Pin with digital features." + }, + "microbit.pin19.summary": { + "message": "Pin z funkcjami cyfrowymi.", + "description": "Pin with digital features." + }, + "microbit.pin20": { + "message": "pin20", + "description": "(field name) Pin with digital features." + }, + "microbit.pin20.summary": { + "message": "Pin z funkcjami cyfrowymi.", + "description": "Pin with digital features." + }, + "microbit.pin_logo": { + "message": "pin logo", + "description": "(field name) A touch sensitive logo pin on the front of the micro:bit, which by default is set to capacitive touch mode." + }, + "microbit.pin_logo.summary": { + "message": "Wrażliwy na dotyk pin z logo z przodu micro:bita, który domyślnie jest ustawiony na pojemnościowy tryb dotykowy.", + "description": "A touch sensitive logo pin on the front of the micro:bit, which by default is set to capacitive touch mode." + }, + "microbit.pin_speaker": { + "message": "pin speaker", + "description": "(field name) A pin to address the micro:bit speaker." + }, + "microbit.pin_speaker.summary": { + "message": "Pin adresujący głośnik micro:bita.", + "description": "A pin to address the micro:bit speaker." + }, + "microbit.Image": { + "message": "image", + "description": "(class name) An image to show on the micro:bit LED display." + }, + "microbit.Image.summary": { + "message": "Obraz wyświetlany na wyświetlaczu LED micro:bita.", + "description": "An image to show on the micro:bit LED display." + }, + "microbit.Image.HEART": { + "message": "heart", + "description": "(field name) Heart image." + }, + "microbit.Image.HEART.summary": { + "message": "Obraz serca.", + "description": "Heart image." + }, + "microbit.Image.HEART_SMALL": { + "message": "heart small", + "description": "(field name) Small heart image." + }, + "microbit.Image.HEART_SMALL.summary": { + "message": "Obraz małego serca.", + "description": "Small heart image." + }, + "microbit.Image.HAPPY": { + "message": "happy", + "description": "(field name) Happy face image." + }, + "microbit.Image.HAPPY.summary": { + "message": "Obraz szczęśliwej twarzy.", + "description": "Happy face image." + }, + "microbit.Image.SMILE": { + "message": "smile", + "description": "(field name) Smiling mouth image." + }, + "microbit.Image.SMILE.summary": { + "message": "Obraz uśmiechniętej twarzy.", + "description": "Smiling mouth image." + }, + "microbit.Image.SAD": { + "message": "sad", + "description": "(field name) Sad face image." + }, + "microbit.Image.SAD.summary": { + "message": "Obraz smutnej twarzy.", + "description": "Sad face image." + }, + "microbit.Image.CONFUSED": { + "message": "confused", + "description": "(field name) Confused face image." + }, + "microbit.Image.CONFUSED.summary": { + "message": "Obraz zmieszanej twarzy.", + "description": "Confused face image." + }, + "microbit.Image.ANGRY": { + "message": "angry", + "description": "(field name) Angry face image." + }, + "microbit.Image.ANGRY.summary": { + "message": "Obraz złej twarzy.", + "description": "Angry face image." + }, + "microbit.Image.ASLEEP": { + "message": "asleep", + "description": "(field name) Sleeping face image." + }, + "microbit.Image.ASLEEP.summary": { + "message": "Obraz śpiącej twarzy.", + "description": "Sleeping face image." + }, + "microbit.Image.SURPRISED": { + "message": "surprised", + "description": "(field name) Surprised face image." + }, + "microbit.Image.SURPRISED.summary": { + "message": "Obraz zaskoczonej twarzy.", + "description": "Surprised face image." + }, + "microbit.Image.SILLY": { + "message": "silly", + "description": "(field name) Silly face image." + }, + "microbit.Image.SILLY.summary": { + "message": "Obraz głupiej twarzy.", + "description": "Silly face image." + }, + "microbit.Image.FABULOUS": { + "message": "fabulous", + "description": "(field name) Sunglasses face image." + }, + "microbit.Image.FABULOUS.summary": { + "message": "Obraz twarzy w okularach przeciwsłonecznych.", + "description": "Sunglasses face image." + }, + "microbit.Image.MEH": { + "message": "meh", + "description": "(field name) Unimpressed face image." + }, + "microbit.Image.MEH.summary": { + "message": "Obraz niewzruszonej twarzy.", + "description": "Unimpressed face image." + }, + "microbit.Image.YES": { + "message": "yes", + "description": "(field name) Tick image." + }, + "microbit.Image.YES.summary": { + "message": "Haczyk na TAK.", + "description": "Tick image." + }, + "microbit.Image.NO": { + "message": "no", + "description": "(field name) Cross image." + }, + "microbit.Image.NO.summary": { + "message": "Krzyżyk na NIE.", + "description": "Cross image." + }, + "microbit.Image.CLOCK12": { + "message": "clock12", + "description": "(field name) Image with line pointing to 12 o'clock." + }, + "microbit.Image.CLOCK12.summary": { + "message": "Obraz z linią wskazującą na godzinę 12.", + "description": "Image with line pointing to 12 o'clock." + }, + "microbit.Image.CLOCK11": { + "message": "clock11", + "description": "(field name) Image with line pointing to 11 o'clock." + }, + "microbit.Image.CLOCK11.summary": { + "message": "Obraz z linią wskazującą na godzinę 11.", + "description": "Image with line pointing to 11 o'clock." + }, + "microbit.Image.CLOCK10": { + "message": "clock10", + "description": "(field name) Image with line pointing to 10 o'clock." + }, + "microbit.Image.CLOCK10.summary": { + "message": "Obraz z linią wskazującą na godzinę 10.", + "description": "Image with line pointing to 10 o'clock." + }, + "microbit.Image.CLOCK9": { + "message": "clock9", + "description": "(field name) Image with line pointing to 9 o'clock." + }, + "microbit.Image.CLOCK9.summary": { + "message": "Obraz z linią wskazującą na godzinę 9.", + "description": "Image with line pointing to 9 o'clock." + }, + "microbit.Image.CLOCK8": { + "message": "clock8", + "description": "(field name) Image with line pointing to 8 o'clock." + }, + "microbit.Image.CLOCK8.summary": { + "message": "Obraz z linią wskazującą na godzinę 8.", + "description": "Image with line pointing to 8 o'clock." + }, + "microbit.Image.CLOCK7": { + "message": "clock7", + "description": "(field name) Image with line pointing to 7 o'clock." + }, + "microbit.Image.CLOCK7.summary": { + "message": "Obraz z linią wskazującą na godzinę 7.", + "description": "Image with line pointing to 7 o'clock." + }, + "microbit.Image.CLOCK6": { + "message": "clock6", + "description": "(field name) Image with line pointing to 6 o'clock." + }, + "microbit.Image.CLOCK6.summary": { + "message": "Obraz z linią wskazującą na godzinę 6.", + "description": "Image with line pointing to 6 o'clock." + }, + "microbit.Image.CLOCK5": { + "message": "clock5", + "description": "(field name) Image with line pointing to 5 o'clock." + }, + "microbit.Image.CLOCK5.summary": { + "message": "Obraz z linią wskazującą na godzinę 5.", + "description": "Image with line pointing to 5 o'clock." + }, + "microbit.Image.CLOCK4": { + "message": "clock4", + "description": "(field name) Image with line pointing to 4 o'clock." + }, + "microbit.Image.CLOCK4.summary": { + "message": "Obraz z linią wskazującą na godzinę 4.", + "description": "Image with line pointing to 4 o'clock." + }, + "microbit.Image.CLOCK3": { + "message": "clock3", + "description": "(field name) Image with line pointing to 3 o'clock." + }, + "microbit.Image.CLOCK3.summary": { + "message": "Obraz z linią wskazującą na godzinę 3.", + "description": "Image with line pointing to 3 o'clock." + }, + "microbit.Image.CLOCK2": { + "message": "clock2", + "description": "(field name) Image with line pointing to 2 o'clock." + }, + "microbit.Image.CLOCK2.summary": { + "message": "Obraz z linią wskazującą na godzinę 2.", + "description": "Image with line pointing to 2 o'clock." + }, + "microbit.Image.CLOCK1": { + "message": "clock1", + "description": "(field name) Image with line pointing to 1 o'clock." + }, + "microbit.Image.CLOCK1.summary": { + "message": "Obraz z linią wskazującą na godzinę 1.", + "description": "Image with line pointing to 1 o'clock." + }, + "microbit.Image.ARROW_N": { + "message": "arrow n", + "description": "(field name) Image of arrow pointing north." + }, + "microbit.Image.ARROW_N.summary": { + "message": "Obraz strzałki wskazującej północ.", + "description": "Image of arrow pointing north." + }, + "microbit.Image.ARROW_NE": { + "message": "arrow ne", + "description": "(field name) Image of arrow pointing north east." + }, + "microbit.Image.ARROW_NE.summary": { + "message": "Obraz strzałki wskazującej północny wschód.", + "description": "Image of arrow pointing north east." + }, + "microbit.Image.ARROW_E": { + "message": "arrow e", + "description": "(field name) Image of arrow pointing east." + }, + "microbit.Image.ARROW_E.summary": { + "message": "Obraz strzałki wskazującej wschód.", + "description": "Image of arrow pointing east." + }, + "microbit.Image.ARROW_SE": { + "message": "arrow se", + "description": "(field name) Image of arrow pointing south east." + }, + "microbit.Image.ARROW_SE.summary": { + "message": "Obraz strzałki wskazującej południowy wschód.", + "description": "Image of arrow pointing south east." + }, + "microbit.Image.ARROW_S": { + "message": "arrow s", + "description": "(field name) Image of arrow pointing south." + }, + "microbit.Image.ARROW_S.summary": { + "message": "Obraz strzałki wskazującej południe.", + "description": "Image of arrow pointing south." + }, + "microbit.Image.ARROW_SW": { + "message": "arrow sw", + "description": "(field name) Image of arrow pointing south west." + }, + "microbit.Image.ARROW_SW.summary": { + "message": "Obraz strzałki wskazującej południowy zachód.", + "description": "Image of arrow pointing south west." + }, + "microbit.Image.ARROW_W": { + "message": "arrow w", + "description": "(field name) Image of arrow pointing west." + }, + "microbit.Image.ARROW_W.summary": { + "message": "Obraz strzałki wskazującej zachód.", + "description": "Image of arrow pointing west." + }, + "microbit.Image.ARROW_NW": { + "message": "arrow nw", + "description": "(field name) Image of arrow pointing north west." + }, + "microbit.Image.ARROW_NW.summary": { + "message": "Obraz strzałki wskazującej północny zachód.", + "description": "Image of arrow pointing north west." + }, + "microbit.Image.TRIANGLE": { + "message": "triangle", + "description": "(field name) Image of a triangle pointing up." + }, + "microbit.Image.TRIANGLE.summary": { + "message": "Obraz trójkąta skierowanego do góry.", + "description": "Image of a triangle pointing up." + }, + "microbit.Image.TRIANGLE_LEFT": { + "message": "triangle left", + "description": "(field name) Image of a triangle in the left corner." + }, + "microbit.Image.TRIANGLE_LEFT.summary": { + "message": "Obraz trójkąta w lewym rogu.", + "description": "Image of a triangle in the left corner." + }, + "microbit.Image.CHESSBOARD": { + "message": "chessboard", + "description": "(field name) Alternate LEDs lit in a chessboard pattern." + }, + "microbit.Image.CHESSBOARD.summary": { + "message": "Diody LED świecą naprzemiennie w układzie szachownicy.", + "description": "Alternate LEDs lit in a chessboard pattern." + }, + "microbit.Image.DIAMOND": { + "message": "diamond", + "description": "(field name) Diamond image." + }, + "microbit.Image.DIAMOND.summary": { + "message": "Obraz diamentu.", + "description": "Diamond image." + }, + "microbit.Image.DIAMOND_SMALL": { + "message": "diamond small", + "description": "(field name) Small diamond image." + }, + "microbit.Image.DIAMOND_SMALL.summary": { + "message": "Obraz małego diamentu.", + "description": "Small diamond image." + }, + "microbit.Image.SQUARE": { + "message": "square", + "description": "(field name) Square image." + }, + "microbit.Image.SQUARE.summary": { + "message": "Obraz kwadratu.", + "description": "Square image." + }, + "microbit.Image.SQUARE_SMALL": { + "message": "square small", + "description": "(field name) Small square image." + }, + "microbit.Image.SQUARE_SMALL.summary": { + "message": "Obraz małego kwadratu.", + "description": "Small square image." + }, + "microbit.Image.RABBIT": { + "message": "rabbit", + "description": "(field name) Rabbit image." + }, + "microbit.Image.RABBIT.summary": { + "message": "Obraz królika.", + "description": "Rabbit image." + }, + "microbit.Image.COW": { + "message": "cow", + "description": "(field name) Cow image." + }, + "microbit.Image.COW.summary": { + "message": "Obraz krowy.", + "description": "Cow image." + }, + "microbit.Image.MUSIC_CROTCHET": { + "message": "music crotchet", + "description": "(field name) Crotchet note image." + }, + "microbit.Image.MUSIC_CROTCHET.summary": { + "message": "Obraz ćwierćnuty. ", + "description": "Crotchet note image." + }, + "microbit.Image.MUSIC_QUAVER": { + "message": "music quaver", + "description": "(field name) Quaver note image." + }, + "microbit.Image.MUSIC_QUAVER.summary": { + "message": "Obraz nuty ósemki.", + "description": "Quaver note image." + }, + "microbit.Image.MUSIC_QUAVERS": { + "message": "music quavers", + "description": "(field name) Pair of quavers note image." + }, + "microbit.Image.MUSIC_QUAVERS.summary": { + "message": "Obraz pary nut ósemek.", + "description": "Pair of quavers note image." + }, + "microbit.Image.PITCHFORK": { + "message": "pitchfork", + "description": "(field name) Pitchfork image." + }, + "microbit.Image.PITCHFORK.summary": { + "message": "Obraz kamertonu.", + "description": "Pitchfork image." + }, + "microbit.Image.XMAS": { + "message": "xmas", + "description": "(field name) Christmas tree image." + }, + "microbit.Image.XMAS.summary": { + "message": "Obraz choinki.", + "description": "Christmas tree image." + }, + "microbit.Image.PACMAN": { + "message": "pacman", + "description": "(field name) Pac-Man arcade character image." + }, + "microbit.Image.PACMAN.summary": { + "message": "Obrazek postaci arcade Pac-Man", + "description": "Pac-Man arcade character image." + }, + "microbit.Image.TARGET": { + "message": "target", + "description": "(field name) Target image." + }, + "microbit.Image.TARGET.summary": { + "message": "Obraz celu.", + "description": "Target image." + }, + "microbit.Image.TSHIRT": { + "message": "tshirt", + "description": "(field name) T-shirt image." + }, + "microbit.Image.TSHIRT.summary": { + "message": "Obraz t-shirt.", + "description": "T-shirt image." + }, + "microbit.Image.ROLLERSKATE": { + "message": "rollerskate", + "description": "(field name) Rollerskate image." + }, + "microbit.Image.ROLLERSKATE.summary": { + "message": "Obraz Rollerskate.", + "description": "Rollerskate image." + }, + "microbit.Image.DUCK": { + "message": "duck", + "description": "(field name) Duck image." + }, + "microbit.Image.DUCK.summary": { + "message": "Obraz kaczki.", + "description": "Duck image." + }, + "microbit.Image.HOUSE": { + "message": "house", + "description": "(field name) House image." + }, + "microbit.Image.HOUSE.summary": { + "message": "Obraz domu.", + "description": "House image." + }, + "microbit.Image.TORTOISE": { + "message": "tortoise", + "description": "(field name) Tortoise image." + }, + "microbit.Image.TORTOISE.summary": { + "message": "Obraz żółwia.", + "description": "Tortoise image." + }, + "microbit.Image.BUTTERFLY": { + "message": "butterfly", + "description": "(field name) Butterfly image." + }, + "microbit.Image.BUTTERFLY.summary": { + "message": "Obraz motyla.", + "description": "Butterfly image." + }, + "microbit.Image.STICKFIGURE": { + "message": "stickfigure", + "description": "(field name) Stick figure image." + }, + "microbit.Image.STICKFIGURE.summary": { + "message": "Obraz przyklejonej figury.", + "description": "Stick figure image." + }, + "microbit.Image.GHOST": { + "message": "ghost", + "description": "(field name) Ghost image." + }, + "microbit.Image.GHOST.summary": { + "message": "Obraz ducha.", + "description": "Ghost image." + }, + "microbit.Image.SWORD": { + "message": "sword", + "description": "(field name) Sword image." + }, + "microbit.Image.SWORD.summary": { + "message": "Obraz miecza.", + "description": "Sword image." + }, + "microbit.Image.GIRAFFE": { + "message": "giraffe", + "description": "(field name) Giraffe image." + }, + "microbit.Image.GIRAFFE.summary": { + "message": "Obraz żyrafy.", + "description": "Giraffe image." + }, + "microbit.Image.SKULL": { + "message": "skull", + "description": "(field name) Skull image." + }, + "microbit.Image.SKULL.summary": { + "message": "Obraz czaszki.", + "description": "Skull image." + }, + "microbit.Image.UMBRELLA": { + "message": "umbrella", + "description": "(field name) Umbrella image." + }, + "microbit.Image.UMBRELLA.summary": { + "message": "Obraz parasola.", + "description": "Umbrella image." + }, + "microbit.Image.SNAKE": { + "message": "snake", + "description": "(field name) Snake image." + }, + "microbit.Image.SNAKE.summary": { + "message": "Obraz węża.", + "description": "Snake image." + }, + "microbit.Image.SCISSORS": { + "message": "scissors", + "description": "(field name) Scissors image." + }, + "microbit.Image.SCISSORS.summary": { + "message": "Obraz nożyczek.", + "description": "Scissors image." + }, + "microbit.Image.ALL_CLOCKS": { + "message": "all clocks", + "description": "(field name) A list containing all the CLOCK_ images in sequence." + }, + "microbit.Image.ALL_CLOCKS.summary": { + "message": "Lista zawierająca wszystkie obrazy CLOCK_ po kolei.", + "description": "A list containing all the CLOCK_ images in sequence." + }, + "microbit.Image.ALL_ARROWS": { + "message": "all arrows", + "description": "(field name) A list containing all the ARROW_ images in sequence." + }, + "microbit.Image.ALL_ARROWS.summary": { + "message": "Lista zawierająca wszystkie obrazy ARROW_ po kolei.", + "description": "A list containing all the ARROW_ images in sequence." + }, + "microbit.Image.__init__-1": { + "message": "init", + "description": "(function name) Create an image from a string describing which LEDs are lit." + }, + "microbit.Image.__init__-1.summary": { + "message": "Utwórz obraz z łańcucha opisującego, które diody LED są zapalone.", + "description": "Create an image from a string describing which LEDs are lit." + }, + "microbit.Image.__init__-1.param-name.string": { + "message": "string", + "description": "(parameter name) The string describing the image." + }, + "microbit.Image.__init__-1.param-doc.string": { + "message": "Łańcuch opisujący obraz.", + "description": "Parameter docs" + }, + "microbit.Image.__init__-2": { + "message": "init", + "description": "(function name) Create an empty image with ``width`` columns and ``height`` rows." + }, + "microbit.Image.__init__-2.summary": { + "message": "Utwórz pusty obraz z {{width}} kolumnami i {{height}} wierszami.", + "description": "Create an empty image with ``width`` columns and ``height`` rows." + }, + "microbit.Image.__init__-2.param-name.buffer": { + "message": "buffer", + "description": "(parameter name) Optional array or bytes of ``width``×``height`` integers in range 0-9 to initialize the image" + }, + "microbit.Image.__init__-2.param-doc.buffer": { + "message": "Opcjonalna tablica lub bajty {{width}}×{{height}} liczb całkowitych w zakresie 0-9 do zainicjowania obrazu", + "description": "Parameter docs" + }, + "microbit.Image.__init__-2.param-name.height": { + "message": "height", + "description": "(parameter name) Optional height of the image" + }, + "microbit.Image.__init__-2.param-doc.height": { + "message": "Opcjonalna wysokość obrazu", + "description": "Parameter docs" + }, + "microbit.Image.__init__-2.param-name.width": { + "message": "width", + "description": "(parameter name) Optional width of the image" + }, + "microbit.Image.__init__-2.param-doc.width": { + "message": "Opcjonalna szerokość obrazu", + "description": "Parameter docs" + }, + "microbit.Image.width": { + "message": "width", + "description": "(function name) Get the number of columns." + }, + "microbit.Image.width.summary": { + "message": "Ustal liczbę kolumn", + "description": "Get the number of columns." + }, + "microbit.Image.height": { + "message": "height", + "description": "(function name) Get the number of rows." + }, + "microbit.Image.height.summary": { + "message": "Uzyskaj liczbę wierszy", + "description": "Get the number of rows." + }, + "microbit.Image.set_pixel": { + "message": "set pixel", + "description": "(function name) Set the brightness of a pixel." + }, + "microbit.Image.set_pixel.summary": { + "message": "Ustaw jasność piksela.", + "description": "Set the brightness of a pixel." + }, + "microbit.Image.set_pixel.param-name.value": { + "message": "value", + "description": "(parameter name) The brightness as an integer between 0 (dark) and 9 (bright)" + }, + "microbit.Image.set_pixel.param-doc.value": { + "message": "Jasność jako liczba całkowita między 0 (ciemny) i 9 (jasna)", + "description": "Parameter docs" + }, + "microbit.Image.set_pixel.param-name.x": { + "message": "x", + "description": "(parameter name) The column number" + }, + "microbit.Image.set_pixel.param-doc.x": { + "message": "Numer kolumny", + "description": "Parameter docs" + }, + "microbit.Image.set_pixel.param-name.y": { + "message": "y", + "description": "(parameter name) The row number" + }, + "microbit.Image.set_pixel.param-doc.y": { + "message": "Numer wiersza", + "description": "Parameter docs" + }, + "microbit.Image.get_pixel": { + "message": "get pixel", + "description": "(function name) Get the brightness of a pixel." + }, + "microbit.Image.get_pixel.summary": { + "message": "uzyskaj jasność piksela.", + "description": "Get the brightness of a pixel." + }, + "microbit.Image.get_pixel.param-name.x": { + "message": "x", + "description": "(parameter name) The column number" + }, + "microbit.Image.get_pixel.param-doc.x": { + "message": "Numer kolumny", + "description": "Parameter docs" + }, + "microbit.Image.get_pixel.param-name.y": { + "message": "y", + "description": "(parameter name) The row number" + }, + "microbit.Image.get_pixel.param-doc.y": { + "message": "Numer wiersza", + "description": "Parameter docs" + }, + "microbit.Image.shift_left": { + "message": "shift left", + "description": "(function name) Create a new image by shifting the picture left." + }, + "microbit.Image.shift_left.summary": { + "message": "Utwórz nowy obraz przesuwając ten obraz w lewo.", + "description": "Create a new image by shifting the picture left." + }, + "microbit.Image.shift_left.param-name.n": { + "message": "n", + "description": "(parameter name) The number of columns to shift by" + }, + "microbit.Image.shift_left.param-doc.n": { + "message": "Liczba kolumn do przesunięcia", + "description": "Parameter docs" + }, + "microbit.Image.shift_right": { + "message": "shift right", + "description": "(function name) Create a new image by shifting the picture right." + }, + "microbit.Image.shift_right.summary": { + "message": "Utwórz nowy obraz, przesuwając ten obraz w prawo.", + "description": "Create a new image by shifting the picture right." + }, + "microbit.Image.shift_right.param-name.n": { + "message": "n", + "description": "(parameter name) The number of columns to shift by" + }, + "microbit.Image.shift_right.param-doc.n": { + "message": "Liczba kolumn do przesunięcia", + "description": "Parameter docs" + }, + "microbit.Image.shift_up": { + "message": "shift up", + "description": "(function name) Create a new image by shifting the picture up." + }, + "microbit.Image.shift_up.summary": { + "message": "Utwórz nowy obraz, przesuwając obraz do góry.", + "description": "Create a new image by shifting the picture up." + }, + "microbit.Image.shift_up.param-name.n": { + "message": "n", + "description": "(parameter name) The number of rows to shift by" + }, + "microbit.Image.shift_up.param-doc.n": { + "message": "Liczba wierszy do przesunięcia o", + "description": "Parameter docs" + }, + "microbit.Image.shift_down": { + "message": "shift down", + "description": "(function name) Create a new image by shifting the picture down." + }, + "microbit.Image.shift_down.summary": { + "message": "Utwórz nowy obraz, przesuwając obraz do dołu.", + "description": "Create a new image by shifting the picture down." + }, + "microbit.Image.shift_down.param-name.n": { + "message": "n", + "description": "(parameter name) The number of rows to shift by" + }, + "microbit.Image.shift_down.param-doc.n": { + "message": "Liczba wierszy do przesunięcia o", + "description": "Parameter docs" + }, + "microbit.Image.crop": { + "message": "crop", + "description": "(function name) Create a new image by cropping the picture." + }, + "microbit.Image.crop.summary": { + "message": "Utwórz nowy obraz przez przycięcie zdjęcia.", + "description": "Create a new image by cropping the picture." + }, + "microbit.Image.crop.param-name.h": { + "message": "h", + "description": "(parameter name) The crop height" + }, + "microbit.Image.crop.param-doc.h": { + "message": "Wysokość przycięcia", + "description": "Parameter docs" + }, + "microbit.Image.crop.param-name.w": { + "message": "w", + "description": "(parameter name) The crop width" + }, + "microbit.Image.crop.param-doc.w": { + "message": "Szerokość przycięcia", + "description": "Parameter docs" + }, + "microbit.Image.crop.param-name.x": { + "message": "x", + "description": "(parameter name) The crop offset column" + }, + "microbit.Image.crop.param-doc.x": { + "message": "Kolumna przesunięcia przycięcia", + "description": "Parameter docs" + }, + "microbit.Image.crop.param-name.y": { + "message": "y", + "description": "(parameter name) The crop offset row" + }, + "microbit.Image.crop.param-doc.y": { + "message": "Wiersz przesunięcia przycięcia", + "description": "Parameter docs" + }, + "microbit.Image.copy": { + "message": "copy", + "description": "(function name) Create an exact copy of the image." + }, + "microbit.Image.copy.summary": { + "message": "Utwórz dokładną kopię obrazu.", + "description": "Create an exact copy of the image." + }, + "microbit.Image.invert": { + "message": "invert", + "description": "(function name) Create a new image by inverting the brightness of the pixels in the\nsource image." + }, + "microbit.Image.invert.summary": { + "message": "Utwórz nowy obraz przez odwrócenie jasności pikseli w obrazie źródłowym.", + "description": "Create a new image by inverting the brightness of the pixels in the\nsource image." + }, + "microbit.Image.fill": { + "message": "fill", + "description": "(function name) Set the brightness of all the pixels in the image." + }, + "microbit.Image.fill.summary": { + "message": "Ustaw jasność wszystkich pikseli obrazka.", + "description": "Set the brightness of all the pixels in the image." + }, + "microbit.Image.fill.param-name.value": { + "message": "value", + "description": "(parameter name) The new brightness as a number between 0 (dark) and 9 (bright)." + }, + "microbit.Image.fill.param-doc.value": { + "message": "Nowa jasność jako liczba między 0 (ciemny) a 9 (jasny).", + "description": "Parameter docs" + }, + "microbit.Image.blit": { + "message": "blit", + "description": "(function name) Copy an area from another image into this image." + }, + "microbit.Image.blit.summary": { + "message": "Skopiuj obszar z innego obrazu na ten obraz.", + "description": "Copy an area from another image into this image." + }, + "microbit.Image.blit.param-name.h": { + "message": "h", + "description": "(parameter name) The number of rows to copy" + }, + "microbit.Image.blit.param-doc.h": { + "message": "Liczba wierszy do skopiowania", + "description": "Parameter docs" + }, + "microbit.Image.blit.param-name.src": { + "message": "src", + "description": "(parameter name) The source image" + }, + "microbit.Image.blit.param-doc.src": { + "message": "Zdjęcie źródłowe", + "description": "Parameter docs" + }, + "microbit.Image.blit.param-name.w": { + "message": "w", + "description": "(parameter name) The number of columns to copy" + }, + "microbit.Image.blit.param-doc.w": { + "message": "Liczba kolumn do skopiowania", + "description": "Parameter docs" + }, + "microbit.Image.blit.param-name.x": { + "message": "x", + "description": "(parameter name) The starting column offset in the source image" + }, + "microbit.Image.blit.param-doc.x": { + "message": "Początkowe przesunięcie kolumny w obrazie źródłowym", + "description": "Parameter docs" + }, + "microbit.Image.blit.param-name.xdest": { + "message": "xdest", + "description": "(parameter name) The column offset to modify in this image" + }, + "microbit.Image.blit.param-doc.xdest": { + "message": "Przesunięcie kolumny do modyfikacji na tym obrazie", + "description": "Parameter docs" + }, + "microbit.Image.blit.param-name.y": { + "message": "y", + "description": "(parameter name) The starting row offset in the source image" + }, + "microbit.Image.blit.param-doc.y": { + "message": "Początkowe przesunięcie wiersza na obrazie źródłowym", + "description": "Parameter docs" + }, + "microbit.Image.blit.param-name.ydest": { + "message": "ydest", + "description": "(parameter name) The row offset to modify in this image" + }, + "microbit.Image.blit.param-doc.ydest": { + "message": "Przesunięcie wiersza do modyfikacji na tym obrazie", + "description": "Parameter docs" + }, + "microbit.Image.__repr__": { + "message": "repr", + "description": "(function name) Get a compact string representation of the image." + }, + "microbit.Image.__repr__.summary": { + "message": "Uzyskaj kompaktową reprezentację obrazu w postaci łańcucha.", + "description": "Get a compact string representation of the image." + }, + "microbit.Image.__str__": { + "message": "str", + "description": "(function name) Get a readable string representation of the image." + }, + "microbit.Image.__str__.summary": { + "message": "Uzyskaj czytelną reprezentację obrazu w postaci łańcucha.", + "description": "Get a readable string representation of the image." + }, + "microbit.Image.__add__": { + "message": "add", + "description": "(function name) Create a new image by adding the brightness values from the two\nimages for each pixel." + }, + "microbit.Image.__add__.summary": { + "message": "Utwórz nowy obraz, dodając wartości jasności z dwóch\nobrazów dla każdego piksela.", + "description": "Create a new image by adding the brightness values from the two\nimages for each pixel." + }, + "microbit.Image.__add__.param-name.other": { + "message": "other", + "description": "(parameter name) The image to add." + }, + "microbit.Image.__add__.param-doc.other": { + "message": "Obraz do dodania.", + "description": "Parameter docs" + }, + "microbit.Image.__sub__": { + "message": "sub", + "description": "(function name) Create a new image by subtracting the brightness values of the\nother image from this image." + }, + "microbit.Image.__sub__.summary": { + "message": "Utwórz nowy obraz, odejmując wartości jasności\ninnego obrazu od tego obrazu.", + "description": "Create a new image by subtracting the brightness values of the\nother image from this image." + }, + "microbit.Image.__sub__.param-name.other": { + "message": "other", + "description": "(parameter name) The image to subtract." + }, + "microbit.Image.__sub__.param-doc.other": { + "message": "Obraz do odjęcia.", + "description": "Parameter docs" + }, + "microbit.Image.__mul__": { + "message": "mul", + "description": "(function name) Create a new image by multiplying the brightness of each pixel by\n``n``." + }, + "microbit.Image.__mul__.summary": { + "message": "Utwórz nowy obraz, mnożąc jasność każdego piksela przez\n{{n}}.", + "description": "Create a new image by multiplying the brightness of each pixel by\n``n``." + }, + "microbit.Image.__mul__.param-name.n": { + "message": "n", + "description": "(parameter name) The value to multiply by." + }, + "microbit.Image.__mul__.param-doc.n": { + "message": "Wartość do mnożenia przez.", + "description": "Parameter docs" + }, + "microbit.Image.__truediv__": { + "message": "truediv", + "description": "(function name) Create a new image by dividing the brightness of each pixel by\n``n``." + }, + "microbit.Image.__truediv__.summary": { + "message": "Utwórz nowy obraz, dzieląc jasność każdego piksela przez\n{{n}}.", + "description": "Create a new image by dividing the brightness of each pixel by\n``n``." + }, + "microbit.Image.__truediv__.param-name.n": { + "message": "n", + "description": "(parameter name) The value to divide by." + }, + "microbit.Image.__truediv__.param-doc.n": { + "message": "Wartość do dzielenia przez.", + "description": "Parameter docs" + }, + "microbit.SoundEvent.LOUD": { + "message": "loud", + "description": "(field name) Represents the transition of sound events, from ``quiet`` to ``loud`` like clapping or shouting." + }, + "microbit.SoundEvent.LOUD.summary": { + "message": "Przedstawia przejście zdarzeń dźwiękowych z {{quiet}} do {{loud}}, jak klaskanie lub krzyczenie.", + "description": "Represents the transition of sound events, from ``quiet`` to ``loud`` like clapping or shouting." + }, + "microbit.SoundEvent.QUIET": { + "message": "quiet", + "description": "(field name) Represents the transition of sound events, from ``loud`` to ``quiet`` like speaking or background music." + }, + "microbit.SoundEvent.QUIET.summary": { + "message": "Przedstawia przejście zdarzeń dźwiękowych z {{loud}} do {{quiet}}, jak mówienie lub muzyka w tle.", + "description": "Represents the transition of sound events, from ``loud`` to ``quiet`` like speaking or background music." + }, + "microbit.Sound": { + "message": "sound", + "description": "(class name) The built-in sounds can be called using ``audio.play(Sound.NAME)``." + }, + "microbit.Sound.summary": { + "message": "Wbudowane dźwięki można wywołać za pomocą {{audio.play(Sound.NAME)}}.", + "description": "The built-in sounds can be called using ``audio.play(Sound.NAME)``." + }, + "microbit.Sound.GIGGLE": { + "message": "giggle", + "description": "(field name) Giggling sound." + }, + "microbit.Sound.GIGGLE.summary": { + "message": "Chichoczący dźwięk.", + "description": "Giggling sound." + }, + "microbit.Sound.HAPPY": { + "message": "happy", + "description": "(field name) Happy sound." + }, + "microbit.Sound.HAPPY.summary": { + "message": "Szczęśliwy dźwięk.", + "description": "Happy sound." + }, + "microbit.Sound.HELLO": { + "message": "hello", + "description": "(field name) Greeting sound." + }, + "microbit.Sound.HELLO.summary": { + "message": "Dźwięk powitania.", + "description": "Greeting sound." + }, + "microbit.Sound.MYSTERIOUS": { + "message": "mysterious", + "description": "(field name) Mysterious sound." + }, + "microbit.Sound.MYSTERIOUS.summary": { + "message": "Tajemniczy dźwięk.", + "description": "Mysterious sound." + }, + "microbit.Sound.SAD": { + "message": "sad", + "description": "(field name) Sad sound." + }, + "microbit.Sound.SAD.summary": { + "message": "Smutny dźwięk.", + "description": "Sad sound." + }, + "microbit.Sound.SLIDE": { + "message": "slide", + "description": "(field name) Sliding sound." + }, + "microbit.Sound.SLIDE.summary": { + "message": "Przesuwający się dźwięk.", + "description": "Sliding sound." + }, + "microbit.Sound.SOARING": { + "message": "soaring", + "description": "(field name) Soaring sound." + }, + "microbit.Sound.SOARING.summary": { + "message": "Wznoszący się dźwięk.", + "description": "Soaring sound." + }, + "microbit.Sound.SPRING": { + "message": "spring", + "description": "(field name) Spring sound." + }, + "microbit.Sound.SPRING.summary": { + "message": "Wiosny dźwięk.", + "description": "Spring sound." + }, + "microbit.Sound.TWINKLE": { + "message": "twinkle", + "description": "(field name) Twinkling sound." + }, + "microbit.Sound.TWINKLE.summary": { + "message": "Migoczący dźwięk.", + "description": "Twinkling sound." + }, + "microbit.Sound.YAWN": { + "message": "yawn", + "description": "(field name) Yawning sound." + }, + "microbit.Sound.YAWN.summary": { + "message": "Dźwięk ziewania.", + "description": "Yawning sound." + }, + "microbit.accelerometer": { + "message": "accelerometer", + "description": "(module name) Measure the acceleration of the micro:bit and recognise gestures." + }, + "microbit.accelerometer.summary": { + "message": "Zmierz przyspieszenie micro:bita i rozpoznawaj gesty.", + "description": "Measure the acceleration of the micro:bit and recognise gestures." + }, + "microbit.accelerometer.get_x": { + "message": "get x", + "description": "(function name) Get the acceleration measurement in the ``x`` axis in milli-g." + }, + "microbit.accelerometer.get_x.summary": { + "message": "Uzyskaj pomiar przyspieszenia na osi {{x}} w mili-g.", + "description": "Get the acceleration measurement in the ``x`` axis in milli-g." + }, + "microbit.accelerometer.get_y": { + "message": "get y", + "description": "(function name) Get the acceleration measurement in the ``y`` axis in milli-g." + }, + "microbit.accelerometer.get_y.summary": { + "message": "Uzyskaj pomiar przyspieszenia na osi {{y}} w mili-g.", + "description": "Get the acceleration measurement in the ``y`` axis in milli-g." + }, + "microbit.accelerometer.get_z": { + "message": "get z", + "description": "(function name) Get the acceleration measurement in the ``z`` axis in milli-g." + }, + "microbit.accelerometer.get_z.summary": { + "message": "Uzyskaj pomiar przyspieszenia na osi {{z}} w mili-g.", + "description": "Get the acceleration measurement in the ``z`` axis in milli-g." + }, + "microbit.accelerometer.get_values": { + "message": "get values", + "description": "(function name) Get the acceleration measurements in all axes at once as a tuple." + }, + "microbit.accelerometer.get_values.summary": { + "message": "Uzyskaj pomiary przyspieszenia na wszystkich osiach jednocześnie, jako krotkę.", + "description": "Get the acceleration measurements in all axes at once as a tuple." + }, + "microbit.accelerometer.get_strength": { + "message": "get strength", + "description": "(function name) Get the acceleration measurement of all axes combined, as a positive integer. This is the Pythagorean sum of the X, Y and Z axes." + }, + "microbit.accelerometer.get_strength.summary": { + "message": "Uzyskaj pomiar przyspieszenia wszystkich osi łącznie jako dodatnią liczbę całkowitą. Jest to suma pitagorejska osi X, Y i Z.", + "description": "Get the acceleration measurement of all axes combined, as a positive integer. This is the Pythagorean sum of the X, Y and Z axes." + }, + "microbit.accelerometer.current_gesture": { + "message": "current gesture", + "description": "(function name) Get the name of the current gesture." + }, + "microbit.accelerometer.current_gesture.summary": { + "message": "Pobierz nazwę aktualnego gestu.", + "description": "Get the name of the current gesture." + }, + "microbit.accelerometer.is_gesture": { + "message": "is gesture", + "description": "(function name) Check if the named gesture is currently active." + }, + "microbit.accelerometer.is_gesture.summary": { + "message": "Sprawdź, czy nazwany gest jest aktualnie aktywny.", + "description": "Check if the named gesture is currently active." + }, + "microbit.accelerometer.is_gesture.param-name.name": { + "message": "name", + "description": "(parameter name) The gesture name." + }, + "microbit.accelerometer.is_gesture.param-doc.name": { + "message": "Nazwa gestu.", + "description": "Parameter docs" + }, + "microbit.accelerometer.was_gesture": { + "message": "was gesture", + "description": "(function name) Check if the named gesture was active since the last call." + }, + "microbit.accelerometer.was_gesture.summary": { + "message": "Sprawdź, czy nazwany gest był aktywny od ostatniego połączenia.", + "description": "Check if the named gesture was active since the last call." + }, + "microbit.accelerometer.was_gesture.param-name.name": { + "message": "name", + "description": "(parameter name) The gesture name." + }, + "microbit.accelerometer.was_gesture.param-doc.name": { + "message": "Nazwa gestu.", + "description": "Parameter docs" + }, + "microbit.accelerometer.get_gestures": { + "message": "get gestures", + "description": "(function name) Return a tuple of the gesture history." + }, + "microbit.accelerometer.get_gestures.summary": { + "message": "Zwróć krotkę historii gestów.", + "description": "Return a tuple of the gesture history." + }, + "microbit.accelerometer.set_range": { + "message": "set range", + "description": "(function name) Set the accelerometer sensitivity range, in g (standard gravity), to the closest values supported by the hardware, so it rounds to either ``2``, ``4``, or ``8`` g." + }, + "microbit.accelerometer.set_range.summary": { + "message": "Ustaw zakres czułości akcelerometru w g (standardowa grawitacja) na najbliższe wartości obsługiwane przez sprzęt tak, aby zaokrąglał się do {{2}}, {{4}} lub {{8}} g.", + "description": "Set the accelerometer sensitivity range, in g (standard gravity), to the closest values supported by the hardware, so it rounds to either ``2``, ``4``, or ``8`` g." + }, + "microbit.accelerometer.set_range.param-name.value": { + "message": "value", + "description": "(parameter name) New range for the accelerometer, an integer in ``g``." + }, + "microbit.accelerometer.set_range.param-doc.value": { + "message": "Nowy zakres dla akcelerometru, liczba całkowita w {{g}}.", + "description": "Parameter docs" + }, + "microbit.audio": { + "message": "audio", + "description": "(module name) Play sounds using the micro:bit (import ``audio`` for V1 compatibility)." + }, + "microbit.audio.summary": { + "message": "Odtwarzaj dźwięki za pomocą micro:bita (importuj {{audio}} dla kompatybilności V1).", + "description": "Play sounds using the micro:bit (import ``audio`` for V1 compatibility)." + }, + "microbit.audio.play": { + "message": "play", + "description": "(function name) Play a built-in sound, sound effect or custom audio frames." + }, + "microbit.audio.play.summary": { + "message": "Odtwórz wbudowany dźwięk, efekt dźwiękowy lub niestandardowe ramki audio.", + "description": "Play a built-in sound, sound effect or custom audio frames." + }, + "microbit.audio.play.param-name.pin": { + "message": "pin", + "description": "(parameter name) An optional argument to specify the output pin can be used to override the default of ``pin0``. If we do not want any sound to play we can use ``pin=None``." + }, + "microbit.audio.play.param-doc.pin": { + "message": "Opcjonalny argument do określenia pinu wyjściowego może być użyty do nadpisania domyślnej wartości {{pin0}}. Jeśli nie chcemy, aby żaden dźwięk nie był odtwarzany, możemy użyć {{pin=None}}.", + "description": "Parameter docs" + }, + "microbit.audio.play.param-name.return_pin": { + "message": "return pin", + "description": "(parameter name) Specifies a differential edge connector pin to connect to an external speaker instead of ground. This is ignored for the **V2** revision." + }, + "microbit.audio.play.param-doc.return_pin": { + "message": "Określa pin łącznika różnicowego, aby podłączyć płytkę do zewnętrznego głośnika zamiast do ziemi. Jest to ignorowane dla **V2**.", + "description": "Parameter docs" + }, + "microbit.audio.play.param-name.source": { + "message": "source", + "description": "(parameter name) A built-in ``Sound`` such as ``Sound.GIGGLE``, a ``SoundEffect`` or sample data as an iterable of ``AudioFrame`` objects." + }, + "microbit.audio.play.param-doc.source": { + "message": "Wbudowany {{Sound}}, taki jak {{Sound.GIGGLE}}, {{SoundEffect}} lub przykładowe dane jako iteracja obiektów {{AudioFrame}}.", + "description": "Parameter docs" + }, + "microbit.audio.play.param-name.wait": { + "message": "wait", + "description": "(parameter name) If ``wait`` is ``True``, this function will block until the sound is complete." + }, + "microbit.audio.play.param-doc.wait": { + "message": "Jeśli {{wait}} jest {{True}}, ta funkcja będzie blokować, aż dźwięk zostanie zakończony.", + "description": "Parameter docs" + }, + "microbit.audio.is_playing": { + "message": "is playing", + "description": "(function name) Check whether a sound is playing." + }, + "microbit.audio.is_playing.summary": { + "message": "Sprawdź, czy dźwięk jest odtwarzany.", + "description": "Check whether a sound is playing." + }, + "microbit.audio.stop": { + "message": "stop", + "description": "(function name) Stop all audio playback." + }, + "microbit.audio.stop.summary": { + "message": "Zatrzymaj odtwarzania audio.", + "description": "Stop all audio playback." + }, + "microbit.audio.SoundEffect": { + "message": "soundeffect", + "description": "(class name) A sound effect, composed by a set of parameters configured via the constructor or attributes." + }, + "microbit.audio.SoundEffect.summary": { + "message": "Efekt dźwiękowy, utworzony przez zestaw parametrów skonfigurowanych za pomocą konstruktora lub atrybutów.", + "description": "A sound effect, composed by a set of parameters configured via the constructor or attributes." + }, + "microbit.audio.SoundEffect.WAVEFORM_SINE": { + "message": "waveform sine", + "description": "(field name) Sine wave option used for the ``waveform`` parameter." + }, + "microbit.audio.SoundEffect.WAVEFORM_SINE.summary": { + "message": "Opcja sinusoidalnej fali używana dla parametru {{waveform}}.", + "description": "Sine wave option used for the ``waveform`` parameter." + }, + "microbit.audio.SoundEffect.WAVEFORM_SAWTOOTH": { + "message": "waveform sawtooth", + "description": "(field name) Sawtooth wave option used for the ``waveform`` parameter." + }, + "microbit.audio.SoundEffect.WAVEFORM_SAWTOOTH.summary": { + "message": "Opcja fali piłokształtnej używana dla parametru {{waveform}}.", + "description": "Sawtooth wave option used for the ``waveform`` parameter." + }, + "microbit.audio.SoundEffect.WAVEFORM_TRIANGLE": { + "message": "waveform triangle", + "description": "(field name) Triangle wave option used for the ``waveform`` parameter." + }, + "microbit.audio.SoundEffect.WAVEFORM_TRIANGLE.summary": { + "message": "Opcja fali trójkątnej używana dla parametru {{waveform}}.", + "description": "Triangle wave option used for the ``waveform`` parameter." + }, + "microbit.audio.SoundEffect.WAVEFORM_SQUARE": { + "message": "waveform square", + "description": "(field name) Square wave option used for the ``waveform`` parameter." + }, + "microbit.audio.SoundEffect.WAVEFORM_SQUARE.summary": { + "message": "Opcja fali kwadratowj używana dla parametru {{waveform}}.", + "description": "Square wave option used for the ``waveform`` parameter." + }, + "microbit.audio.SoundEffect.WAVEFORM_NOISE": { + "message": "waveform noise", + "description": "(field name) Noise option used for the ``waveform`` parameter." + }, + "microbit.audio.SoundEffect.WAVEFORM_NOISE.summary": { + "message": "Opcja szumu używana dla parametru {{waveform}}.", + "description": "Noise option used for the ``waveform`` parameter." + }, + "microbit.audio.SoundEffect.SHAPE_LINEAR": { + "message": "shape linear", + "description": "(field name) Linear interpolation option used for the ``shape`` parameter." + }, + "microbit.audio.SoundEffect.SHAPE_LINEAR.summary": { + "message": "Opcja interpolacji liniowej używana dla parametru {{shape}}.", + "description": "Linear interpolation option used for the ``shape`` parameter." + }, + "microbit.audio.SoundEffect.SHAPE_CURVE": { + "message": "shape curve", + "description": "(field name) Curve interpolation option used for the ``shape`` parameter." + }, + "microbit.audio.SoundEffect.SHAPE_CURVE.summary": { + "message": "Opcja interpolacji krzywej używana dla parametru {{shape}}.", + "description": "Curve interpolation option used for the ``shape`` parameter." + }, + "microbit.audio.SoundEffect.SHAPE_LOG": { + "message": "shape log", + "description": "(field name) Logarithmic interpolation option used for the ``shape`` parameter." + }, + "microbit.audio.SoundEffect.SHAPE_LOG.summary": { + "message": "Opcja interpolacji logarytmicznej używana dla parametru {{shape}}.", + "description": "Logarithmic interpolation option used for the ``shape`` parameter." + }, + "microbit.audio.SoundEffect.FX_NONE": { + "message": "fx none", + "description": "(field name) No effect option used for the ``fx`` parameter." + }, + "microbit.audio.SoundEffect.FX_NONE.summary": { + "message": "Opcja braku efektu użyta dla parametru {{fx}}.", + "description": "No effect option used for the ``fx`` parameter." + }, + "microbit.audio.SoundEffect.FX_TREMOLO": { + "message": "fx tremolo", + "description": "(field name) Tremolo effect option used for the ``fx`` parameter." + }, + "microbit.audio.SoundEffect.FX_TREMOLO.summary": { + "message": "Opcja efektu Tremelo użyta dla parametru {{fx}}.", + "description": "Tremolo effect option used for the ``fx`` parameter." + }, + "microbit.audio.SoundEffect.FX_VIBRATO": { + "message": "fx vibrato", + "description": "(field name) Vibrato effect option used for the ``fx`` parameter." + }, + "microbit.audio.SoundEffect.FX_VIBRATO.summary": { + "message": "Opcja efektu Vibrato użyta dla parametru {{fx}}.", + "description": "Vibrato effect option used for the ``fx`` parameter." + }, + "microbit.audio.SoundEffect.FX_WARBLE": { + "message": "fx warble", + "description": "(field name) Warble effect option used for the ``fx`` parameter." + }, + "microbit.audio.SoundEffect.FX_WARBLE.summary": { + "message": "Opcja efektu Warble użyta dla parametru {{fx}}.", + "description": "Warble effect option used for the ``fx`` parameter." + }, + "microbit.audio.SoundEffect.freq_start": { + "message": "freq start", + "description": "(field name) Start frequency in Hertz (Hz), a number between ``0`` and ``9999``" + }, + "microbit.audio.SoundEffect.freq_start.summary": { + "message": "Częstotliwość początkowa w hercach (Hz), liczba między {{0}} i {{9999}}", + "description": "Start frequency in Hertz (Hz), a number between ``0`` and ``9999``" + }, + "microbit.audio.SoundEffect.freq_end": { + "message": "freq end", + "description": "(field name) End frequency in Hertz (Hz), a number between ``0`` and ``9999``" + }, + "microbit.audio.SoundEffect.freq_end.summary": { + "message": "Częstotliwość końcowa w hercach (Hz), liczba między {{0}} i {{9999}}", + "description": "End frequency in Hertz (Hz), a number between ``0`` and ``9999``" + }, + "microbit.audio.SoundEffect.duration": { + "message": "duration", + "description": "(field name) Duration of the sound in milliseconds, a number between ``0`` and ``9999``" + }, + "microbit.audio.SoundEffect.duration.summary": { + "message": "Czas trwania dźwięku w milisekundach, liczba pomiędzy {{0}} i {{9999}}", + "description": "Duration of the sound in milliseconds, a number between ``0`` and ``9999``" + }, + "microbit.audio.SoundEffect.vol_start": { + "message": "vol start", + "description": "(field name) Start volume value, a number between ``0`` and ``255``" + }, + "microbit.audio.SoundEffect.vol_start.summary": { + "message": "Wartość głośności początkowej, liczba między {{0}} i {{255}}", + "description": "Start volume value, a number between ``0`` and ``255``" + }, + "microbit.audio.SoundEffect.vol_end": { + "message": "vol end", + "description": "(field name) End volume value, a number between ``0`` and ``255``" + }, + "microbit.audio.SoundEffect.vol_end.summary": { + "message": "Wartość głośności końcowej, liczba między {{0}} i {{255}}", + "description": "End volume value, a number between ``0`` and ``255``" + }, + "microbit.audio.SoundEffect.waveform": { + "message": "waveform", + "description": "(field name) Type of waveform shape, one of these values: ``WAVEFORM_SINE``, ``WAVEFORM_SAWTOOTH``, ``WAVEFORM_TRIANGLE``, ``WAVEFORM_SQUARE``, ``WAVEFORM_NOISE`` (randomly generated noise)" + }, + "microbit.audio.SoundEffect.waveform.summary": { + "message": "Rodzaj kształtu fali, jedna z tych wartości:{{WAVEFORM_SINE}}, {{WAVEFORM_SAWTOOTH}}, {{WAVEFORM_TRIANGLE}}, {{WAVEFORM_SQUARE}}, {{WAVEFORM_NOISE}} (losowo generowany szum)", + "description": "Type of waveform shape, one of these values: ``WAVEFORM_SINE``, ``WAVEFORM_SAWTOOTH``, ``WAVEFORM_TRIANGLE``, ``WAVEFORM_SQUARE``, ``WAVEFORM_NOISE`` (randomly generated noise)" + }, + "microbit.audio.SoundEffect.fx": { + "message": "fx", + "description": "(field name) Effect to add on the sound, one of the following values: ``FX_TREMOLO``, ``FX_VIBRATO``, ``FX_WARBLE``, or ``FX_NONE``" + }, + "microbit.audio.SoundEffect.fx.summary": { + "message": "Efekt do dodania do dźwięku, jedna z następujących wartości: {{FX_TREMOLO}}, {{FX_VIBRATO}}, {{FX_WARBLE}} lub {{FX_NONE}}", + "description": "Effect to add on the sound, one of the following values: ``FX_TREMOLO``, ``FX_VIBRATO``, ``FX_WARBLE``, or ``FX_NONE``" + }, + "microbit.audio.SoundEffect.shape": { + "message": "shape", + "description": "(field name) The type of the interpolation curve between the start and end frequencies, different wave shapes have different rates of change in frequency. One of the following values: ``SHAPE_LINEAR``, ``SHAPE_CURVE``, ``SHAPE_LOG``" + }, + "microbit.audio.SoundEffect.shape.summary": { + "message": "Rodzaj krzywej interpolacji między częstotliwością początkową i końcową, różne kształty fal mają różne szybkości zmian częstotliwości. Jedna z następujących wartości: {{SHAPE_LINEAR}}, {{SHAPE_CURVE}}, {{SHAPE_LOG}}", + "description": "The type of the interpolation curve between the start and end frequencies, different wave shapes have different rates of change in frequency. One of the following values: ``SHAPE_LINEAR``, ``SHAPE_CURVE``, ``SHAPE_LOG``" + }, + "microbit.audio.SoundEffect.__init__": { + "message": "init", + "description": "(function name) Create a new sound effect." + }, + "microbit.audio.SoundEffect.__init__.summary": { + "message": "Utwórz nowy efekt dźwiękowy.", + "description": "Create a new sound effect." + }, + "microbit.audio.SoundEffect.__init__.param-name.duration": { + "message": "duration", + "description": "(parameter name) Duration of the sound in milliseconds, a number between ``0`` and ``9999``." + }, + "microbit.audio.SoundEffect.__init__.param-doc.duration": { + "message": "Czas trwania dźwięku w milisekundach, liczba między {{0}} i {{9999}}.", + "description": "Parameter docs" + }, + "microbit.audio.SoundEffect.__init__.param-name.freq_end": { + "message": "freq end", + "description": "(parameter name) End frequency in Hertz (Hz), a number between ``0`` and ``9999``." + }, + "microbit.audio.SoundEffect.__init__.param-doc.freq_end": { + "message": "Częstotliwość końcowa w hercach (Hz), liczba między {{0}} i {{9999}}.", + "description": "Parameter docs" + }, + "microbit.audio.SoundEffect.__init__.param-name.freq_start": { + "message": "freq start", + "description": "(parameter name) Start frequency in Hertz (Hz), a number between ``0`` and ``9999``." + }, + "microbit.audio.SoundEffect.__init__.param-doc.freq_start": { + "message": "Częstotliwość początkowa w hercach (Hz), liczba między {{0}} i {{9999}}.", + "description": "Parameter docs" + }, + "microbit.audio.SoundEffect.__init__.param-name.fx": { + "message": "fx", + "description": "(parameter name) Effect to add on the sound, one of the following values: ``FX_TREMOLO``, ``FX_VIBRATO``, ``FX_WARBLE``, or ``FX_NONE``." + }, + "microbit.audio.SoundEffect.__init__.param-doc.fx": { + "message": "Efekt do dodania do dźwięku, jedna z następujących wartości: {{FX_TREMOLO}}, {{FX_VIBRATO}}, {{FX_WARBLE}} lub {{FX_NONE}}.", + "description": "Parameter docs" + }, + "microbit.audio.SoundEffect.__init__.param-name.shape": { + "message": "shape", + "description": "(parameter name) The type of the interpolation curve between the start and end frequencies, different wave shapes have different rates of change in frequency. One of the following values: ``SHAPE_LINEAR``, ``SHAPE_CURVE``, ``SHAPE_LOG``." + }, + "microbit.audio.SoundEffect.__init__.param-doc.shape": { + "message": "Rodzaj krzywej interpolacji między częstotliwością początkową i końcową, różne kształty fal mają różne szybkości zmian częstotliwości. Jedna z następujących wartości: {{SHAPE_LINEAR}}, {{SHAPE_CURVE}}, {{SHAPE_LOG}}.", + "description": "Parameter docs" + }, + "microbit.audio.SoundEffect.__init__.param-name.vol_end": { + "message": "vol end", + "description": "(parameter name) End volume value, a number between ``0`` and ``255``." + }, + "microbit.audio.SoundEffect.__init__.param-doc.vol_end": { + "message": "Końcowa wartość głośności, liczba pomiędzy {{0}} i {{255}}.", + "description": "Parameter docs" + }, + "microbit.audio.SoundEffect.__init__.param-name.vol_start": { + "message": "vol start", + "description": "(parameter name) Start volume value, a number between ``0`` and ``255``." + }, + "microbit.audio.SoundEffect.__init__.param-doc.vol_start": { + "message": "Początkowa wartość głośności, liczba pomiędzy {{0}} i {{255}}.", + "description": "Parameter docs" + }, + "microbit.audio.SoundEffect.__init__.param-name.waveform": { + "message": "waveform", + "description": "(parameter name) Type of waveform shape, one of these values: ``WAVEFORM_SINE``, ``WAVEFORM_SAWTOOTH``, ``WAVEFORM_TRIANGLE``, ``WAVEFORM_SQUARE``, ``WAVEFORM_NOISE`` (randomly generated noise)." + }, + "microbit.audio.SoundEffect.__init__.param-doc.waveform": { + "message": "Rodzaj kształtu fali, jedna z tych wartości: {{WAVEFORM_SINE}}, {{WAVEFORM_SAWTOOTH}}, {{WAVEFORM_TRIANGLE}}, {{WAVEFORM_SQUARE}}, {{WAVEFORM_NOISE}} (losowo generowany szum).", + "description": "Parameter docs" + }, + "microbit.audio.SoundEffect.copy": { + "message": "copy", + "description": "(function name) Create a copy of this ``SoundEffect``." + }, + "microbit.audio.SoundEffect.copy.summary": { + "message": "Utwórz kopię {{SoundEffect}}.", + "description": "Create a copy of this ``SoundEffect``." + }, + "microbit.audio.AudioFrame": { + "message": "audioframe", + "description": "(class name) An ``AudioFrame`` object is a list of 32 samples each of which is a unsigned byte\n(whole number between 0 and 255)." + }, + "microbit.audio.AudioFrame.summary": { + "message": "Obiekt {{AudioFrame}} jest listą 32 próbek, z których każda jest niepodpisanym bajtem (liczba całkowita między 0 a 255).", + "description": "An ``AudioFrame`` object is a list of 32 samples each of which is a unsigned byte\n(whole number between 0 and 255)." + }, + "microbit.audio.AudioFrame.copyfrom": { + "message": "copyfrom", + "description": "(function name) Overwrite the data in this ``AudioFrame`` with the data from another ``AudioFrame`` instance." + }, + "microbit.audio.AudioFrame.copyfrom.summary": { + "message": "Zastąp dane w tym {{AudioFrame}} danymi z innej instancji {{AudioFrame}}.", + "description": "Overwrite the data in this ``AudioFrame`` with the data from another ``AudioFrame`` instance." + }, + "microbit.audio.AudioFrame.copyfrom.param-name.other": { + "message": "other", + "description": "(parameter name) ``AudioFrame`` instance from which to copy the data." + }, + "microbit.audio.AudioFrame.copyfrom.param-doc.other": { + "message": "Instancja {{AudioFrame}}, z której skopiowane są dane.", + "description": "Parameter docs" + }, + "microbit.compass": { + "message": "compass", + "description": "(module name) Use the built-in compass." + }, + "microbit.compass.summary": { + "message": "Użyj wbudowanego kompasu.", + "description": "Use the built-in compass." + }, + "microbit.compass.calibrate": { + "message": "calibrate", + "description": "(function name) Starts the calibration process." + }, + "microbit.compass.calibrate.summary": { + "message": "Rozpoczyna proces kalibracji.", + "description": "Starts the calibration process." + }, + "microbit.compass.is_calibrated": { + "message": "is calibrated", + "description": "(function name) Check is the compass is calibrated." + }, + "microbit.compass.is_calibrated.summary": { + "message": "Sprawdź, czy kompas jest skalibrowany.", + "description": "Check is the compass is calibrated." + }, + "microbit.compass.clear_calibration": { + "message": "clear calibration", + "description": "(function name) Undoes the calibration, making the compass uncalibrated again." + }, + "microbit.compass.clear_calibration.summary": { + "message": "Cofnij kalibrację, czyniąc kompas ponownie niekalibrowanym.", + "description": "Undoes the calibration, making the compass uncalibrated again." + }, + "microbit.compass.get_x": { + "message": "get x", + "description": "(function name) Get the magnetic field strength on the ``x`` axis." + }, + "microbit.compass.get_x.summary": { + "message": "Uzyskaj natężenie pola magnetycznego na osi {{x}}.", + "description": "Get the magnetic field strength on the ``x`` axis." + }, + "microbit.compass.get_y": { + "message": "get y", + "description": "(function name) Get the magnetic field strength on the ``y`` axis." + }, + "microbit.compass.get_y.summary": { + "message": "Uzyskaj natężenie pola magnetycznego na osi {{y}}.", + "description": "Get the magnetic field strength on the ``y`` axis." + }, + "microbit.compass.get_z": { + "message": "get z", + "description": "(function name) Get the magnetic field strength on the ``z`` axis." + }, + "microbit.compass.get_z.summary": { + "message": "Uzyskaj natężenie pola magnetycznego na osi {{z}}.", + "description": "Get the magnetic field strength on the ``z`` axis." + }, + "microbit.compass.heading": { + "message": "heading", + "description": "(function name) Get the compass heading." + }, + "microbit.compass.heading.summary": { + "message": "Pobierz kierunek kompasu.", + "description": "Get the compass heading." + }, + "microbit.compass.get_field_strength": { + "message": "get field strength", + "description": "(function name) Get the magnitude of the magnetic field around the device." + }, + "microbit.compass.get_field_strength.summary": { + "message": "Uzyskaj wielkość pola magnetycznego wokół urządzenia.", + "description": "Get the magnitude of the magnetic field around the device." + }, + "microbit.display": { + "message": "display", + "description": "(module name) Show text, images and animations on the 5×5 LED display." + }, + "microbit.display.summary": { + "message": "Pokaż tekst, obrazy i animacje na wyświetlaczu 5x5 LED.", + "description": "Show text, images and animations on the 5×5 LED display." + }, + "microbit.display.get_pixel": { + "message": "get pixel", + "description": "(function name) Get the brightness of the LED at column ``x`` and row ``y``." + }, + "microbit.display.get_pixel.summary": { + "message": "Uzyskaj jasność LED w kolumnie {{x}} i w wierszu {{y}}.", + "description": "Get the brightness of the LED at column ``x`` and row ``y``." + }, + "microbit.display.get_pixel.param-name.x": { + "message": "x", + "description": "(parameter name) The display column (0..4)" + }, + "microbit.display.get_pixel.param-doc.x": { + "message": "Wyświetlana kolumna (0..4)", + "description": "Parameter docs" + }, + "microbit.display.get_pixel.param-name.y": { + "message": "y", + "description": "(parameter name) The display row (0..4)" + }, + "microbit.display.get_pixel.param-doc.y": { + "message": "Wyświetlany wiersz (0..4)", + "description": "Parameter docs" + }, + "microbit.display.set_pixel": { + "message": "set pixel", + "description": "(function name) Set the brightness of the LED at column ``x`` and row ``y``." + }, + "microbit.display.set_pixel.summary": { + "message": "Ustaw jasność LED w kolumnie {{x}} i wierszu {{y}}.", + "description": "Set the brightness of the LED at column ``x`` and row ``y``." + }, + "microbit.display.set_pixel.param-name.value": { + "message": "value", + "description": "(parameter name) The brightness between 0 (off) and 9 (bright)" + }, + "microbit.display.set_pixel.param-doc.value": { + "message": "Jasność między 0 (wyłączona) i 9 (jasna)", + "description": "Parameter docs" + }, + "microbit.display.set_pixel.param-name.x": { + "message": "x", + "description": "(parameter name) The display column (0..4)" + }, + "microbit.display.set_pixel.param-doc.x": { + "message": "Wyświetlana kolumna (0..4)", + "description": "Parameter docs" + }, + "microbit.display.set_pixel.param-name.y": { + "message": "y", + "description": "(parameter name) The display row (0..4)" + }, + "microbit.display.set_pixel.param-doc.y": { + "message": "Wyświetlany wiersz (0..4)", + "description": "Parameter docs" + }, + "microbit.display.clear": { + "message": "clear", + "description": "(function name) Set the brightness of all LEDs to 0 (off)." + }, + "microbit.display.clear.summary": { + "message": "Ustaw jasność wszystkich diod LED na 0 (wyłączone).", + "description": "Set the brightness of all LEDs to 0 (off)." + }, + "microbit.display.show": { + "message": "show", + "description": "(function name) Shows images, letters or digits on the LED display." + }, + "microbit.display.show.summary": { + "message": "Pokazuje obrazy, litery lub cyfry na wyświetlaczu LED.", + "description": "Shows images, letters or digits on the LED display." + }, + "microbit.display.show.param-name.clear": { + "message": "clear", + "description": "(parameter name) If ``clear`` is ``True``, the display will be cleared after the sequence has finished." + }, + "microbit.display.show.param-doc.clear": { + "message": "Jeśli {{clear}} jest {{True}}, wyświetlacz zostanie wyczyszczony po zakończeniu sekwencji.", + "description": "Parameter docs" + }, + "microbit.display.show.param-name.delay": { + "message": "delay", + "description": "(parameter name) Each letter, digit or image is shown with ``delay`` milliseconds between them." + }, + "microbit.display.show.param-doc.delay": { + "message": "Każda litera, cyfra lub obraz są wyświetlane z {{delay}} milisekundami między sobą.", + "description": "Parameter docs" + }, + "microbit.display.show.param-name.image": { + "message": "image", + "description": "(parameter name) A string, number, image or list of images to show." + }, + "microbit.display.show.param-doc.image": { + "message": "Łańcuch, liczba, obraz lub lista obrazów do pokazania.", + "description": "Parameter docs" + }, + "microbit.display.show.param-name.loop": { + "message": "loop", + "description": "(parameter name) If ``loop`` is ``True``, the animation will repeat forever." + }, + "microbit.display.show.param-doc.loop": { + "message": "Jeśli {{loop}} jest {{True}}, animacja będzie powtarzana w nieskończoność.", + "description": "Parameter docs" + }, + "microbit.display.show.param-name.wait": { + "message": "wait", + "description": "(parameter name) If ``wait`` is ``True``, this function will block until the animation is finished, otherwise the animation will happen in the background." + }, + "microbit.display.show.param-doc.wait": { + "message": "Jeśli {{wait}} jest {{True}}, ta funkcja będzie blokować, aż zakończy się animacja, w przeciwnym razie animacja pojawi się w tle.", + "description": "Parameter docs" + }, + "microbit.display.scroll": { + "message": "scroll", + "description": "(function name) Scrolls a number or text on the LED display." + }, + "microbit.display.scroll.summary": { + "message": "Przewija liczbę lub tekst na wyświetlaczu LED.", + "description": "Scrolls a number or text on the LED display." + }, + "microbit.display.scroll.param-name.delay": { + "message": "delay", + "description": "(parameter name) The ``delay`` parameter controls how fast the text is scrolling." + }, + "microbit.display.scroll.param-doc.delay": { + "message": "Parametr {{delay}} kontroluje szybkość przewijania tekstu.", + "description": "Parameter docs" + }, + "microbit.display.scroll.param-name.loop": { + "message": "loop", + "description": "(parameter name) If ``loop`` is ``True``, the animation will repeat forever." + }, + "microbit.display.scroll.param-doc.loop": { + "message": "Jeśli {{loop}} jest {{True}}, animacja będzie powtarzana w nieskończoność.", + "description": "Parameter docs" + }, + "microbit.display.scroll.param-name.monospace": { + "message": "monospace", + "description": "(parameter name) If ``monospace`` is ``True``, the characters will all take up 5 pixel-columns in width, otherwise there will be exactly 1 blank pixel-column between each character as they scroll." + }, + "microbit.display.scroll.param-doc.monospace": { + "message": "Jeśli {{monospace}} jest {{True}}, wszystkie znaki zajmą co najwyżej 5 kolumn pikseli na szerokość, w przeciwnym razie będzie dokładnie 1 pusta kolumna pikseli pomiędzy każdym znakiem, gdy się przewijają.", + "description": "Parameter docs" + }, + "microbit.display.scroll.param-name.text": { + "message": "text", + "description": "(parameter name) The string to scroll. If ``text`` is an integer or float it is first converted to a string using ``str()``." + }, + "microbit.display.scroll.param-doc.text": { + "message": "Łańcuch do przewinięcia. Jeśli {{text}} jest liczbą całkowitą lub zmiennopozycyjną, najpierw zostanie przekonwertowany na łańcuch za pomocą {{str()}}.", + "description": "Parameter docs" + }, + "microbit.display.scroll.param-name.wait": { + "message": "wait", + "description": "(parameter name) If ``wait`` is ``True``, this function will block until the animation is finished, otherwise the animation will happen in the background." + }, + "microbit.display.scroll.param-doc.wait": { + "message": "Jeśli {{wait}} jest {{True}}, ta funkcja będzie blokować, aż zakończy się animacja, w przeciwnym razie animacja pojawi się w tle.", + "description": "Parameter docs" + }, + "microbit.display.on": { + "message": "on", + "description": "(function name) Turn on the LED display." + }, + "microbit.display.on.summary": { + "message": "Włącz wyświetlacz LED.", + "description": "Turn on the LED display." + }, + "microbit.display.off": { + "message": "off", + "description": "(function name) Turn off the LED display (disabling the display allows you to re-use the GPIO pins for other purposes)." + }, + "microbit.display.off.summary": { + "message": "Wyłącz wyświetlacz LED (wyłączenie wyświetlania pozwala na ponowne użycie pinów GPIO do innych celów).", + "description": "Turn off the LED display (disabling the display allows you to re-use the GPIO pins for other purposes)." + }, + "microbit.display.is_on": { + "message": "is on", + "description": "(function name) Check whether the LED display is enabled." + }, + "microbit.display.is_on.summary": { + "message": "Sprawdź, czy wyświetlacz LED jest włączony.", + "description": "Check whether the LED display is enabled." + }, + "microbit.display.read_light_level": { + "message": "read light level", + "description": "(function name) Read the light level." + }, + "microbit.display.read_light_level.summary": { + "message": "Odczytuj poziom światła.", + "description": "Read the light level." + }, + "microbit.i2c": { + "message": "i2c", + "description": "(module name) Communicate with devices using the I²C bus protocol." + }, + "microbit.i2c.summary": { + "message": "Komunikuj się z urządzeniami za pomocą protokołu magistrali I2C.", + "description": "Communicate with devices using the I²C bus protocol." + }, + "microbit.i2c.init": { + "message": "init", + "description": "(function name) Re-initialize a peripheral." + }, + "microbit.i2c.init.summary": { + "message": "Ponownie zainicjuj peryferia.", + "description": "Re-initialize a peripheral." + }, + "microbit.i2c.init.param-name.freq": { + "message": "freq", + "description": "(parameter name) clock frequency" + }, + "microbit.i2c.init.param-doc.freq": { + "message": "clock frequency", + "description": "Parameter docs" + }, + "microbit.i2c.init.param-name.scl": { + "message": "scl", + "description": "(parameter name) ``scl`` pin (default 19)" + }, + "microbit.i2c.init.param-doc.scl": { + "message": "{{scl}} pin (domyślnie 19)", + "description": "Parameter docs" + }, + "microbit.i2c.init.param-name.sda": { + "message": "sda", + "description": "(parameter name) ``sda`` pin (default 20)" + }, + "microbit.i2c.init.param-doc.sda": { + "message": "{{sda}} pin (domyślnie 20)", + "description": "Parameter docs" + }, + "microbit.i2c.scan": { + "message": "scan", + "description": "(function name) Scan the bus for devices." + }, + "microbit.i2c.scan.summary": { + "message": "Przeskanuj magistralę w poszukiwaniu urządzeń.", + "description": "Scan the bus for devices." + }, + "microbit.i2c.read": { + "message": "read", + "description": "(function name) Read bytes from a device." + }, + "microbit.i2c.read.summary": { + "message": "Odczytaj bajty z urządzenia..", + "description": "Read bytes from a device." + }, + "microbit.i2c.read.param-name.addr": { + "message": "addr", + "description": "(parameter name) The 7-bit address of the device" + }, + "microbit.i2c.read.param-doc.addr": { + "message": "7-bitowy adres urządzenia", + "description": "Parameter docs" + }, + "microbit.i2c.read.param-name.n": { + "message": "n", + "description": "(parameter name) The number of bytes to read" + }, + "microbit.i2c.read.param-doc.n": { + "message": "Liczba bajtów do odczytu", + "description": "Parameter docs" + }, + "microbit.i2c.read.param-name.repeat": { + "message": "repeat", + "description": "(parameter name) If ``True``, no stop bit will be sent" + }, + "microbit.i2c.read.param-doc.repeat": { + "message": "Jeśli {{True}}, nie zostaną wysłane żadne bity zatrzymania", + "description": "Parameter docs" + }, + "microbit.i2c.write": { + "message": "write", + "description": "(function name) Write bytes to a device." + }, + "microbit.i2c.write.summary": { + "message": "Zapisz bajty na urządzenie.", + "description": "Write bytes to a device." + }, + "microbit.i2c.write.param-name.addr": { + "message": "addr", + "description": "(parameter name) The 7-bit address of the device" + }, + "microbit.i2c.write.param-doc.addr": { + "message": "7-bitowy adres urządzenia", + "description": "Parameter docs" + }, + "microbit.i2c.write.param-name.buf": { + "message": "buf", + "description": "(parameter name) A buffer containing the bytes to write" + }, + "microbit.i2c.write.param-doc.buf": { + "message": "Bufor zawierający bajty do zapisu", + "description": "Parameter docs" + }, + "microbit.i2c.write.param-name.repeat": { + "message": "repeat", + "description": "(parameter name) If ``True``, no stop bit will be sent" + }, + "microbit.i2c.write.param-doc.repeat": { + "message": "Jeśli {{True}}, nie zostaną wysłane żadne bity zatrzymania", + "description": "Parameter docs" + }, + "microbit.microphone": { + "message": "microphone", + "description": "(module name) Respond to sound using the built-in microphone (V2 only)." + }, + "microbit.microphone.summary": { + "message": "Odpowiedz na dźwięk przy użyciu wbudowanego mikrofonu (tylko V2).", + "description": "Respond to sound using the built-in microphone (V2 only)." + }, + "microbit.microphone.current_event": { + "message": "current event", + "description": "(function name) Get the last recorded sound event" + }, + "microbit.microphone.current_event.summary": { + "message": "Pobierz ostatnie nagrane zdarzenie dźwiękowe", + "description": "Get the last recorded sound event" + }, + "microbit.microphone.was_event": { + "message": "was event", + "description": "(function name) Check if a sound was heard at least once since the last call." + }, + "microbit.microphone.was_event.summary": { + "message": "Sprawdź, czy dźwięk był słyszany co najmniej raz od ostatniego połączenia.", + "description": "Check if a sound was heard at least once since the last call." + }, + "microbit.microphone.was_event.param-name.event": { + "message": "event", + "description": "(parameter name) The event to check for, such as ``SoundEvent.LOUD`` or ``SoundEvent.QUIET``" + }, + "microbit.microphone.was_event.param-doc.event": { + "message": "Zdarzenie do sprawdzenia, takie jak {{SoundEvent.LOUD}} lub {{SoundEvent.QUIET}}", + "description": "Parameter docs" + }, + "microbit.microphone.is_event": { + "message": "is event", + "description": "(function name) Check the most recent sound event detected." + }, + "microbit.microphone.is_event.summary": { + "message": "Sprawdź najnowsze wykryte zdarzenie dźwiękowe.", + "description": "Check the most recent sound event detected." + }, + "microbit.microphone.is_event.param-name.event": { + "message": "event", + "description": "(parameter name) The event to check for, such as ``SoundEvent.LOUD`` or ``SoundEvent.QUIET``" + }, + "microbit.microphone.is_event.param-doc.event": { + "message": "Zdarzenie do sprawdzenia, takie jak {{SoundEvent.LOUD}} lub {{SoundEvent.QUIET}}", + "description": "Parameter docs" + }, + "microbit.microphone.get_events": { + "message": "get events", + "description": "(function name) Get the sound event history as a tuple." + }, + "microbit.microphone.get_events.summary": { + "message": "Pobierz historię zdarzeń dźwiękowych jako krotkę.", + "description": "Get the sound event history as a tuple." + }, + "microbit.microphone.set_threshold": { + "message": "set threshold", + "description": "(function name) Set the threshold for a sound event." + }, + "microbit.microphone.set_threshold.summary": { + "message": "Ustaw próg dla zdarzenia dźwiękowego.", + "description": "Set the threshold for a sound event." + }, + "microbit.microphone.set_threshold.param-name.event": { + "message": "event", + "description": "(parameter name) A sound event, such as ``SoundEvent.LOUD`` or ``SoundEvent.QUIET``." + }, + "microbit.microphone.set_threshold.param-doc.event": { + "message": "Zdarzenie dźwiękowe, takie jak {{SoundEvent.LOUD}} lub {{SoundEvent.QUIET}}.", + "description": "Parameter docs" + }, + "microbit.microphone.set_threshold.param-name.value": { + "message": "value", + "description": "(parameter name) The threshold level in the range 0-255." + }, + "microbit.microphone.set_threshold.param-doc.value": { + "message": "Poziom progu w zakresie 0-255.", + "description": "Parameter docs" + }, + "microbit.microphone.sound_level": { + "message": "sound level", + "description": "(function name) Get the sound pressure level." + }, + "microbit.microphone.sound_level.summary": { + "message": "Uzyskaj poziom ciśnienia akustycznego.", + "description": "Get the sound pressure level." + }, + "microbit.speaker": { + "message": "speaker", + "description": "(module name) Control the built-in speaker (V2 only)." + }, + "microbit.speaker.summary": { + "message": "Sprawdź wbudowany głośnik (tylko V2).", + "description": "Control the built-in speaker (V2 only)." + }, + "microbit.speaker.off": { + "message": "off", + "description": "(function name) Turn the speaker off." + }, + "microbit.speaker.off.summary": { + "message": "Wyłącz głośnik.", + "description": "Turn the speaker off." + }, + "microbit.speaker.on": { + "message": "on", + "description": "(function name) Turn the speaker on." + }, + "microbit.speaker.on.summary": { + "message": "Włącz głośnik.", + "description": "Turn the speaker on." + }, + "microbit.spi": { + "message": "spi", + "description": "(module name) Communicate with devices using the serial peripheral interface (SPI) bus." + }, + "microbit.spi.summary": { + "message": "Komunikuj się z urządzeniami za pomocą magistrali szeregowego interfejsu (SPI).", + "description": "Communicate with devices using the serial peripheral interface (SPI) bus." + }, + "microbit.spi.init": { + "message": "init", + "description": "(function name) Initialize SPI communication." + }, + "microbit.spi.init.summary": { + "message": "Zainicjuj komunikację SPI.", + "description": "Initialize SPI communication." + }, + "microbit.spi.init.param-name.baudrate": { + "message": "baudrate", + "description": "(parameter name) The speed of communication." + }, + "microbit.spi.init.param-doc.baudrate": { + "message": "Szybkość komunikacji.", + "description": "Parameter docs" + }, + "microbit.spi.init.param-name.bits": { + "message": "bits", + "description": "(parameter name) The width in bits of each transfer. Currently only ``bits=8`` is supported. However, this may change in the future." + }, + "microbit.spi.init.param-doc.bits": { + "message": "Szerokość w bitach każdego transferu. Obecnie obsługiwanych jest tylko {{bits=8}}. Może to jednak ulec zmianie w przyszłości.", + "description": "Parameter docs" + }, + "microbit.spi.init.param-name.miso": { + "message": "miso", + "description": "(parameter name) miso pin (default 14)" + }, + "microbit.spi.init.param-doc.miso": { + "message": "pin miso (domyślnie 14)", + "description": "Parameter docs" + }, + "microbit.spi.init.param-name.mode": { + "message": "mode", + "description": "(parameter name) Determines the combination of clock polarity and phase - `see online table `_." + }, + "microbit.spi.init.param-doc.mode": { + "message": "Określa połączenie polarności zegara i fazy - `zobacz tabelę online `_.", + "description": "Parameter docs" + }, + "microbit.spi.init.param-name.mosi": { + "message": "mosi", + "description": "(parameter name) mosi pin (default 15)" + }, + "microbit.spi.init.param-doc.mosi": { + "message": "pin mosi (domyślnie 15)", + "description": "Parameter docs" + }, + "microbit.spi.init.param-name.sclk": { + "message": "sclk", + "description": "(parameter name) sclk pin (default 13)" + }, + "microbit.spi.init.param-doc.sclk": { + "message": "pin sclk (domyślnie 13)", + "description": "Parameter docs" + }, + "microbit.spi.read": { + "message": "read", + "description": "(function name) Read at most ``nbytes`` while continuously writing the single byte given by ``out``." + }, + "microbit.spi.read.summary": { + "message": "Czytaj bajty.", + "description": "Read at most ``nbytes`` while continuously writing the single byte given by ``out``." + }, + "microbit.spi.read.param-name.nbytes": { + "message": "nbytes", + "description": "(parameter name) Maximum number of bytes to read." + }, + "microbit.spi.read.param-doc.nbytes": { + "message": "Maksymalna liczba bajtów do odczytu.", + "description": "Parameter docs" + }, + "microbit.spi.read.param-name.out": { + "message": "out", + "description": "(parameter name) The byte value to write (default 0)." + }, + "microbit.spi.read.param-doc.out": { + "message": "The byte value to write (default 0).", + "description": "Parameter docs" + }, + "microbit.spi.write": { + "message": "write", + "description": "(function name) Write bytes to the bus." + }, + "microbit.spi.write.summary": { + "message": "Zapisz bajty na magistrali.", + "description": "Write bytes to the bus." + }, + "microbit.spi.write.param-name.buffer": { + "message": "buffer", + "description": "(parameter name) A buffer to read data from." + }, + "microbit.spi.write.param-doc.buffer": { + "message": "Bufor do odczytu danych.", + "description": "Parameter docs" + }, + "microbit.spi.write_readinto": { + "message": "write readinto", + "description": "(function name) Write the ``out`` buffer to the bus and read any response into the ``in_`` buffer." + }, + "microbit.spi.write_readinto.summary": { + "message": "Zapisz bufor {{out}} do magistrali i wczytaj dowolną odpowiedź do bufora {{in_}}.", + "description": "Write the ``out`` buffer to the bus and read any response into the ``in_`` buffer." + }, + "microbit.spi.write_readinto.param-name.in_": { + "message": "in", + "description": "(parameter name) The buffer to read data from." + }, + "microbit.spi.write_readinto.param-doc.in_": { + "message": "Bufor do odczytu danych.", + "description": "Parameter docs" + }, + "microbit.spi.write_readinto.param-name.out": { + "message": "out", + "description": "(parameter name) The buffer to write any response to." + }, + "microbit.spi.write_readinto.param-doc.out": { + "message": "Bufor do zapisu dowolnej odpowiedzi.", + "description": "Parameter docs" + }, + "microbit.uart": { + "message": "uart", + "description": "(module name) Communicate with a device using a serial interface." + }, + "microbit.uart.summary": { + "message": "Komunikuj się z urządzeniem za pomocą interfejsu szeregowego.", + "description": "Communicate with a device using a serial interface." + }, + "microbit.uart.ODD": { + "message": "odd", + "description": "(field name) Odd parity" + }, + "microbit.uart.ODD.summary": { + "message": "Nieparzysta parzystość", + "description": "Odd parity" + }, + "microbit.uart.EVEN": { + "message": "even", + "description": "(field name) Even parity" + }, + "microbit.uart.EVEN.summary": { + "message": "Parzysta parzystość", + "description": "Even parity" + }, + "microbit.uart.init": { + "message": "init", + "description": "(function name) Initialize serial communication." + }, + "microbit.uart.init.summary": { + "message": "Zainicjuj komunikację seryjną.", + "description": "Initialize serial communication." + }, + "microbit.uart.init.param-name.baudrate": { + "message": "baudrate", + "description": "(parameter name) The speed of communication." + }, + "microbit.uart.init.param-doc.baudrate": { + "message": "Szybkość komunikacji.", + "description": "Parameter docs" + }, + "microbit.uart.init.param-name.bits": { + "message": "bits", + "description": "(parameter name) The size of bytes being transmitted. micro:bit only supports 8." + }, + "microbit.uart.init.param-doc.bits": { + "message": "Rozmiar przesyłanych bajtów. micro:bit obsługuje tylko 8.", + "description": "Parameter docs" + }, + "microbit.uart.init.param-name.parity": { + "message": "parity", + "description": "(parameter name) How parity is checked, ``None``, ``uart.ODD`` or ``uart.EVEN``." + }, + "microbit.uart.init.param-doc.parity": { + "message": "Jak sprawdzana jest parzystość, {{None}}, {{uart.ODD}} lub {{uart.EVEN}}.", + "description": "Parameter docs" + }, + "microbit.uart.init.param-name.rx": { + "message": "rx", + "description": "(parameter name) Receiving pin." + }, + "microbit.uart.init.param-doc.rx": { + "message": "Odbieranie pinu.", + "description": "Parameter docs" + }, + "microbit.uart.init.param-name.stop": { + "message": "stop", + "description": "(parameter name) The number of stop bits, has to be 1 for micro:bit." + }, + "microbit.uart.init.param-doc.stop": { + "message": "Liczba bitów stopu musi wynosić 1 dla micro:bita.", + "description": "Parameter docs" + }, + "microbit.uart.init.param-name.tx": { + "message": "tx", + "description": "(parameter name) Transmitting pin." + }, + "microbit.uart.init.param-doc.tx": { + "message": "Transmitując pin.", + "description": "Parameter docs" + }, + "microbit.uart.any": { + "message": "any", + "description": "(function name) Check if any data is waiting." + }, + "microbit.uart.any.summary": { + "message": "Sprawdź, czy czekają jakieś dane.", + "description": "Check if any data is waiting." + }, + "microbit.uart.read": { + "message": "read", + "description": "(function name) Read bytes." + }, + "microbit.uart.read.summary": { + "message": "Czytaj bajty.", + "description": "Read bytes." + }, + "microbit.uart.read.param-name.nbytes": { + "message": "nbytes", + "description": "(parameter name) If ``nbytes`` is specified then read at most that many bytes, otherwise read as many bytes as possible" + }, + "microbit.uart.read.param-doc.nbytes": { + "message": "Jeśli {{nbytes}} jest określony, przeczytaj co najwyżej tę liczbę bajtów, w przeciwnym razie przeczytaj jak najwięcej bajtów", + "description": "Parameter docs" + }, + "microbit.uart.readinto": { + "message": "readinto", + "description": "(function name) Read bytes into the ``buf``." + }, + "microbit.uart.readinto.summary": { + "message": "Przeczytaj bajty do {{buf}}.", + "description": "Read bytes into the ``buf``." + }, + "microbit.uart.readinto.param-name.buf": { + "message": "buf", + "description": "(parameter name) The buffer to write to." + }, + "microbit.uart.readinto.param-doc.buf": { + "message": "Bufor do zapisu.", + "description": "Parameter docs" + }, + "microbit.uart.readinto.param-name.nbytes": { + "message": "nbytes", + "description": "(parameter name) If ``nbytes`` is specified then read at most that many bytes, otherwise read ``len(buf)`` bytes." + }, + "microbit.uart.readinto.param-doc.nbytes": { + "message": "Jeśli {{nbytes}} jest określony, przeczytaj co najwyżej tę liczbę bajtów, w przeciwnym razie przeczytaj {{len(buf)}} bajtów.", + "description": "Parameter docs" + }, + "microbit.uart.readline": { + "message": "readline", + "description": "(function name) Read a line, ending in a newline character." + }, + "microbit.uart.readline.summary": { + "message": "Przeczytaj wiersz kończący się znakiem nowej linii.", + "description": "Read a line, ending in a newline character." + }, + "microbit.uart.write": { + "message": "write", + "description": "(function name) Write a buffer to the bus." + }, + "microbit.uart.write.summary": { + "message": "Zapisz bufor na magistrali.", + "description": "Write a buffer to the bus." + }, + "microbit.uart.write.param-name.buf": { + "message": "buf", + "description": "(parameter name) A bytes object or a string." + }, + "microbit.uart.write.param-doc.buf": { + "message": "Obiekt bajtów lub łańcuch.", + "description": "Parameter docs" + }, + "micropython": { + "message": "microPython", + "description": "(module name) MicroPython internals." + }, + "micropython.summary": { + "message": "Wewnątrz MicroPythona.", + "description": "MicroPython internals." + }, + "micropython.const": { + "message": "const", + "description": "(function name) Used to declare that the expression is a constant so that the compiler can\noptimise it." + }, + "micropython.const.summary": { + "message": "Służy do zadeklarowania, że wyrażenie jest stałą tak, że kompilator może\nje zoptymalizować.", + "description": "Used to declare that the expression is a constant so that the compiler can\noptimise it." + }, + "micropython.const.param-name.expr": { + "message": "expr", + "description": "(parameter name) A constant expression." + }, + "micropython.const.param-doc.expr": { + "message": "Wyrażenie stałe.", + "description": "Parameter docs" + }, + "micropython.opt_level-1": { + "message": "opt level", + "description": "(function name) Get the current optimisation level for the compilation of scripts." + }, + "micropython.opt_level-1.summary": { + "message": "Uzyskaj obecny poziom optymalizacji dla kompilacji skryptów.", + "description": "Get the current optimisation level for the compilation of scripts." + }, + "micropython.opt_level-2": { + "message": "opt level", + "description": "(function name) Sets the optimisation level for subsequent compilation of scripts." + }, + "micropython.opt_level-2.summary": { + "message": "Ustawia poziom optymalizacji dla późniejszej kompilacji skryptów.", + "description": "Sets the optimisation level for subsequent compilation of scripts." + }, + "micropython.opt_level-2.param-name.level": { + "message": "level", + "description": "(parameter name) An integer optimisation level." + }, + "micropython.opt_level-2.param-doc.level": { + "message": "Poziom optymalizacji całkowity.", + "description": "Parameter docs" + }, + "micropython.mem_info": { + "message": "mem info", + "description": "(function name) Print information about currently used memory." + }, + "micropython.mem_info.summary": { + "message": "Drukuj informacje o aktualnie używanej pamięci.", + "description": "Print information about currently used memory." + }, + "micropython.mem_info.param-name.verbose": { + "message": "verbose", + "description": "(parameter name) If the ``verbose`` argument is given then extra information is printed." + }, + "micropython.mem_info.param-doc.verbose": { + "message": "Jeśli dany jest argument {{verbose}}, drukowane są dodatkowe informacje.", + "description": "Parameter docs" + }, + "micropython.qstr_info": { + "message": "qstr info", + "description": "(function name) Print information about currently interned strings." + }, + "micropython.qstr_info.summary": { + "message": "Drukuj informacje o aktualnie internowanych łańcuchach.", + "description": "Print information about currently interned strings." + }, + "micropython.qstr_info.param-name.verbose": { + "message": "verbose", + "description": "(parameter name) If the ``verbose`` argument is given then extra information is printed." + }, + "micropython.qstr_info.param-doc.verbose": { + "message": "Jeśli dany jest argument {{verbose}}, drukowane są dodatkowe informacje.", + "description": "Parameter docs" + }, + "micropython.stack_use": { + "message": "stack use", + "description": "(function name) Return an integer representing the current amount of stack that is being\nused." + }, + "micropython.stack_use.summary": { + "message": "Zwróć liczbę całkowitą reprezentującą aktualną wielkość używanego stosu", + "description": "Return an integer representing the current amount of stack that is being\nused." + }, + "micropython.heap_lock": { + "message": "heap lock", + "description": "(function name) Lock the heap." + }, + "micropython.heap_lock.summary": { + "message": "Zablokuj stos.", + "description": "Lock the heap." + }, + "micropython.heap_unlock": { + "message": "heap unlock", + "description": "(function name) Unlock the heap." + }, + "micropython.heap_unlock.summary": { + "message": "Odblokuj stos.", + "description": "Unlock the heap." + }, + "micropython.kbd_intr": { + "message": "kbd intr", + "description": "(function name) Set the character that will raise a ``KeyboardInterrupt`` exception." + }, + "micropython.kbd_intr.summary": { + "message": "Ustaw znak, który zgłosi wyjątek {{KeyboardInterrupt}}.", + "description": "Set the character that will raise a ``KeyboardInterrupt`` exception." + }, + "micropython.kbd_intr.param-name.chr": { + "message": "chr", + "description": "(parameter name) Character code to raise the interrupt or -1 to disable capture of Ctrl-C." + }, + "micropython.kbd_intr.param-doc.chr": { + "message": "Kod znaku, aby zwiększyć przerwę lub -1, aby wyłączyć przechwytywanie Ctrl-C.", + "description": "Parameter docs" + }, + "music": { + "message": "music", + "description": "(module name) Create and play melodies." + }, + "music.summary": { + "message": "Twórz i graj w melodie.", + "description": "Create and play melodies." + }, + "music.DADADADUM": { + "message": "dadadadum", + "description": "(field name) Melody: the opening to Beethoven’s 5th Symphony in C minor." + }, + "music.DADADADUM.summary": { + "message": "Melodia: otwarcie 5. symfonii Beethovena w C minor", + "description": "Melody: the opening to Beethoven’s 5th Symphony in C minor." + }, + "music.ENTERTAINER": { + "message": "entertainer", + "description": "(field name) Melody: the opening fragment of Scott Joplin’s Ragtime classic “The Entertainer”." + }, + "music.ENTERTAINER.summary": { + "message": "Melodia: fragment otwierający klasyczny Scott Joplin Ragtime \"The Entertainer\".", + "description": "Melody: the opening fragment of Scott Joplin’s Ragtime classic “The Entertainer”." + }, + "music.PRELUDE": { + "message": "prelude", + "description": "(field name) Melody: the opening of the first Prelude in C Major of J.S.Bach’s 48 Preludes and Fugues." + }, + "music.PRELUDE.summary": { + "message": "Melodia: otwarcie pierwszego Preludium w C Major, 48 preludiów i Fug J.S.Bacha.", + "description": "Melody: the opening of the first Prelude in C Major of J.S.Bach’s 48 Preludes and Fugues." + }, + "music.ODE": { + "message": "ode", + "description": "(field name) Melody: the “Ode to Joy” theme from Beethoven’s 9th Symphony in D minor." + }, + "music.ODE.summary": { + "message": "Melodia: motyw Ody do radości z 9. Symfonii Beethovena w D minor.", + "description": "Melody: the “Ode to Joy” theme from Beethoven’s 9th Symphony in D minor." + }, + "music.NYAN": { + "message": "nyan", + "description": "(field name) Melody: the Nyan Cat theme (http://www.nyan.cat/)." + }, + "music.NYAN.summary": { + "message": "Melodia: motyw Nyan Kot (http://www.nyan.cat/).", + "description": "Melody: the Nyan Cat theme (http://www.nyan.cat/)." + }, + "music.RINGTONE": { + "message": "ringtone", + "description": "(field name) Melody: something that sounds like a mobile phone ringtone." + }, + "music.RINGTONE.summary": { + "message": "Melodia: coś, co brzmi jak dzwonek telefonu komórkowego.", + "description": "Melody: something that sounds like a mobile phone ringtone." + }, + "music.FUNK": { + "message": "funk", + "description": "(field name) Melody: a funky bass line for secret agents and criminal masterminds." + }, + "music.FUNK.summary": { + "message": "Melody: funkowa linia basu dla tajnych agentów i geniuszy kryminalnych.", + "description": "Melody: a funky bass line for secret agents and criminal masterminds." + }, + "music.BLUES": { + "message": "blues", + "description": "(field name) Melody: a boogie-woogie 12-bar blues walking bass." + }, + "music.BLUES.summary": { + "message": "Melodia: 12-taktowy bluesowy chodzący bas w stylu boogie-woogie.", + "description": "Melody: a boogie-woogie 12-bar blues walking bass." + }, + "music.BIRTHDAY": { + "message": "birthday", + "description": "(field name) Melody: “Happy Birthday to You…”" + }, + "music.BIRTHDAY.summary": { + "message": "Melodia: \"Wszystkiego najlepszego…\"", + "description": "Melody: “Happy Birthday to You…”" + }, + "music.WEDDING": { + "message": "ślub", + "description": "(field name) Melody: the bridal chorus from Wagner’s opera “Lohengrin”." + }, + "music.WEDDING.summary": { + "message": "Melodia: chór panny młodej z opery Wagnera „Lohengrin”.", + "description": "Melody: the bridal chorus from Wagner’s opera “Lohengrin”." + }, + "music.FUNERAL": { + "message": "pogrzeb", + "description": "(field name) Melody: the “funeral march” otherwise known as Frédéric Chopin’s Piano Sonata No. 2 in B♭ minor, Op. 35." + }, + "music.FUNERAL.summary": { + "message": "Melodia: »Marsz pogrzebowy« znany jako Sonata Fortepianowa No. 2 w B♭ minor, Op. 35 Fryderyka Chopina. ", + "description": "Melody: the “funeral march” otherwise known as Frédéric Chopin’s Piano Sonata No. 2 in B♭ minor, Op. 35." + }, + "music.PUNCHLINE": { + "message": "punchline", + "description": "(field name) Melody: a fun fragment that signifies a joke has been made." + }, + "music.PUNCHLINE.summary": { + "message": "Melodia: zabawny fragment oznaczający, że zażartowano.", + "description": "Melody: a fun fragment that signifies a joke has been made." + }, + "music.PYTHON": { + "message": "python", + "description": "(field name) Melody: John Philip Sousa’s march “Liberty Bell” aka, the theme for “Monty Python’s Flying Circus” (after which the Python programming language is named)." + }, + "music.PYTHON.summary": { + "message": "Melodia: Marsz John Philip Sousa „Liberty Bell” aka, motyw „Monty Python Flating Circus” (po którym nazwano język programowania Pythona).", + "description": "Melody: John Philip Sousa’s march “Liberty Bell” aka, the theme for “Monty Python’s Flying Circus” (after which the Python programming language is named)." + }, + "music.BADDY": { + "message": "baddy", + "description": "(field name) Melody: silent movie era entrance of a baddy." + }, + "music.BADDY.summary": { + "message": "Melodia: wejście złego człowieka do ery kina niemego.", + "description": "Melody: silent movie era entrance of a baddy." + }, + "music.CHASE": { + "message": "chase", + "description": "(field name) Melody: silent movie era chase scene." + }, + "music.CHASE.summary": { + "message": "Melodia: scena pościgu z epoki kina niemego.", + "description": "Melody: silent movie era chase scene." + }, + "music.BA_DING": { + "message": "ba ding", + "description": "(field name) Melody: a short signal to indicate something has happened." + }, + "music.BA_DING.summary": { + "message": "Melodia: krótki sygnał informujący, że coś się wydarzyło.", + "description": "Melody: a short signal to indicate something has happened." + }, + "music.WAWAWAWAA": { + "message": "wawawawaa", + "description": "(field name) Melody: a very sad trombone." + }, + "music.WAWAWAWAA.summary": { + "message": "Melodia: bardzo smutny puzon.", + "description": "Melody: a very sad trombone." + }, + "music.JUMP_UP": { + "message": "jump up", + "description": "(field name) Melody: for use in a game, indicating upward movement." + }, + "music.JUMP_UP.summary": { + "message": "Melodia: do użytku w grze, wskazujący ruch w górę.", + "description": "Melody: for use in a game, indicating upward movement." + }, + "music.JUMP_DOWN": { + "message": "jump down", + "description": "(field name) Melody: for use in a game, indicating downward movement." + }, + "music.JUMP_DOWN.summary": { + "message": "Melodia: do użytku w grze, wskazujący ruch w górę.", + "description": "Melody: for use in a game, indicating downward movement." + }, + "music.POWER_UP": { + "message": "power up", + "description": "(field name) Melody: a fanfare to indicate an achievement unlocked." + }, + "music.POWER_UP.summary": { + "message": "Melodia: fanfara oznaczająca odblokowanie osiągnięcia.", + "description": "Melody: a fanfare to indicate an achievement unlocked." + }, + "music.POWER_DOWN": { + "message": "power down", + "description": "(field name) Melody: a sad fanfare to indicate an achievement lost." + }, + "music.POWER_DOWN.summary": { + "message": "Melodia: smutna fanfara oznaczająca utracenie osiągnięcia.", + "description": "Melody: a sad fanfare to indicate an achievement lost." + }, + "music.set_tempo": { + "message": "set tempo", + "description": "(function name) Sets the approximate tempo for playback." + }, + "music.set_tempo.summary": { + "message": "Ustawia przybliżone tempo dla odtwarzania.", + "description": "Sets the approximate tempo for playback." + }, + "music.set_tempo.param-name.bpm": { + "message": "bpm", + "description": "(parameter name) An integer determining how many beats per minute." + }, + "music.set_tempo.param-doc.bpm": { + "message": "Liczba całkowita określająca liczbę uderzeń na minutę.", + "description": "Parameter docs" + }, + "music.set_tempo.param-name.ticks": { + "message": "ticks", + "description": "(parameter name) The number of ticks constituting a beat." + }, + "music.set_tempo.param-doc.ticks": { + "message": "Liczba taktów składających się na uderzenie.", + "description": "Parameter docs" + }, + "music.get_tempo": { + "message": "get tempo", + "description": "(function name) Gets the current tempo as a tuple of integers: ``(ticks, bpm)``." + }, + "music.get_tempo.summary": { + "message": "Pobiera bieżące tempo jako parę liczb całkowitych: {{(ticks, bpm)}}.", + "description": "Gets the current tempo as a tuple of integers: ``(ticks, bpm)``." + }, + "music.play": { + "message": "play", + "description": "(function name) Plays music." + }, + "music.play.summary": { + "message": "Odtwarzaj muzykę.", + "description": "Plays music." + }, + "music.play.param-name.loop": { + "message": "loop", + "description": "(parameter name) If ``loop`` is set to ``True``, the tune repeats until ``stop`` is called or the blocking call is interrupted." + }, + "music.play.param-doc.loop": { + "message": "Jeśli {{loop}} jest ustawiony na {{True}}, melodia powtarza się, aż {{stop}} jest wywołana lub połączenie blokujące zostanie przerwane.", + "description": "Parameter docs" + }, + "music.play.param-name.music": { + "message": "music", + "description": "(parameter name) music specified in `a special notation `_" + }, + "music.play.param-doc.music": { + "message": "muzyka określona w `specjalnej notacji `_", + "description": "Parameter docs" + }, + "music.play.param-name.pin": { + "message": "pin", + "description": "(parameter name) the output pin for use with an external speaker (default ``pin0``), ``None`` for no sound." + }, + "music.play.param-doc.pin": { + "message": "pin wyjściowy do użycia z zewnętrznym głośnikiem (domyślnie {{pin0}}), {{None}} dla braku dźwięku.", + "description": "Parameter docs" + }, + "music.play.param-name.wait": { + "message": "wait", + "description": "(parameter name) If ``wait`` is set to ``True``, this function is blocking." + }, + "music.play.param-doc.wait": { + "message": "Jeśli {{wait}} jest ustawiony na {{True}}, ta funkcja jest blokowana.", + "description": "Parameter docs" + }, + "music.pitch": { + "message": "pitch", + "description": "(function name) Play a note." + }, + "music.pitch.summary": { + "message": "Zagraj nutę.", + "description": "Play a note." + }, + "music.pitch.param-name.duration": { + "message": "duration", + "description": "(parameter name) A millisecond duration. If negative then sound is continuous until the next call or a call to ``stop``." + }, + "music.pitch.param-doc.duration": { + "message": "Czas trwania w milisekundach. Jeśli ujemny, to dźwięk jest ciągły aż do następnego połączenia lub połączenia z {{stop}}.", + "description": "Parameter docs" + }, + "music.pitch.param-name.frequency": { + "message": "frequency", + "description": "(parameter name) An integer frequency" + }, + "music.pitch.param-doc.frequency": { + "message": "Częstotliwość całkowitoliczbowa", + "description": "Parameter docs" + }, + "music.pitch.param-name.pin": { + "message": "pin", + "description": "(parameter name) Optional output pin (default ``pin0``)." + }, + "music.pitch.param-doc.pin": { + "message": "Opcjonalny pin wyjściowy (domyślny {{pin0}}).", + "description": "Parameter docs" + }, + "music.pitch.param-name.wait": { + "message": "wait", + "description": "(parameter name) If ``wait`` is set to ``True``, this function is blocking." + }, + "music.pitch.param-doc.wait": { + "message": "Jeśli {{wait}} jest ustawiony na {{True}}, ta funkcja jest blokowana.", + "description": "Parameter docs" + }, + "music.stop": { + "message": "stop", + "description": "(function name) Stops all music playback on the built-in speaker and any pin outputting sound." + }, + "music.stop.summary": { + "message": "Zatrzymuje odtwarzanie muzyki na wbudowanym głośniku i jakimkolwiek pinie wyjściowym dźwięku.", + "description": "Stops all music playback on the built-in speaker and any pin outputting sound." + }, + "music.stop.param-name.pin": { + "message": "pin", + "description": "(parameter name) An optional argument can be provided to specify a pin, e.g. ``music.stop(pin1)``." + }, + "music.stop.param-doc.pin": { + "message": "Opcjonalny argument może być podany do określenia pinu, np. {{music.stop(pin1)}}.", + "description": "Parameter docs" + }, + "music.reset": { + "message": "reset", + "description": "(function name) Resets ticks, bpm, duration and octave to their default values." + }, + "music.reset.summary": { + "message": "Resetuje takty, bpm, czas trwania i oktawę do ich wartości domyślnych.", + "description": "Resets ticks, bpm, duration and octave to their default values." + }, + "neopixel": { + "message": "neopixel", + "description": "(module name) Individually addressable RGB and RGBW LED strips." + }, + "neopixel.summary": { + "message": "Indywidualnie adresowalne paski LED RGB i RGBW.", + "description": "Individually addressable RGB and RGBW LED strips." + }, + "neopixel.NeoPixel.__init__": { + "message": "init", + "description": "(function name) Initialise a new strip of neopixel LEDs controlled via a pin." + }, + "neopixel.NeoPixel.__init__.summary": { + "message": "Zainicjuj nowy pasek neopikselowych diod LED sterowanych za pomocą pinu.", + "description": "Initialise a new strip of neopixel LEDs controlled via a pin." + }, + "neopixel.NeoPixel.__init__.param-name.bpp": { + "message": "bpp", + "description": "(parameter name) Bytes per pixel. For RGBW neopixel support, pass 4 rather than the default of 3 for RGB and GRB." + }, + "neopixel.NeoPixel.__init__.param-doc.bpp": { + "message": "Bajty na piksel. W przypadku obsługi neopikseli RGBW należy przekazać 4 zamiast domyślnych 3 dla RGB i GRB.", + "description": "Parameter docs" + }, + "neopixel.NeoPixel.__init__.param-name.n": { + "message": "n", + "description": "(parameter name) The number of neopixels in the strip." + }, + "neopixel.NeoPixel.__init__.param-doc.n": { + "message": "Liczba neopikseli w pasku.", + "description": "Parameter docs" + }, + "neopixel.NeoPixel.__init__.param-name.pin": { + "message": "pin", + "description": "(parameter name) The pin controlling the neopixel strip." + }, + "neopixel.NeoPixel.__init__.param-doc.pin": { + "message": "Pin kontrolujący pasek neopikseli.", + "description": "Parameter docs" + }, + "neopixel.NeoPixel.clear": { + "message": "clear", + "description": "(function name) Clear all the pixels." + }, + "neopixel.NeoPixel.clear.summary": { + "message": "Wyczyść wszystkie piksele.", + "description": "Clear all the pixels." + }, + "neopixel.NeoPixel.show": { + "message": "show", + "description": "(function name) Show the pixels." + }, + "neopixel.NeoPixel.show.summary": { + "message": "Pokaż piksele.", + "description": "Show the pixels." + }, + "neopixel.NeoPixel.write": { + "message": "write", + "description": "(function name) Show the pixels (micro:bit V2 only)." + }, + "neopixel.NeoPixel.write.summary": { + "message": "Pokaż piksele (tylko micro:bit V2).", + "description": "Show the pixels (micro:bit V2 only)." + }, + "neopixel.NeoPixel.fill": { + "message": "fill", + "description": "(function name) Colour all pixels a given RGB/RGBW value (micro:bit V2 only)." + }, + "neopixel.NeoPixel.fill.summary": { + "message": "Pokoloruj wszystkie piksele określoną wartością RGB/RGBW (tylko micro:bit V2).", + "description": "Colour all pixels a given RGB/RGBW value (micro:bit V2 only)." + }, + "neopixel.NeoPixel.fill.param-name.colour": { + "message": "colour", + "description": "(parameter name) A tuple of the same length as the number of bytes per pixel (bpp)." + }, + "neopixel.NeoPixel.fill.param-doc.colour": { + "message": "Krotka o takiej samej długości jak liczba bajtów na piksel (bpp).", + "description": "Parameter docs" + }, + "neopixel.NeoPixel.__setitem__": { + "message": "setitem", + "description": "(function name) Set a pixel colour." + }, + "neopixel.NeoPixel.__setitem__.summary": { + "message": "Ustaw kolor pikseli.", + "description": "Set a pixel colour." + }, + "neopixel.NeoPixel.__setitem__.param-name.key": { + "message": "key", + "description": "(parameter name) The pixel number." + }, + "neopixel.NeoPixel.__setitem__.param-doc.key": { + "message": "Liczba pikseli.", + "description": "Parameter docs" + }, + "neopixel.NeoPixel.__setitem__.param-name.value": { + "message": "value", + "description": "(parameter name) The colour." + }, + "neopixel.NeoPixel.__setitem__.param-doc.value": { + "message": "Kolor", + "description": "Parameter docs" + }, + "neopixel.NeoPixel.__getitem__": { + "message": "getitem", + "description": "(function name) Get a pixel colour." + }, + "neopixel.NeoPixel.__getitem__.summary": { + "message": "Uzyskaj kolor piksela.", + "description": "Get a pixel colour." + }, + "neopixel.NeoPixel.__getitem__.param-name.key": { + "message": "key", + "description": "(parameter name) The pixel number." + }, + "neopixel.NeoPixel.__getitem__.param-doc.key": { + "message": "Liczba pikseli.", + "description": "Parameter docs" + }, + "neopixel.NeoPixel.__len__": { + "message": "len", + "description": "(function name) Get length of this pixel strip." + }, + "neopixel.NeoPixel.__len__.summary": { + "message": "Uzyskaj długość tego paska pikseli.", + "description": "Get length of this pixel strip." + }, + "os": { + "message": "os", + "description": "(module name) Access the file system." + }, + "os.summary": { + "message": "Uzyskaj dostęp do systemu plików.", + "description": "Access the file system." + }, + "os.listdir": { + "message": "listdir", + "description": "(function name) List files." + }, + "os.listdir.summary": { + "message": "Lista plików.", + "description": "List files." + }, + "os.remove": { + "message": "remove", + "description": "(function name) Remove (delete) a file." + }, + "os.remove.summary": { + "message": "Usuń (usuń) plik.", + "description": "Remove (delete) a file." + }, + "os.remove.param-name.filename": { + "message": "filename", + "description": "(parameter name) The file to delete." + }, + "os.remove.param-doc.filename": { + "message": "Plik do usunięcia.", + "description": "Parameter docs" + }, + "os.size": { + "message": "size", + "description": "(function name) Returns the size of a file." + }, + "os.size.summary": { + "message": "Zwraca rozmiar pliku.", + "description": "Returns the size of a file." + }, + "os.size.param-name.filename": { + "message": "filename", + "description": "(parameter name) The file" + }, + "os.size.param-doc.filename": { + "message": "Plik", + "description": "Parameter docs" + }, + "os.uname_result": { + "message": "uname result", + "description": "(class name) Result of ``os.uname()``" + }, + "os.uname_result.summary": { + "message": "Wynik {{os.uname()}}", + "description": "Result of ``os.uname()``" + }, + "os.uname_result.sysname": { + "message": "sysname", + "description": "(field name) Operating system name." + }, + "os.uname_result.sysname.summary": { + "message": "Nazwa systemu operacyjnego.", + "description": "Operating system name." + }, + "os.uname_result.nodename": { + "message": "nodename", + "description": "(field name) Name of machine on network (implementation-defined)." + }, + "os.uname_result.nodename.summary": { + "message": "Nazwa maszyny w sieci (zdefiniowana w implementacji).", + "description": "Name of machine on network (implementation-defined)." + }, + "os.uname_result.release": { + "message": "release", + "description": "(field name) Operating system release." + }, + "os.uname_result.release.summary": { + "message": "Wydanie systemu operacyjnego.", + "description": "Operating system release." + }, + "os.uname_result.version": { + "message": "version", + "description": "(field name) Operating system version." + }, + "os.uname_result.version.summary": { + "message": "Wersja systemu operacyjnego", + "description": "Operating system version." + }, + "os.uname_result.machine": { + "message": "machine", + "description": "(field name) Hardware identifier." + }, + "os.uname_result.machine.summary": { + "message": "Identyfikator sprzętu.", + "description": "Hardware identifier." + }, + "os.uname": { + "message": "uname", + "description": "(function name) Returns information identifying the current operating system." + }, + "os.uname.summary": { + "message": "Zwraca informacje identyfikujące bieżący system operacyjny.", + "description": "Returns information identifying the current operating system." + }, + "radio": { + "message": "radio", + "description": "(module name) Communicate between micro:bits with the built-in radio." + }, + "radio.summary": { + "message": "Komunikuj się pomiędzy micro:bitami za pomocą wbudowanego radia.", + "description": "Communicate between micro:bits with the built-in radio." + }, + "radio.RATE_1MBIT": { + "message": "rate 1mbit", + "description": "(field name) Constant used to indicate a throughput of 1 MBit a second." + }, + "radio.RATE_1MBIT.summary": { + "message": "Stała używana do wskazania przepustowości 1 MBit na sekundę.", + "description": "Constant used to indicate a throughput of 1 MBit a second." + }, + "radio.RATE_2MBIT": { + "message": "rate 2mbit", + "description": "(field name) Constant used to indicate a throughput of 2 MBit a second." + }, + "radio.RATE_2MBIT.summary": { + "message": "Stała używana do wskazania przepustowości 2 MBit na sekundę.", + "description": "Constant used to indicate a throughput of 2 MBit a second." + }, + "radio.on": { + "message": "on", + "description": "(function name) Turns the radio on." + }, + "radio.on.summary": { + "message": "Włącza radio", + "description": "Turns the radio on." + }, + "radio.off": { + "message": "off", + "description": "(function name) Turns off the radio, saving power and memory." + }, + "radio.off.summary": { + "message": "Wyłącza radio, oszczędzając energię i pamięć.", + "description": "Turns off the radio, saving power and memory." + }, + "radio.config": { + "message": "config", + "description": "(function name) Configures the radio." + }, + "radio.config.summary": { + "message": "Konfiguruje radio.", + "description": "Configures the radio." + }, + "radio.config.param-name.address": { + "message": "address", + "description": "(parameter name) (default=0x75626974) an arbitrary name, expressed as a 32-bit address, that's used to filter incoming packets at the hardware level, keeping only those that match the address you set.\nThe default used by other micro:bit related platforms is the default setting used here." + }, + "radio.config.param-doc.address": { + "message": "(default=0x75626974) dowolna nazwa wyrażona jako 32-bitowy adres, używana do filtrowania przychodzących pakietów na poziomie sprzętowym, zatrzymując tylko te, które odpowiadają ustawionemu adresowi.\nDomyślnym ustawieniem używanym przez inne platformy powiązane z micro:bitem jest ustawienie domyślne używane tutaj.", + "description": "Parameter docs" + }, + "radio.config.param-name.channel": { + "message": "channel", + "description": "(parameter name) (default=7) an integer value from 0 to 83 (inclusive) that defines an arbitrary \"channel\" to which the radio is tuned.\nMessages will be sent via this channel and only messages received via this channel will be put onto the incoming message queue. Each step is 1MHz wide, based at 2400MHz." + }, + "radio.config.param-doc.channel": { + "message": "(default=7) wartość całkowita od 0 do 83 (włącznie), która definiuje dowolny „kanał”, do którego dostrojone jest radio.\nWiadomości będą wysyłane za pośrednictwem tego kanału i tylko wiadomości otrzymane za pośrednictwem tego kanału zostaną umieszczone w kolejce wiadomości przychodzących. Każdy stopień ma szerokość 1 MHz w oparciu o częstotliwość 2400 MHz.", + "description": "Parameter docs" + }, + "radio.config.param-name.data_rate": { + "message": "data rate", + "description": "(parameter name) (default=``radio.RATE_1MBIT``) indicates the speed at which data throughput takes place.\nCan be one of the following constants defined in the ``radio`` module: ``RATE_250KBIT``, ``RATE_1MBIT`` or ``RATE_2MBIT``." + }, + "radio.config.param-doc.data_rate": { + "message": "(default={{radio.RATE_1MBIT}}) wskazuje prędkość, z jaką odbywa się przesyłanie danych.\nMoże być jedną z następujących stałych zdefiniowanych w module {{radio}}:{{RATE_250KBIT}}, {{RATE_1MBIT}} lub {{RATE_2MBIT}}.", + "description": "Parameter docs" + }, + "radio.config.param-name.group": { + "message": "group", + "description": "(parameter name) (default=0) an 8-bit value (0-255) used with the ``address`` when filtering messages.\nConceptually, \"address\" is like a house/office address and \"group\" is like the person at that address to which you want to send your message." + }, + "radio.config.param-doc.group": { + "message": "(default=0) 8-bitowa wartość (0-255) używana wraz z {{address}} podczas filtrowania wiadomości.\nKoncepcyjnie, \"adres\" jest jak adres domu/biura, a \"grupa\" jest jak osoba pod tym adresem, na który chcesz wysłać swoją wiadomość.", + "description": "Parameter docs" + }, + "radio.config.param-name.length": { + "message": "length", + "description": "(parameter name) (default=32) defines the maximum length, in bytes, of a message sent via the radio.\nIt can be up to 251 bytes long (254 - 3 bytes for S0, LENGTH and S1 preamble)." + }, + "radio.config.param-doc.length": { + "message": "(default=32) definiuje maksymalną długość w bajtach wiadomości wysyłanej przez radio.\nMoże mieć długość do 251 bajtów (254 - 3 bajty dla S0, LENGTH i S1).", + "description": "Parameter docs" + }, + "radio.config.param-name.power": { + "message": "power", + "description": "(parameter name) (default=6) is an integer value from 0 to 7 (inclusive) to indicate the strength of signal used when broadcasting a message.\nThe higher the value the stronger the signal, but the more power is consumed by the device. The numbering translates to positions in the following list of dBm (decibel milliwatt) values: -30, -20, -16, -12, -8, -4, 0, 4." + }, + "radio.config.param-doc.power": { + "message": "(default=6) jest liczb całkowitą od 0 do 7 (włącznie) do oznaczenia siły sygnału używanego podczas nadawania wiadomości.\nIm wyższa wartość, tym silniejszy jest sygnał, ale tym większa moc jest zużywana przez urządzenie. Numeracja przekłada się na pozycje w następującym wykazie wartości dBm (decybel miliwat): -30, -20, -16, -12, -8, -4, 0, 4.", + "description": "Parameter docs" + }, + "radio.config.param-name.queue": { + "message": "queue", + "description": "(parameter name) (default=3) specifies the number of messages that can be stored on the incoming message queue.\nIf there are no spaces left on the queue for incoming messages, then the incoming message is dropped." + }, + "radio.config.param-doc.queue": { + "message": "(default=3) określa liczbę wiadomości, które mogą być przechowywane w kolejce przychodzących wiadomości.\nJeśli w kolejce na wiadomości przychodzące nie ma już wolnych miejsc, wiadomość przychodząca jest odrzucana.", + "description": "Parameter docs" + }, + "radio.reset": { + "message": "reset", + "description": "(function name) Reset the settings to their default values." + }, + "radio.reset.summary": { + "message": "Resetuj ustawienia do ich wartości domyślnych.", + "description": "Reset the settings to their default values." + }, + "radio.send_bytes": { + "message": "send bytes", + "description": "(function name) Sends a message containing bytes." + }, + "radio.send_bytes.summary": { + "message": "Wysyła wiadomość zawierającą bajty.", + "description": "Sends a message containing bytes." + }, + "radio.send_bytes.param-name.message": { + "message": "message", + "description": "(parameter name) The bytes to send." + }, + "radio.send_bytes.param-doc.message": { + "message": "Bajty do wysłania.", + "description": "Parameter docs" + }, + "radio.receive_bytes": { + "message": "receive bytes", + "description": "(function name) Receive the next incoming message on the message queue." + }, + "radio.receive_bytes.summary": { + "message": "Otrzymuj następną przychodzącą wiadomość w kolejce wiadomości.", + "description": "Receive the next incoming message on the message queue." + }, + "radio.receive_bytes_into": { + "message": "receive bytes into", + "description": "(function name) Copy the next incoming message on the message queue into a buffer." + }, + "radio.receive_bytes_into.summary": { + "message": "Skopiuj następną wiadomość przychodzącą do kolejki wiadomości w buforze.", + "description": "Copy the next incoming message on the message queue into a buffer." + }, + "radio.receive_bytes_into.param-name.buffer": { + "message": "buffer", + "description": "(parameter name) The target buffer. The message is truncated if larger than the buffer." + }, + "radio.receive_bytes_into.param-doc.buffer": { + "message": "Bufor docelowy. Wiadomość jest obcinana, jeśli jest większa niż bufor.", + "description": "Parameter docs" + }, + "radio.send": { + "message": "send", + "description": "(function name) Sends a message string." + }, + "radio.send.summary": { + "message": "Wysyła łańcuch wiadomości.", + "description": "Sends a message string." + }, + "radio.send.param-name.message": { + "message": "message", + "description": "(parameter name) The string to send." + }, + "radio.send.param-doc.message": { + "message": "Łańcuch do wysłania.", + "description": "Parameter docs" + }, + "radio.receive": { + "message": "odbierz", + "description": "(function name) Works in exactly the same way as ``receive_bytes`` but returns whatever was sent." + }, + "radio.receive.summary": { + "message": "Działa dokładnie w taki sam sposób, jak {{receive_bytes}}, ale zwraca cokolwiek zostało wysłane.", + "description": "Works in exactly the same way as ``receive_bytes`` but returns whatever was sent." + }, + "radio.receive_full": { + "message": "receive full", + "description": "(function name) Returns a tuple containing three values representing the next incoming message on the message queue." + }, + "radio.receive_full.summary": { + "message": "Zwraca krotkę zawierającą trzy wartości reprezentujące następną wiadomość przychodzącą do kolejki wiadomości.", + "description": "Returns a tuple containing three values representing the next incoming message on the message queue." + }, + "random": { + "message": "losowy", + "description": "(module name) Generate random numbers." + }, + "random.summary": { + "message": "Generuj liczb losowe.", + "description": "Generate random numbers." + }, + "random.getrandbits": { + "message": "getrandbits", + "description": "(function name) Generate an integer with ``n`` random bits." + }, + "random.getrandbits.summary": { + "message": "Wygeneruj liczbę całkowitą z {{n}} losowymi bitami.", + "description": "Generate an integer with ``n`` random bits." + }, + "random.getrandbits.param-name.n": { + "message": "n", + "description": "(parameter name) A value between 1-30 (inclusive)." + }, + "random.getrandbits.param-doc.n": { + "message": "Wartość między 1–30 (włącznie).", + "description": "Parameter docs" + }, + "random.seed": { + "message": "seed", + "description": "(function name) Initialize the random number generator." + }, + "random.seed.summary": { + "message": "Zainicjuj generator liczb losowych.", + "description": "Initialize the random number generator." + }, + "random.seed.param-name.n": { + "message": "n", + "description": "(parameter name) The integer seed" + }, + "random.seed.param-doc.n": { + "message": "Całkowity zarodek", + "description": "Parameter docs" + }, + "random.randint": { + "message": "randint", + "description": "(function name) Choose a random integer between ``a`` and ``b`` inclusive." + }, + "random.randint.summary": { + "message": "Wybierz losową liczbę całkowitą pomiędzy {{a}} i {{b}} włącznie.", + "description": "Choose a random integer between ``a`` and ``b`` inclusive." + }, + "random.randint.param-name.a": { + "message": "a", + "description": "(parameter name) Start value for the range (inclusive)" + }, + "random.randint.param-doc.a": { + "message": "Wartość początkowa dla zakresu (włącznie)", + "description": "Parameter docs" + }, + "random.randint.param-name.b": { + "message": "b", + "description": "(parameter name) End value for the range (inclusive)" + }, + "random.randint.param-doc.b": { + "message": "Wartość końcowa dla zakresu (wyłącznie)", + "description": "Parameter docs" + }, + "random.randrange-1": { + "message": "randrange", + "description": "(function name) Choose a randomly selected integer between zero and up to (but not\nincluding) ``stop``." + }, + "random.randrange-1.summary": { + "message": "Wybierz losowo wybraną liczbę całkowitą między zero aż do (ale nie\nwłącznie) {{stop}}.", + "description": "Choose a randomly selected integer between zero and up to (but not\nincluding) ``stop``." + }, + "random.randrange-1.param-name.stop": { + "message": "stop", + "description": "(parameter name) End value for the range (exclusive)" + }, + "random.randrange-1.param-doc.stop": { + "message": "Wartość końcowa zakresu (wyłącznie)", + "description": "Parameter docs" + }, + "random.randrange-2": { + "message": "randrange", + "description": "(function name) Choose a randomly selected element from ``range(start, stop, step)``." + }, + "random.randrange-2.summary": { + "message": "Wybierz losowo wybrany element z {{range(start, stop, step)}}.", + "description": "Choose a randomly selected element from ``range(start, stop, step)``." + }, + "random.randrange-2.param-name.start": { + "message": "start", + "description": "(parameter name) The start of the range (inclusive)" + }, + "random.randrange-2.param-doc.start": { + "message": "Początek zakresu (włącznie)", + "description": "Parameter docs" + }, + "random.randrange-2.param-name.step": { + "message": "step", + "description": "(parameter name) The step." + }, + "random.randrange-2.param-doc.step": { + "message": "Krok", + "description": "Parameter docs" + }, + "random.randrange-2.param-name.stop": { + "message": "stop", + "description": "(parameter name) The end of the range (exclusive)" + }, + "random.randrange-2.param-doc.stop": { + "message": "Koniec zakresu (wyłącznie)", + "description": "Parameter docs" + }, + "random.choice": { + "message": "choice", + "description": "(function name) Choose a random element from the non-empty sequence ``seq``." + }, + "random.choice.summary": { + "message": "Wybierz losowy element z niepustego cigu {{seq}}.", + "description": "Choose a random element from the non-empty sequence ``seq``." + }, + "random.choice.param-name.seq": { + "message": "seq", + "description": "(parameter name) A sequence." + }, + "random.choice.param-doc.seq": { + "message": "Cig.", + "description": "Parameter docs" + }, + "random.random": { + "message": "random", + "description": "(function name) Generate a random floating point number in the range [0.0, 1.0)." + }, + "random.random.summary": { + "message": "Wygeneruj losową liczbę zmiennopozycyjną w zakresie [0.0, 1.0).", + "description": "Generate a random floating point number in the range [0.0, 1.0)." + }, + "random.uniform": { + "message": "uniform", + "description": "(function name) Return a random floating point number between ``a`` and ``b`` inclusive." + }, + "random.uniform.summary": { + "message": "Zwróć losową liczbę zmiennopozycyjnłą między {{a}} i {{b}}.", + "description": "Return a random floating point number between ``a`` and ``b`` inclusive." + }, + "random.uniform.param-name.a": { + "message": "a", + "description": "(parameter name) Start value for the range (inclusive)" + }, + "random.uniform.param-doc.a": { + "message": "Wartość początkowa dla zakresu (włącznie)", + "description": "Parameter docs" + }, + "random.uniform.param-name.b": { + "message": "b", + "description": "(parameter name) End value for the range (inclusive)" + }, + "random.uniform.param-doc.b": { + "message": "Wartość końcowa dla zakresu (wyłącznie)", + "description": "Parameter docs" + }, + "speech": { + "message": "speech", + "description": "(module name) Make the micro:bit talk, sing and make other speech like sounds." + }, + "speech.summary": { + "message": "Spraw, by micro:bit mówił, śpiewał i tworzył inne dźwięki podobne do mowy.", + "description": "Make the micro:bit talk, sing and make other speech like sounds." + }, + "speech.translate": { + "message": "translate", + "description": "(function name) Translate English words to phonemes." + }, + "speech.translate.summary": { + "message": "Tłumacz angielskie słowa na fonemy.", + "description": "Translate English words to phonemes." + }, + "speech.translate.param-name.words": { + "message": "words", + "description": "(parameter name) A string of English words." + }, + "speech.translate.param-doc.words": { + "message": "Łańcuch słów angielskich.", + "description": "Parameter docs" + }, + "speech.pronounce": { + "message": "pronounce", + "description": "(function name) Pronounce phonemes." + }, + "speech.pronounce.summary": { + "message": "Wymów fonemy.", + "description": "Pronounce phonemes." + }, + "speech.pronounce.param-name.mouth": { + "message": "mouth", + "description": "(parameter name) A number representing the mouth of the voice" + }, + "speech.pronounce.param-doc.mouth": { + "message": "Liczba reprezentująca usta głosu", + "description": "Parameter docs" + }, + "speech.pronounce.param-name.phonemes": { + "message": "phonemes", + "description": "(parameter name) The string of phonemes to pronounce" + }, + "speech.pronounce.param-doc.phonemes": { + "message": "Łańcuch fonemów do wymówienia", + "description": "Parameter docs" + }, + "speech.pronounce.param-name.pin": { + "message": "pin", + "description": "(parameter name) Optional argument to specify the output pin can be used to override the default of ``pin0``.\nIf we do not want any sound to play out of the pins can use ``pin=None``. micro:bit V2 only." + }, + "speech.pronounce.param-doc.pin": { + "message": "Opcjonalny argument do określenia pinu wyjściowego może być użyty do nadpisania domyślnej wartości {{pin0}}.\nJeśli nie chcemy, aby jakikolwiek dźwięk wydobywał się z pinów, możemy użyć {{pin=None}}. Tylko micro:bit V2.", + "description": "Parameter docs" + }, + "speech.pronounce.param-name.pitch": { + "message": "pitch", + "description": "(parameter name) A number representing the pitch of the voice" + }, + "speech.pronounce.param-doc.pitch": { + "message": "Liczba reprezentująca wysokość głosu", + "description": "Parameter docs" + }, + "speech.pronounce.param-name.speed": { + "message": "speed", + "description": "(parameter name) A number representing the speed of the voice" + }, + "speech.pronounce.param-doc.speed": { + "message": "Liczba reprezentująca szybkość głosu", + "description": "Parameter docs" + }, + "speech.pronounce.param-name.throat": { + "message": "throat", + "description": "(parameter name) A number representing the throat of the voice" + }, + "speech.pronounce.param-doc.throat": { + "message": "Liczba reprezentująca gardło głosu", + "description": "Parameter docs" + }, + "speech.say": { + "message": "say", + "description": "(function name) Say English words." + }, + "speech.say.summary": { + "message": "Powiedz angielskie słowa.", + "description": "Say English words." + }, + "speech.say.param-name.mouth": { + "message": "mouth", + "description": "(parameter name) A number representing the mouth of the voice" + }, + "speech.say.param-doc.mouth": { + "message": "Liczba reprezentująca usta głosu", + "description": "Parameter docs" + }, + "speech.say.param-name.pin": { + "message": "pin", + "description": "(parameter name) Optional argument to specify the output pin can be used to override the default of ``pin0``.\nIf we do not want any sound to play out of the pins can use ``pin=None``. micro:bit V2 only." + }, + "speech.say.param-doc.pin": { + "message": "Opcjonalny argument do określenia pinu wyjściowego może być użyty do nadpisania domyślnej wartości {{pin0}}.\nJeśli nie chcemy, aby jakikolwiek dźwięk wydobywał się z pinów, możemy użyć {{pin=None}}. Tylko micro:bit V2.", + "description": "Parameter docs" + }, + "speech.say.param-name.pitch": { + "message": "pitch", + "description": "(parameter name) A number representing the pitch of the voice" + }, + "speech.say.param-doc.pitch": { + "message": "Liczba reprezentująca wysokość głosu", + "description": "Parameter docs" + }, + "speech.say.param-name.speed": { + "message": "speed", + "description": "(parameter name) A number representing the speed of the voice" + }, + "speech.say.param-doc.speed": { + "message": "Liczba reprezentująca szybkość głosu", + "description": "Parameter docs" + }, + "speech.say.param-name.throat": { + "message": "throat", + "description": "(parameter name) A number representing the throat of the voice" + }, + "speech.say.param-doc.throat": { + "message": "Liczba reprezentująca gardło głosu", + "description": "Parameter docs" + }, + "speech.say.param-name.words": { + "message": "words", + "description": "(parameter name) The string of words to say." + }, + "speech.say.param-doc.words": { + "message": "Łańcuch słów do powiedzenia.", + "description": "Parameter docs" + }, + "speech.sing": { + "message": "sing", + "description": "(function name) Sing phonemes." + }, + "speech.sing.summary": { + "message": "Zaśpiewaj fonemy.", + "description": "Sing phonemes." + }, + "speech.sing.param-name.mouth": { + "message": "mouth", + "description": "(parameter name) A number representing the mouth of the voice" + }, + "speech.sing.param-doc.mouth": { + "message": "Liczba reprezentująca usta głosu", + "description": "Parameter docs" + }, + "speech.sing.param-name.phonemes": { + "message": "phonemes", + "description": "(parameter name) The string of words to sing." + }, + "speech.sing.param-doc.phonemes": { + "message": "Łańcuch słów do zaśpiewania.", + "description": "Parameter docs" + }, + "speech.sing.param-name.pin": { + "message": "pin", + "description": "(parameter name) Optional argument to specify the output pin can be used to override the default of ``pin0``.\nIf we do not want any sound to play out of the pins can use ``pin=None``. micro:bit V2 only." + }, + "speech.sing.param-doc.pin": { + "message": "Opcjonalny argument do określenia pinu wyjściowego może być użyty do nadpisania domyślnej wartości {{pin0}}.\nJeśli nie chcemy, aby jakikolwiek dźwięk wydobywał się z pinów, możemy użyć {{pin=None}}. Tylko micro:bit V2.", + "description": "Parameter docs" + }, + "speech.sing.param-name.pitch": { + "message": "pitch", + "description": "(parameter name) A number representing the pitch of the voice" + }, + "speech.sing.param-doc.pitch": { + "message": "Liczba reprezentująca wysokość głosu", + "description": "Parameter docs" + }, + "speech.sing.param-name.speed": { + "message": "speed", + "description": "(parameter name) A number representing the speed of the voice" + }, + "speech.sing.param-doc.speed": { + "message": "Liczba reprezentująca szybkość głosu", + "description": "Parameter docs" + }, + "speech.sing.param-name.throat": { + "message": "throat", + "description": "(parameter name) A number representing the throat of the voice" + }, + "speech.sing.param-doc.throat": { + "message": "Liczba reprezentująca gardło głosu", + "description": "Parameter docs" + }, + "struct": { + "message": "struct", + "description": "(module name) Pack and unpack primitive data types." + }, + "struct.summary": { + "message": "Pakuj i rozpakowuj prymitywne typy danych.", + "description": "Pack and unpack primitive data types." + }, + "struct.calcsize": { + "message": "calcsize", + "description": "(function name) Get the number of bytes needed to store the given ``fmt``." + }, + "struct.calcsize.summary": { + "message": "Uzyskaj liczbę bajtów potrzebnych do przechowywania podanego {{fmt}}.", + "description": "Get the number of bytes needed to store the given ``fmt``." + }, + "struct.calcsize.param-name.fmt": { + "message": "fmt", + "description": "(parameter name) A format string." + }, + "struct.calcsize.param-doc.fmt": { + "message": "Łańcuch formatu.", + "description": "Parameter docs" + }, + "struct.pack": { + "message": "pack", + "description": "(function name) Pack values according to a format string." + }, + "struct.pack.summary": { + "message": "Upakuj wartości zgodnie z łńcuchem formatu.", + "description": "Pack values according to a format string." + }, + "struct.pack.param-name.*vn": { + "message": "*vn", + "description": "(parameter name) The remaining values." + }, + "struct.pack.param-doc.*vn": { + "message": "Pozostałe wartości.", + "description": "Parameter docs" + }, + "struct.pack.param-name.fmt": { + "message": "fmt", + "description": "(parameter name) The format string." + }, + "struct.pack.param-doc.fmt": { + "message": "Łańcuch formatu.", + "description": "Parameter docs" + }, + "struct.pack.param-name.v1": { + "message": "v1", + "description": "(parameter name) The first value." + }, + "struct.pack.param-doc.v1": { + "message": "Pierwsza wartość.", + "description": "Parameter docs" + }, + "struct.pack_into": { + "message": "pack into", + "description": "(function name) Pack values according to a format string." + }, + "struct.pack_into.summary": { + "message": "Upakuj wartości zgodnie z łńcuchem formatu.", + "description": "Pack values according to a format string." + }, + "struct.pack_into.param-name.*vn": { + "message": "*vn", + "description": "(parameter name) The remaining values." + }, + "struct.pack_into.param-doc.*vn": { + "message": "Pozostałe wartości.", + "description": "Parameter docs" + }, + "struct.pack_into.param-name.buffer": { + "message": "buffer", + "description": "(parameter name) The target buffer to write into." + }, + "struct.pack_into.param-doc.buffer": { + "message": "Bufor docelowy do zapisu.", + "description": "Parameter docs" + }, + "struct.pack_into.param-name.fmt": { + "message": "fmt", + "description": "(parameter name) The format string." + }, + "struct.pack_into.param-doc.fmt": { + "message": "Łańcuch formatu.", + "description": "Parameter docs" + }, + "struct.pack_into.param-name.offset": { + "message": "offset", + "description": "(parameter name) The offset into the buffer. May be negative to count from the end of the buffer." + }, + "struct.pack_into.param-doc.offset": { + "message": "Przesunięcie do bufora. Wartość ujemna może być liczona od końca bufora.", + "description": "Parameter docs" + }, + "struct.pack_into.param-name.v1": { + "message": "w1", + "description": "(parameter name) The first value." + }, + "struct.pack_into.param-doc.v1": { + "message": "Pierwsza wartość.", + "description": "Parameter docs" + }, + "struct.unpack": { + "message": "unpack", + "description": "(function name) Unpack data according to a format string." + }, + "struct.unpack.summary": { + "message": "Rozpakuj dane zgodnie z łańcuchem formatu.", + "description": "Unpack data according to a format string." + }, + "struct.unpack.param-name.data": { + "message": "data", + "description": "(parameter name) The data." + }, + "struct.unpack.param-doc.data": { + "message": "Dane", + "description": "Parameter docs" + }, + "struct.unpack.param-name.fmt": { + "message": "fmt", + "description": "(parameter name) The format string." + }, + "struct.unpack.param-doc.fmt": { + "message": "Łańcuch formatu.", + "description": "Parameter docs" + }, + "struct.unpack_from": { + "message": "unpack from", + "description": "(function name) Unpack data from a buffer according to a format string." + }, + "struct.unpack_from.summary": { + "message": "Rozpakuj dane z buforu zgodnie z łańcuchem formatu.", + "description": "Unpack data from a buffer according to a format string." + }, + "struct.unpack_from.param-name.buffer": { + "message": "buffer", + "description": "(parameter name) The source buffer to read from." + }, + "struct.unpack_from.param-doc.buffer": { + "message": "Bufor źródłowy do odczytu.", + "description": "Parameter docs" + }, + "struct.unpack_from.param-name.fmt": { + "message": "fmt", + "description": "(parameter name) The format string." + }, + "struct.unpack_from.param-doc.fmt": { + "message": "Łańcuch formatu.", + "description": "Parameter docs" + }, + "struct.unpack_from.param-name.offset": { + "message": "offset", + "description": "(parameter name) The offset into the buffer. May be negative to count from the end of the buffer." + }, + "struct.unpack_from.param-doc.offset": { + "message": "Przesunięcie do bufora. Wartość ujemna może być liczona od końca bufora.", + "description": "Parameter docs" + }, + "sys": { + "message": "sys", + "description": "(module name) System specific functions" + }, + "sys.summary": { + "message": "Funkcje specyficzne dla systemu", + "description": "System specific functions" + }, + "sys.exit": { + "message": "exit", + "description": "(function name) Terminate current program with a given exit code." + }, + "sys.exit.summary": { + "message": "Zakończ bieżący program z podanym kodem wyjścia.", + "description": "Terminate current program with a given exit code." + }, + "sys.exit.param-name.retval": { + "message": "retval", + "description": "(parameter name) The exit code or message." + }, + "sys.exit.param-doc.retval": { + "message": "Kod lub wiadomość wyjściowa.", + "description": "Parameter docs" + }, + "sys.print_exception": { + "message": "print exception", + "description": "(function name) Print an exception with a traceback." + }, + "sys.print_exception.summary": { + "message": "Wydrukuj wyjątek ze śledzeniem.", + "description": "Print an exception with a traceback." + }, + "sys.print_exception.param-name.exc": { + "message": "exc", + "description": "(parameter name) The exception to print" + }, + "sys.print_exception.param-doc.exc": { + "message": "Wyjątek do wydrukowania", + "description": "Parameter docs" + }, + "sys.argv": { + "message": "argv", + "description": "(field name) A mutable list of arguments the current program was started with." + }, + "sys.argv.summary": { + "message": "Zmienna lista argumentów, od których uruchomiono bieżący program.", + "description": "A mutable list of arguments the current program was started with." + }, + "sys.byteorder": { + "message": "byteorder", + "description": "(field name) The byte order of the system (``\"little\"`` or ``\"big\"``)." + }, + "sys.byteorder.summary": { + "message": "Kolejność bajtów systemu ({{\"little\"}} lub {{\"big\"}}).", + "description": "The byte order of the system (``\"little\"`` or ``\"big\"``)." + }, + "sys.implementation": { + "message": "implementation", + "description": "(field name) Object with information about the current Python implementation." + }, + "sys.implementation.summary": { + "message": "Obiekt z informacjami o bieżącej implementacji Pythona.", + "description": "Object with information about the current Python implementation." + }, + "sys.maxsize": { + "message": "maxsize", + "description": "(field name) \nMaximum value which a native integer type can hold on the current platform,\nor maximum value representable by MicroPython integer type, if it's smaller\nthan platform max value (that is the case for MicroPython ports without\nlong int support)." + }, + "sys.maxsize.summary": { + "message": "\nMaksymalna wartość, jaką może przechowywać natywny typ całkowity na bieżącej platformie,\nlub maksymalna wartość reprezentowana przez typ całkowity MicroPythona, jeśli jest mniejsza\nniż maksymalna wartość platformy (tak jest w przypadku portów MicroPython bez\nwsparcia long int).", + "description": "\nMaximum value which a native integer type can hold on the current platform,\nor maximum value representable by MicroPython integer type, if it's smaller\nthan platform max value (that is the case for MicroPython ports without\nlong int support)." + }, + "sys.modules": { + "message": "modules", + "description": "(field name) Dictionary of loaded modules. " + }, + "sys.modules.summary": { + "message": "Słownik załadowanych modułów. ", + "description": "Dictionary of loaded modules. " + }, + "sys.path": { + "message": "path", + "description": "(field name) A mutable list of directories to search for imported modules." + }, + "sys.path.summary": { + "message": "Zmienna lista katalogów do wyszukiwania importowanych modułów.", + "description": "A mutable list of directories to search for imported modules." + }, + "sys.platform": { + "message": "platform", + "description": "(field name) The platform that MicroPython is running on. " + }, + "sys.platform.summary": { + "message": "Platforma na której działa MicroPython. ", + "description": "The platform that MicroPython is running on. " + }, + "sys.version": { + "message": "version", + "description": "(field name) Python language version that this implementation conforms to, as a string." + }, + "sys.version.summary": { + "message": "Wersja Pythona, z którą ta implementacja jest zgodna, jako łańcuch.", + "description": "Python language version that this implementation conforms to, as a string." + }, + "sys.version_info": { + "message": "version info", + "description": "(field name) Python language version that this implementation conforms to, as a tuple of ints." + }, + "sys.version_info.summary": { + "message": "Wersja Pythona, z którą ta implementacja jest zgodna, jako krotka typu int.", + "description": "Python language version that this implementation conforms to, as a tuple of ints." + }, + "time": { + "message": "time", + "description": "(module name) Measure time and add delays to programs." + }, + "time.summary": { + "message": "Zmierz czas i dodaj opóźnienia do programów.", + "description": "Measure time and add delays to programs." + }, + "time.sleep": { + "message": "sleep", + "description": "(function name) Delay a number of seconds." + }, + "time.sleep.summary": { + "message": "Opóźnij kilka sekund.", + "description": "Delay a number of seconds." + }, + "time.sleep.param-name.seconds": { + "message": "seconds", + "description": "(parameter name) The number of seconds to sleep for.\nUse a floating-point number to sleep for a fractional number of seconds." + }, + "time.sleep.param-doc.seconds": { + "message": "Liczba sekund snu.\nUżyj liczby zmiennopozycyjnej, aby spać przez ułamkową część sekund.", + "description": "Parameter docs" + }, + "time.sleep_ms": { + "message": "sleep ms", + "description": "(function name) Delay for given number of milliseconds." + }, + "time.sleep_ms.summary": { + "message": "Opóźnij o podaną liczbę milisekund.", + "description": "Delay for given number of milliseconds." + }, + "time.sleep_ms.param-name.ms": { + "message": "ms", + "description": "(parameter name) The number of milliseconds delay (>= 0)." + }, + "time.sleep_ms.param-doc.ms": { + "message": "Liczba milisekund opóźnienia (>= 0).", + "description": "Parameter docs" + }, + "time.sleep_us": { + "message": "sleep us", + "description": "(function name) Delay for given number of microseconds." + }, + "time.sleep_us.summary": { + "message": "Opóźnij o podaną liczbę milisekund.", + "description": "Delay for given number of microseconds." + }, + "time.sleep_us.param-name.us": { + "message": "us", + "description": "(parameter name) The number of microseconds delay (>= 0)." + }, + "time.sleep_us.param-doc.us": { + "message": "Liczba milisekund opóźnienia (>= 0).", + "description": "Parameter docs" + }, + "time.ticks_ms": { + "message": "ticks ms", + "description": "(function name) Get an increasing, millisecond counter with an arbitrary reference point,\nthat wraps around after some value." + }, + "time.ticks_ms.summary": { + "message": "Uzyskaj rosnący licznik milisekundowy z dowolnym punktem odniesienia,\nktóry zawija się po pewnej wartości.", + "description": "Get an increasing, millisecond counter with an arbitrary reference point,\nthat wraps around after some value." + }, + "time.ticks_us": { + "message": "ticks us", + "description": "(function name) Get an increasing, microsecond counter with an arbitrary reference point,\nthat wraps around after some value." + }, + "time.ticks_us.summary": { + "message": "Uzyskaj rosnący licznik milisekundowy z dowolnym punktem odniesienia,\nktóry zawija się po pewnej wartości.", + "description": "Get an increasing, microsecond counter with an arbitrary reference point,\nthat wraps around after some value." + }, + "time.ticks_add": { + "message": "ticks add", + "description": "(function name) Offset ticks value by a given number, which can be either positive or\nnegative." + }, + "time.ticks_add.summary": { + "message": "Przesunięcie zaznacza wartość o podaną liczbę, która może być dodatnia lub\nnegatywny.\n.", + "description": "Offset ticks value by a given number, which can be either positive or\nnegative." + }, + "time.ticks_add.param-name.delta": { + "message": "delta", + "description": "(parameter name) An integer offset" + }, + "time.ticks_add.param-doc.delta": { + "message": "Przesunięcie o liczbę całkowitą", + "description": "Parameter docs" + }, + "time.ticks_add.param-name.ticks": { + "message": "ticks", + "description": "(parameter name) A ticks value" + }, + "time.ticks_add.param-doc.ticks": { + "message": "Wartość ticków", + "description": "Parameter docs" + }, + "time.ticks_diff": { + "message": "ticks diff", + "description": "(function name) Measure ticks difference between values returned from\n``time.ticks_ms()`` or ``ticks_us()``, as a signed value\nwhich may wrap around." + }, + "time.ticks_diff.summary": { + "message": "Zmierz różnicę ticków między wartościami zwróconymi z\n{{time.ticks_ms()}} lub {{ticks_us()}}, jako wartość ze znakiem, \nktóra może się zawijać.", + "description": "Measure ticks difference between values returned from\n``time.ticks_ms()`` or ``ticks_us()``, as a signed value\nwhich may wrap around." + }, + "time.ticks_diff.param-name.ticks1": { + "message": "ticks1", + "description": "(parameter name) The value to subtract from" + }, + "time.ticks_diff.param-doc.ticks1": { + "message": "Wartość do odejmowania od", + "description": "Parameter docs" + }, + "time.ticks_diff.param-name.ticks2": { + "message": "ticks2", + "description": "(parameter name) The value to subtract" + }, + "time.ticks_diff.param-doc.ticks2": { + "message": "Wartość do odejmowania", + "description": "Parameter docs" + } +} \ No newline at end of file diff --git a/crowdin/translated/api.zh-cn.json b/crowdin/translated/api.zh-cn.json index fc5b474..a61c505 100644 --- a/crowdin/translated/api.zh-cn.json +++ b/crowdin/translated/api.zh-cn.json @@ -1441,11 +1441,11 @@ }, "microbit.Image.SMILE": { "message": "微笑", - "description": "(field name) Smiling face image." + "description": "(field name) Smiling mouth image." }, "microbit.Image.SMILE.summary": { "message": "微笑的脸部图像。", - "description": "Smiling face image." + "description": "Smiling mouth image." }, "microbit.Image.SAD": { "message": "难过", @@ -3457,11 +3457,11 @@ }, "microbit.spi.read": { "message": "读取", - "description": "(function name) Read bytes." + "description": "(function name) Read at most ``nbytes`` while continuously writing the single byte given by ``out``." }, "microbit.spi.read.summary": { - "message": "读取字节。", - "description": "Read bytes." + "message": "读取字节数。", + "description": "Read at most ``nbytes`` while continuously writing the single byte given by ``out``." }, "microbit.spi.read.param-name.nbytes": { "message": "字节数", @@ -3471,6 +3471,14 @@ "message": "要读取的最大字节数。", "description": "Parameter docs" }, + "microbit.spi.read.param-name.out": { + "message": "写出", + "description": "(parameter name) The byte value to write (default 0)." + }, + "microbit.spi.read.param-doc.out": { + "message": "The byte value to write (default 0).", + "description": "Parameter docs" + }, "microbit.spi.write": { "message": "写入", "description": "(function name) Write bytes to the bus." diff --git a/crowdin/translated/api.zh-tw.json b/crowdin/translated/api.zh-tw.json index e4da482..4c2577a 100644 --- a/crowdin/translated/api.zh-tw.json +++ b/crowdin/translated/api.zh-tw.json @@ -1441,11 +1441,11 @@ }, "microbit.Image.SMILE": { "message": "微笑", - "description": "(field name) Smiling face image." + "description": "(field name) Smiling mouth image." }, "microbit.Image.SMILE.summary": { "message": "笑臉圖像。", - "description": "Smiling face image." + "description": "Smiling mouth image." }, "microbit.Image.SAD": { "message": "sad", @@ -3457,11 +3457,11 @@ }, "microbit.spi.read": { "message": "read", - "description": "(function name) Read bytes." + "description": "(function name) Read at most ``nbytes`` while continuously writing the single byte given by ``out``." }, "microbit.spi.read.summary": { "message": "讀取位元組。", - "description": "Read bytes." + "description": "Read at most ``nbytes`` while continuously writing the single byte given by ``out``." }, "microbit.spi.read.param-name.nbytes": { "message": "nbytes", @@ -3471,6 +3471,14 @@ "message": "要讀取的最大位元組數。", "description": "Parameter docs" }, + "microbit.spi.read.param-name.out": { + "message": "out", + "description": "(parameter name) The byte value to write (default 0)." + }, + "microbit.spi.read.param-doc.out": { + "message": "The byte value to write (default 0).", + "description": "Parameter docs" + }, "microbit.spi.write": { "message": "write", "description": "(function name) Write bytes to the bus." diff --git a/lang/ca/typeshed/stdlib/microbit/spi.pyi b/lang/ca/typeshed/stdlib/microbit/spi.pyi index 37ad952..d905f08 100644 --- a/lang/ca/typeshed/stdlib/microbit/spi.pyi +++ b/lang/ca/typeshed/stdlib/microbit/spi.pyi @@ -17,12 +17,13 @@ For correct communication, the parameters have to be the same on both communicat :param miso: miso pin (per defecte 14)""" ... -def read(nbytes: int) -> bytes: +def read(nbytes: int, out: int=0) -> bytes: """Llegeix bytes (llegeix) Example: ``spi.read(64)`` :param nbytes: Nombre màxim de bytes per llegir. +:param out: The byte value to write (default 0). :return: The bytes read.""" ... diff --git a/lang/de/typeshed/stdlib/log.pyi b/lang/de/typeshed/stdlib/log.pyi index 281e68d..4ba6cce 100644 --- a/lang/de/typeshed/stdlib/log.pyi +++ b/lang/de/typeshed/stdlib/log.pyi @@ -9,7 +9,7 @@ MINUTES = 600 HOURS = 36000 """Stunden Zeitstempelformat. (stunden)""" DAYS = 864000 -"""Tage Zeitstempelformat. (tage)""" +"""Tage Zeitstempelformat.""" def set_labels(*labels: str, timestamp: Optional[Literal[1, 10, 36000, 864000]]=SECONDS) -> None: """Den Logdatei-Header setzen (Beschriftungen festlegen) @@ -28,7 +28,7 @@ By default the first column contains a timestamp for each row. The time unit can be selected via the timestamp argument. :param *labels: Eine beliebige Anzahl von Positionsargumenten, die jeweils einem Eintrag in der Kopfzeile des Logs entsprechen. -:param timestamp: (Zeitstempel) Wähle die Zeitstempel-Einheit, die automatisch als erste Spalte in jeder Zeile hinzugefügt 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``.""" +:param timestamp: Wähle die Zeitstempel-Einheit, die automatisch als erste Spalte in jeder Zeile hinzugefügt 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``.""" ... @overload diff --git a/lang/de/typeshed/stdlib/microbit/__init__.pyi b/lang/de/typeshed/stdlib/microbit/__init__.pyi index eeeff8d..023ebc6 100644 --- a/lang/de/typeshed/stdlib/microbit/__init__.pyi +++ b/lang/de/typeshed/stdlib/microbit/__init__.pyi @@ -37,14 +37,14 @@ When an exception is thrown inside the callback function it deschedules the function. To avoid this you can catch exceptions with ``try/except``. :param callback: Funktion, die in dem angegebenen Intervall aufgerufen wird. Bei Verwendung als Dekorator weglassen. -:param days: (tage) Legt den Tag für die Planung fest. +:param days: Legt den Tag für die Planung fest. :param h: Legt die Uhrzeit für die Planung fest. :param min: Legt die Minute für die Planung fest. :param s: Legt die Sekunde für die Planung fest. :param ms: Legt die Millisekunde für die Planung fest.""" def panic(n: int) -> None: - """In einen Panik-Modus gehen. + """In einen Panik-Modus wechseln. Example: ``panic(127)`` @@ -89,7 +89,7 @@ If they are both integers (i.e ``10``), it will return an integer:: returns_int = scale(accelerometer.get_x(), from_=(-2000, 2000), to=(0, 255)) -:param value: (wert) Eine umzurechnende Zahl. +:param value: Eine umzurechnende Zahl. :param from_: Ein Tupel, das den Bereich definiert, aus dem konvertiert werden soll. :param to: Ein Tupel, das den Bereich definiert, in den konvertiert werden soll. :return: The ``value`` converted to the ``to`` range.""" diff --git a/lang/de/typeshed/stdlib/microbit/accelerometer.pyi b/lang/de/typeshed/stdlib/microbit/accelerometer.pyi index a63507d..3274570 100644 --- a/lang/de/typeshed/stdlib/microbit/accelerometer.pyi +++ b/lang/de/typeshed/stdlib/microbit/accelerometer.pyi @@ -2,7 +2,7 @@ from typing import Tuple def get_x() -> int: - """Erhalte die Beschleunigungsmessung in der ``x`` -Achse in Milli-g. (erhalte x) + """Erhalte die Beschleunigungsmessung in der ``x`` -Achse in Milli-g. Example: ``accelerometer.get_x()`` @@ -10,7 +10,7 @@ Example: ``accelerometer.get_x()`` ... def get_y() -> int: - """Erhalte die Beschleunigungsmessung in der ``y`` -Achse in Milli-g. (erhalte y) + """Erhalte die Beschleunigungsmessung in der ``y`` -Achse in Milli-g. Example: ``accelerometer.get_y()`` @@ -18,7 +18,7 @@ Example: ``accelerometer.get_y()`` ... def get_z() -> int: - """Erhalte die Beschleunigungsmessung in der ``z`` -Achse in Milli-g. (erhalte z) + """Erhalte die Beschleunigungsmessung in der ``z`` -Achse in Milli-g. Example: ``accelerometer.get_z()`` @@ -26,7 +26,7 @@ Example: ``accelerometer.get_z()`` ... def get_values() -> Tuple[int, int, int]: - """Erhalten Sie die Beschleunigungsmessungen in allen Achsen auf einmal als Tupel. (Werte erhalten) + """Erhalten Sie die Beschleunigungsmessungen in allen Achsen auf einmal als Tupel. Example: ``x, y, z = accelerometer.get_values()`` @@ -34,7 +34,7 @@ Example: ``x, y, z = accelerometer.get_values()`` ... def get_strength() -> int: - """Erhalte die Beschleunigungsmessung aller Achsen als positive Ganzzahl. Dies ist die euklidische Summe der X-, Y- und Z-Achsen. (erhalte Stärke) + """Erhalte die Beschleunigungsmessung aller Achsen als positive Ganzzahl. Dies ist die euklidische Summe der X-, Y- und Z-Achsen. Example: ``accelerometer.get_strength()`` @@ -82,7 +82,7 @@ represented as strings. :return: ``True`` if the gesture was active since the last call, ``False`` otherwise.""" def get_gestures() -> Tuple[str, ...]: - """Gibt ein Tupel der vergangenen Gesten zurück. (erhalte Gesten) + """Gibt ein Tupel der vergangenen Gesten zurück. Example: ``accelerometer.get_gestures()`` diff --git a/lang/de/typeshed/stdlib/microbit/audio.pyi b/lang/de/typeshed/stdlib/microbit/audio.pyi index 8faf67a..fad5da1 100644 --- a/lang/de/typeshed/stdlib/microbit/audio.pyi +++ b/lang/de/typeshed/stdlib/microbit/audio.pyi @@ -10,7 +10,7 @@ Example: ``audio.play(Sound.GIGGLE)`` :param source: (Quelle) Ein eingebauter ``Sound`` wie ``Sound.GIGGLE``, ein ``SoundEffect`` oder Beispieldaten als Teil eines ``AudioFrame`` Objekts. :param wait: Wenn ``wait`` ``True`` ist, wird diese Funktion blockiert, bis der Klang abgeschlossen ist. :param pin: Ein optionales Argument für den Ausgabepin kann angegeben werden, um die Standardeinstellung von ``pin0``zu überschreiben. Wenn kein Ton wiedergegeben werden soll, kann ``pin=None`` verwendet werden. -: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.""" +:param return_pin: Bestimmt einen Pin, mit dem der externen Lautsprecher anstatt mit Ground verbunden wird. Dies wird bei der **V2** Revision ignoriert.""" def is_playing() -> bool: """Überprüfen Sie, ob ein Ton abgespielt wird. (spielt gerade) diff --git a/lang/de/typeshed/stdlib/microbit/compass.pyi b/lang/de/typeshed/stdlib/microbit/compass.pyi index 77321dc..6d515d9 100644 --- a/lang/de/typeshed/stdlib/microbit/compass.pyi +++ b/lang/de/typeshed/stdlib/microbit/compass.pyi @@ -24,7 +24,7 @@ Example: ``compass.clear_calibration()``""" ... def get_x() -> int: - """Ermittle die Magnetfeldstärke der ``x``-Achse. (erhalte x) + """Liefert die Magnetfeldstärke der ``x``-Achse. Example: ``compass.get_x()`` @@ -34,7 +34,7 @@ Call ``calibrate`` first or the results will be inaccurate. ... def get_y() -> int: - """Ermittle die Magnetfeldstärke der ``y``-Achse. (erhalte y) + """Liefert die Magnetfeldstärke der ``y``-Achse. Example: ``compass.get_y()`` @@ -44,7 +44,7 @@ Call ``calibrate`` first or the results will be inaccurate. ... def get_z() -> int: - """Ermittle die Magnetfeldstärke der ``z``-Achse. (erhalte z) + """Liefert die Magnetfeldstärke der ``z``-Achse. Example: ``compass.get_z()`` diff --git a/lang/de/typeshed/stdlib/microbit/display.pyi b/lang/de/typeshed/stdlib/microbit/display.pyi index 24a1d82..bd6beb5 100644 --- a/lang/de/typeshed/stdlib/microbit/display.pyi +++ b/lang/de/typeshed/stdlib/microbit/display.pyi @@ -3,7 +3,7 @@ from ..microbit import Image from typing import Union, overload, Iterable def get_pixel(x: int, y: int) -> int: - """Ermittle die Helligkeit der LED auf Spalte ``x`` und Zeile ``y``. (Pixelwerte holen) + """Ermittelt die Helligkeit der LED in Spalte ``x`` und Zeile ``y``. Example: ``display.get_pixel(0, 0)`` @@ -13,17 +13,17 @@ Example: ``display.get_pixel(0, 0)`` ... def set_pixel(x: int, y: int, value: int) -> None: - """Ändere die Helligkeit der LED auf Spalte ``x`` und Zeile ``y``. (Pixelwerte setzen) + """Stellt die Helligkeit der LED in Spalte ``x`` und Zeile ``y`` ein. Example: ``display.set_pixel(0, 0, 9)`` :param x: Die Anzeige-Spalte (0..4) :param y: Die Anzeigezeile (0..4) -:param value: (wert) Die Helligkeit zwischen 0 (aus) und 9 (am hellsten)""" +:param value: Die Helligkeit zwischen 0 (aus) und 9 (am hellsten)""" ... def clear() -> None: - """Setzt die Helligkeit aller LEDs auf 0 (aus). (löschen) + """Setzt die Helligkeit aller LEDs auf 0 (aus). Example: ``display.clear()``""" ... @@ -36,44 +36,44 @@ Example: ``display.show(Image.HEART)`` When ``image`` is an image or a list of images then each image is displayed in turn. If ``image`` is a string or number, each letter or digit is displayed in turn. -:param image: Eine Zeichenkette, Nummer, Bild oder Liste der anzuzeigenden Bilder. -:param delay: (Verzögerung) Jeder Buchstabe, Ziffer oder Bild wird mit ``delay`` Millisekunden zwischen ihnen angezeigt. -:param wait: Wenn ``wait`` ``True``ist, wird diese Funktion blockiert, bis die Animation beendet ist, andernfalls wird die Animation im Hintergrund stattfinden. -:param loop: Wenn ``loop`` ``True``ist, wird sich die Animation für immer wiederholen. -:param clear: (löschen) Wenn ``clear`` ``True``ist, wird die Anzeige ausgeschaltet, nachdem die Sequenz beendet ist. +:param image: Eine Zeichenkette, eine Zahl, ein Bild oder eine Liste von Bildern, die angezeigt werden sollen. +:param delay: Jeder Buchstabe, jede Ziffer oder jedes Bild wird mit einer Verzögerung von ``delay`` Millisekunden angezeigt. +: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ührt. +:param loop: Wenn ``loop`` ``True`` ist, wird die Animation endlos wiederholt. +:param clear: Wenn ``clear`` ``True`` ist, wird die Anzeige nach Beendigung der Sequenz gelöscht. The ``wait``, ``loop`` and ``clear`` arguments must be specified using their keyword.""" ... def scroll(text: Union[str, float, int], delay: int=150, wait: bool=True, loop: bool=False, monospace: bool=False) -> None: - """Scrollt eine Zahl oder einen Text auf dem LED-Display. (scrollen) + """Scrollt eine Zahl oder einen Text auf dem LED-Display. Example: ``display.scroll('micro:bit')`` -:param text: Der zu wiederzugebende String. Wenn ``text`` eine Ganzzahl oder ein Float ist, wird er zuerst mit ``str()`` in einen String konvertiert. -:param delay: (Verzögerung) Der ``delay`` -Parameter bestimmt, wie schnell der Text scrollt. -:param wait: Wenn ``wait`` ``True``ist, wird diese Funktion blockiert, bis die Animation beendet ist, andernfalls wird die Animation im Hintergrund stattfinden. -:param loop: Wenn ``loop`` ``True``ist, wird sich die Animation für immer wiederholen. -: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. +:param text: Die zu scrollende Zeichenkette. Wenn ``text`` ein Integer oder Float ist, wird der Text vorher mit ``str()`` in einen String umgewandelt. +:param delay: Der Parameter ``delay`` bestimmt, wie schnell der Text gescrollt wird. +:param wait: Wenn ``wait`` ``True`` ist, wird diese Funktion das Programm anhalten, bis die Animation beendet ist, andernfalls läuft die Animation im Hintergrund ab. +:param loop: Wenn ``loop`` ``True`` ist, wird die Animation endlos wiederholt. +:param monospace: Wenn ``monospace`` ``True``ist, werden alle Zeichen 5 Pixel breit sein. Zwischen den Zeichen gibt es beim scrollen genau 1 leere Pixelspalte. The ``wait``, ``loop`` and ``monospace`` arguments must be specified using their keyword.""" ... def on() -> None: - """Schalten Sie das LED-Display ein. (an) + """Das LED-Display einschalten. Example: ``display.on()``""" ... def off() -> None: - """Schalten Sie die LED-Anzeige aus (das Deaktivieren des Displays erlaubt es Ihnen, die GPIO-Pins für andere Zwecke zu verwenden). + """Die LED-Anzeige ausschalten (Deaktivieren des Displays ermöglicht es dir, die GPIO-Pins für andere Zwecke zu verwenden). Example: ``display.off()``""" ... def is_on() -> bool: - """Überprüfen Sie, ob die LED-Anzeige aktiviert ist. (ist an) + """Überprüfung, ob die LED-Anzeige aktiviert ist. Example: ``display.is_on()`` @@ -81,7 +81,7 @@ Example: ``display.is_on()`` ... def read_light_level() -> int: - """Bestimmt die Lichtintensität. (bestimme Licht Intensität) + """Bestimmt die Lichtintensität. Example: ``display.read_light_level()`` diff --git a/lang/de/typeshed/stdlib/microbit/speaker.pyi b/lang/de/typeshed/stdlib/microbit/speaker.pyi index 39adac2..205091c 100644 --- a/lang/de/typeshed/stdlib/microbit/speaker.pyi +++ b/lang/de/typeshed/stdlib/microbit/speaker.pyi @@ -9,7 +9,7 @@ This does not disable sound output to an edge connector pin.""" ... def on() -> None: - """Lautsprecher einschalten. (an) + """Lautsprecher einschalten. Example: ``speaker.on()``""" ... \ No newline at end of file diff --git a/lang/de/typeshed/stdlib/microbit/spi.pyi b/lang/de/typeshed/stdlib/microbit/spi.pyi index fb33f5e..47bde2c 100644 --- a/lang/de/typeshed/stdlib/microbit/spi.pyi +++ b/lang/de/typeshed/stdlib/microbit/spi.pyi @@ -17,12 +17,13 @@ For correct communication, the parameters have to be the same on both communicat :param miso: miso pin (Voreinstellung 14)""" ... -def read(nbytes: int) -> bytes: +def read(nbytes: int, out: int=0) -> bytes: """Bytes lesen. Example: ``spi.read(64)`` :param nbytes: Maximum der zu lesenden Bytes. +:param out: The byte value to write (default 0). :return: The bytes read.""" ... diff --git a/lang/de/typeshed/stdlib/neopixel.pyi b/lang/de/typeshed/stdlib/neopixel.pyi index 07c23c8..9c84fea 100644 --- a/lang/de/typeshed/stdlib/neopixel.pyi +++ b/lang/de/typeshed/stdlib/neopixel.pyi @@ -26,7 +26,7 @@ See `the online docs None: - """Lösche alle Pixel. (löschen) + """Lösche alle Pixel. Example: ``np.clear()``""" ... @@ -76,6 +76,6 @@ Example: ``r, g, b = np[0]`` :return: The colour tuple.""" def __len__(self) -> int: - """Erhalte die Länge des Pixelstreifens. + """Liefert die Länge des Pixelstreifens. Example: ``len(np)``""" \ No newline at end of file diff --git a/lang/de/typeshed/stdlib/radio.pyi b/lang/de/typeshed/stdlib/radio.pyi index 66f13f2..a75e188 100644 --- a/lang/de/typeshed/stdlib/radio.pyi +++ b/lang/de/typeshed/stdlib/radio.pyi @@ -7,7 +7,7 @@ RATE_2MBIT: int """Konstante zur Angabe eines Durchsatzes von 2 MBit pro Sekunde.""" def on() -> None: - """Schaltet den Funk ein. (an) + """Schaltet den Funk ein. Example: ``radio.on()`` diff --git a/lang/es-es/typeshed/stdlib/log.pyi b/lang/es-es/typeshed/stdlib/log.pyi index 826660c..d416a70 100644 --- a/lang/es-es/typeshed/stdlib/log.pyi +++ b/lang/es-es/typeshed/stdlib/log.pyi @@ -28,7 +28,7 @@ By default the first column contains a timestamp for each row. The time unit can be selected via the timestamp argument. :param *labels: (*Etiquetas) Cualquier número de argumentos posicionales, cada uno correspondiente a una entrada en el encabezado del registro. -:param timestamp: (marca de tiempo) Seleccione la unidad de marca de tiempo que se añadirá automáticamente 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``.""" +:param timestamp: (marca de tiempo) Selecciona la unidad de marca de tiempo que se añadirá automáticamente 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``.""" ... @overload @@ -46,7 +46,7 @@ to the log with the extra labels. Labels previously specified and not present in a call to this function will be skipped with an empty value in the log row. -:param data_dictionary: (diccionario de datos) Los datos a registrar como un diccionario con una clave para cada cabecera.""" +:param data_dictionary: (diccionario de datos) Los datos que se registrarán como un diccionario con una clave para cada cabecera.""" ... @overload @@ -79,7 +79,7 @@ and “fast” invalidates the data without removing it. ... def set_mirroring(serial: bool): - """Configure la duplicación de la actividad de registro de datos en la salida en serie. (configurar replicación) + """Configura la duplicación de la actividad de registro de datos en la salida serie. (configurar replicación) Example: ``log.set_mirroring(True)`` diff --git a/lang/es-es/typeshed/stdlib/microbit/__init__.pyi b/lang/es-es/typeshed/stdlib/microbit/__init__.pyi index d0c8207..af9a99d 100644 --- a/lang/es-es/typeshed/stdlib/microbit/__init__.pyi +++ b/lang/es-es/typeshed/stdlib/microbit/__init__.pyi @@ -12,7 +12,7 @@ from . import spi as spi from . import uart as uart def 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]]: - """Programe para ejecutar una función en el intervalo especificado por los argumentos de tiempo **V2 solamente**. (ejecutar cada) + """Programa la ejecución de una función en el intervalo especificado por los argumentos de tiempo **Sólo V2**. (ejecutar cada) Example: ``run_every(my_logging, min=5)`` @@ -36,12 +36,12 @@ So ``run_every(min=1, s=30)`` schedules the callback every minute and a half. When an exception is thrown inside the callback function it deschedules the function. To avoid this you can catch exceptions with ``try/except``. -:param callback: Función para llamar al intervalo proporcionado. Omitir cuando se utiliza como decorador. -:param days: (días) Establece la marca del día para la programación. -:param h: Establece la marca de hora para la programación. -:param min: Establece la marca de minuto para la programación. -:param s: Establece la segunda marca para la programación. -:param ms: Establece la marca de milisegundos para la programación.""" +:param callback: Función a llamar en el intervalo proporcionado. Omitir cuando se utiliza como un decorador. +:param days: (días) Configura la marca del día para la programación. +:param h: Configura la marca de la hora para la programación. +:param min: Configura la marca de los minutos para la programación. +:param s: Configura la segunda marca para la programación. +:param ms: Configura la marca de los milisegundos para la programación.""" def panic(n: int) -> None: """Entra en modo pánico (pánico) diff --git a/lang/es-es/typeshed/stdlib/microbit/accelerometer.pyi b/lang/es-es/typeshed/stdlib/microbit/accelerometer.pyi index 6941721..3d591b4 100644 --- a/lang/es-es/typeshed/stdlib/microbit/accelerometer.pyi +++ b/lang/es-es/typeshed/stdlib/microbit/accelerometer.pyi @@ -34,7 +34,7 @@ Example: ``x, y, z = accelerometer.get_values()`` ... def get_strength() -> int: - """Obtener la medición de aceleración de todos los ejes combinados, como un entero positivo. Esta es la suma de Pitagórica de los ejes X, Y y Z. (obtener fuerza) + """Obtiene la medida de la aceleración de todos los ejes combinados, como un entero positivo. Es la suma Pitagórica de los ejes X, Y y Z. (obtener fuerza) Example: ``accelerometer.get_strength()`` @@ -96,7 +96,7 @@ gestures can be detected using a loop with a small :func:`microbit.sleep` delay. ... def set_range(value: int) -> None: - """Establecer el rango de sensibilidad acelerómetro, en g (gravedad estándar), a los valores más cercanos soportados por el hardware, así que se redondea a ``2``, ``4``o ``8`` g. (establecer rango) + """Configura el rango de sensibilidad del acelerómetro, en g (gravedad estándar), a los valores más cercanos soportados por el hardware, por lo que redondea a ``2``, ``4``, u ``8`` g. (configurar rango) Example: ``accelerometer.set_range(8)`` diff --git a/lang/es-es/typeshed/stdlib/microbit/audio.pyi b/lang/es-es/typeshed/stdlib/microbit/audio.pyi index 7386050..90bc14f 100644 --- a/lang/es-es/typeshed/stdlib/microbit/audio.pyi +++ b/lang/es-es/typeshed/stdlib/microbit/audio.pyi @@ -3,7 +3,7 @@ from ..microbit import MicroBitDigitalPin, Sound, pin0 from typing import ClassVar, Iterable, Union def play(source: Union[Iterable[AudioFrame], Sound, SoundEffect], wait: bool=True, pin: MicroBitDigitalPin=pin0, return_pin: Union[MicroBitDigitalPin, None]=None) -> None: - """Reproducir un sonido, un efecto de sonido o marcos de audio personalizados. (reproducir) + """Reproduce un sonido integrado, un efecto de sonido o marcos de audio personalizados. (reproducir) Example: ``audio.play(Sound.GIGGLE)`` @@ -27,11 +27,11 @@ Example: ``audio.stop()``""" ... class SoundEffect: - """Un efecto de sonido, compuesto por un conjunto de parámetros configurados a través del constructor o atributos. (efecto de sonido)""" + """Un efecto de sonido, compuesto por un conjunto de parámetros configurados a través del constructor o atributos. (efectosonido)""" WAVEFORM_SINE: ClassVar[int] - """Opción de onda sinusoidal utilizada para el parámetro ``waveform``. (forma de onda sinusoidal)""" + """Opción de onda senoidal utilizada para el parámetro ``waveform``. (forma de onda senoidal)""" WAVEFORM_SAWTOOTH: ClassVar[int] - """Opción de onda con diente de sierra usada para el parámetro ``waveform``. (diente de sierra de forma de onda)""" + """Opción de onda con diente de sierra usada para el parámetro ``waveform``. (forma de onda diente de sierra)""" WAVEFORM_TRIANGLE: ClassVar[int] """Opción de onda triangular usada para el parámetro ``waveform``. (forma de onda triangular)""" WAVEFORM_SQUARE: ClassVar[int] @@ -47,7 +47,7 @@ class SoundEffect: FX_NONE: ClassVar[int] """Ninguna opción de efecto usada para el parámetro ``fx``. (fx ninguno)""" FX_TREMOLO: ClassVar[int] - """Opción de efecto Trémolo usada para el parámetro ``fx``.""" + """Opción de efecto Trémolo usada para el parámetro ``fx``. (fx trémolo)""" FX_VIBRATO: ClassVar[int] """Opción de efecto vibrato utilizada para el parámetro ``fx``.""" FX_WARBLE: ClassVar[int] @@ -70,7 +70,7 @@ class SoundEffect: """El tipo de curva de interpolación 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)""" 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): - """Crear un nuevo efecto de sonido. + """Crea un nuevo efecto de sonido. Example: ``my_effect = SoundEffect(duration=1000)`` @@ -89,7 +89,7 @@ and then change its attributes ``my_effect.duration = 500``. :param shape: (forma) El tipo de curva de interpolación 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``.""" def copy(self) -> SoundEffect: - """Crear una copia de este ``SoundEffect``. (copiar) + """Crea una copia de este ``SoundEffect``. (copiar) Example: ``sound_2 = sound_1.copy()`` @@ -108,7 +108,7 @@ Example:: frame[i] = 252 - i * 8""" def copyfrom(self, other: AudioFrame) -> None: - """Sobrescribir los datos en este ``AudioFrame`` con los datos de otra instancia de ``AudioFrame``. (copiar forma) + """Sobrescribe los datos de este ``AudioFrame`` con los datos de otra instancia ``AudioFrame``. (copiadesde) Example: ``my_frame.copyfrom(source_frame)`` diff --git a/lang/es-es/typeshed/stdlib/microbit/spi.pyi b/lang/es-es/typeshed/stdlib/microbit/spi.pyi index ad3719f..2c9582d 100644 --- a/lang/es-es/typeshed/stdlib/microbit/spi.pyi +++ b/lang/es-es/typeshed/stdlib/microbit/spi.pyi @@ -17,12 +17,13 @@ For correct communication, the parameters have to be the same on both communicat :param miso: pin MISO (por defecto, 14)""" ... -def read(nbytes: int) -> bytes: +def read(nbytes: int, out: int=0) -> bytes: """Lee bytes. (leer) Example: ``spi.read(64)`` :param nbytes: Número máximo de bytes a leer. +:param out: (a) The byte value to write (default 0). :return: The bytes read.""" ... diff --git a/lang/es-es/typeshed/stdlib/microbit/uart.pyi b/lang/es-es/typeshed/stdlib/microbit/uart.pyi index 3de8849..fc9bd04 100644 --- a/lang/es-es/typeshed/stdlib/microbit/uart.pyi +++ b/lang/es-es/typeshed/stdlib/microbit/uart.pyi @@ -29,7 +29,7 @@ For more details see `the online documentation bool: - """Comprueba si hay algún dato esperando. (algún) + """Comprueba si hay datos en espera. (algún) Example: ``uart.any()`` diff --git a/lang/es-es/typeshed/stdlib/neopixel.pyi b/lang/es-es/typeshed/stdlib/neopixel.pyi index 42555b0..03d4025 100644 --- a/lang/es-es/typeshed/stdlib/neopixel.pyi +++ b/lang/es-es/typeshed/stdlib/neopixel.pyi @@ -22,7 +22,7 @@ See `the online docs None: diff --git a/lang/fr/typeshed/stdlib/microbit/spi.pyi b/lang/fr/typeshed/stdlib/microbit/spi.pyi index 7f96bf1..08c0860 100644 --- a/lang/fr/typeshed/stdlib/microbit/spi.pyi +++ b/lang/fr/typeshed/stdlib/microbit/spi.pyi @@ -17,12 +17,13 @@ For correct communication, the parameters have to be the same on both communicat :param miso: Broche miso (14 par défaut)""" ... -def read(nbytes: int) -> bytes: +def read(nbytes: int, out: int=0) -> bytes: """Lire des octets. Example: ``spi.read(64)`` :param nbytes: Nombre maximal d'octets à lire. +:param out: The byte value to write (default 0). :return: The bytes read.""" ... diff --git a/lang/ja/typeshed/stdlib/microbit/spi.pyi b/lang/ja/typeshed/stdlib/microbit/spi.pyi index 2c42639..3fd049c 100644 --- a/lang/ja/typeshed/stdlib/microbit/spi.pyi +++ b/lang/ja/typeshed/stdlib/microbit/spi.pyi @@ -17,12 +17,13 @@ For correct communication, the parameters have to be the same on both communicat :param miso: miso 端子(デフォルトは 14)""" ... -def read(nbytes: int) -> bytes: +def read(nbytes: int, out: int=0) -> bytes: """バイト列を読み取ります。 Example: ``spi.read(64)`` :param nbytes: 読み取る最大バイト数。 +:param out: The byte value to write (default 0). :return: The bytes read.""" ... diff --git a/lang/ko/typeshed/stdlib/log.pyi b/lang/ko/typeshed/stdlib/log.pyi index 0a47d8b..3da3957 100644 --- a/lang/ko/typeshed/stdlib/log.pyi +++ b/lang/ko/typeshed/stdlib/log.pyi @@ -85,5 +85,5 @@ Example: ``log.set_mirroring(True)`` Serial mirroring is disabled by default. When enabled, it will print to serial each row logged into the log file. -:param serial: ``True`` enables mirroring data to the serial output.""" +:param serial: ``True``로 설정할 경우 시리얼 출력 인터페이스에 데이터를 미러링하는 것이 허용됩니다.""" ... \ No newline at end of file diff --git a/lang/ko/typeshed/stdlib/microbit/__init__.pyi b/lang/ko/typeshed/stdlib/microbit/__init__.pyi index 8480624..1c64b85 100644 --- a/lang/ko/typeshed/stdlib/microbit/__init__.pyi +++ b/lang/ko/typeshed/stdlib/microbit/__init__.pyi @@ -12,7 +12,7 @@ from . import spi as spi from . import uart as uart def 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]]: - """Schedule to run a function at the interval specified by the time arguments **V2 only**. + """매개 변수로 주어진 일정한 시간(밀리초, ms)마다 특정 함수를 호출합니다. **micro:bit V2 전용** Example: ``run_every(my_logging, min=5)`` @@ -36,12 +36,12 @@ So ``run_every(min=1, s=30)`` schedules the callback every minute and a half. When an exception is thrown inside the callback function it deschedules the function. To avoid this you can catch exceptions with ``try/except``. -:param callback: Function to call at the provided interval. Omit when using as a decorator. -:param days: Sets the day mark for the scheduling. -:param h: Sets the hour mark for the scheduling. -:param min: Sets the minute mark for the scheduling. -:param s: Sets the second mark for the scheduling. -:param ms: Sets the millisecond mark for the scheduling.""" +:param callback: 주어진 시간이 되었을 때 호출할 함수. 데코레이터(장식자)로 사용할 때 호출. +:param days: 함수 호출 반복 시간의 날 단위를 정합니다. +:param h: 함수 호출 반복 시간의 시간 단위를 정합니다. +:param min: 함수 호출 반복 시간의 분 단위를 정합니다. +:param s: 함수 호출 반복 시간의 초 단위를 정합니다. +:param ms: 함수 호출 반복 시간의 밀리초 단위를 정합니다.""" def panic(n: int) -> None: """패닉 모드를 활성화합니다. @@ -70,7 +70,7 @@ floating point number. temp_fahrenheit = scale(30, from_=(0.0, 100.0), to=(32.0, 212.0)) :param value: A number to convert. -:param from_: A tuple to define the range to convert from. +:param from_: 변환할 범위를 정의할 튜플 값 :param to: A tuple to define the range to convert to. :return: The ``value`` converted to the ``to`` range.""" @@ -90,7 +90,7 @@ If they are both integers (i.e ``10``), it will return an integer:: returns_int = scale(accelerometer.get_x(), from_=(-2000, 2000), to=(0, 255)) :param value: A number to convert. -:param from_: A tuple to define the range to convert from. +:param from_: 변환할 범위를 정의할 튜플 값 :param to: A tuple to define the range to convert to. :return: The ``value`` converted to the ``to`` range.""" diff --git a/lang/ko/typeshed/stdlib/microbit/spi.pyi b/lang/ko/typeshed/stdlib/microbit/spi.pyi index f01f6e9..192f1a2 100644 --- a/lang/ko/typeshed/stdlib/microbit/spi.pyi +++ b/lang/ko/typeshed/stdlib/microbit/spi.pyi @@ -17,12 +17,13 @@ For correct communication, the parameters have to be the same on both communicat :param miso: miso 핀(기본값 14)""" ... -def read(nbytes: int) -> bytes: +def read(nbytes: int, out: int=0) -> bytes: """바이트를 읽습니다. Example: ``spi.read(64)`` :param nbytes: 읽을 바이트의 최대 수입니다. +:param out: The byte value to write (default 0). :return: The bytes read.""" ... diff --git a/lang/lol/typeshed/stdlib/VERSIONS b/lang/lol/typeshed/stdlib/VERSIONS new file mode 100644 index 0000000..67b710f --- /dev/null +++ b/lang/lol/typeshed/stdlib/VERSIONS @@ -0,0 +1,50 @@ +# The structure of this file is as follows: +# - Blank lines and comments starting with `#` are ignored. +# - Lines contain the name of a module, followed by a colon, +# a space, and a version range (for example: `symbol: 2.7-3.9`). +# +# Version ranges may be of the form "X.Y-A.B" or "X.Y-". The +# first form means that a module was introduced in version X.Y and last +# available in version A.B. The second form means that the module was +# introduced in version X.Y and is still available in the latest +# version of Python. +# +# If a submodule is not listed separately, it has the same lifetime as +# its parent module. +# +# Python versions before 2.7 are ignored, so any module that was already +# present in 2.7 will have "2.7" as its minimum version. Version ranges +# for unsupported versions of Python 3 (currently 3.5 and lower) are +# generally accurate but we do not guarantee their correctness. + +antigravity: 3.0- +array: 3.0- +audio: 3.0- +builtins: 3.0- +errno: 3.0- +gc: 3.0- +love: 3.0- +machine: 3.0- +math: 3.0- +microbit: 3.0- +micropython: 3.0- +music: 3.0- +neopixel: 3.0- +os: 3.0- +radio: 3.0- +random: 3.0- +speech: 3.0- +struct: 3.0- +sys: 3.0- +this: 3.0- +time: 3.0- +typing_extensions: 3.0- +typing: 3.0- +uarray: 3.0- +ucollections: 3.0- +uerrno: 3.0- +uos: 3.0- +urandom: 3.0- +ustruct: 3.0- +usys: 3.0- +utime: 3.0- \ No newline at end of file diff --git a/lang/lol/typeshed/stdlib/_typeshed/__init__.pyi b/lang/lol/typeshed/stdlib/_typeshed/__init__.pyi new file mode 100644 index 0000000..7bf6e72 --- /dev/null +++ b/lang/lol/typeshed/stdlib/_typeshed/__init__.pyi @@ -0,0 +1,168 @@ +# Utility types for typeshed +# +# See the README.md file in this directory for more information. + +import array +import sys +from os import PathLike +from typing import AbstractSet, Any, Container, Iterable, Protocol, Tuple, TypeVar, Union +from typing_extensions import Literal, final + +_KT = TypeVar("_KT") +_KT_co = TypeVar("_KT_co", covariant=True) +_KT_contra = TypeVar("_KT_contra", contravariant=True) +_VT = TypeVar("_VT") +_VT_co = TypeVar("_VT_co", covariant=True) +_T = TypeVar("_T") +_T_co = TypeVar("_T_co", covariant=True) +_T_contra = TypeVar("_T_contra", contravariant=True) + +# Use for "self" annotations: +# def __enter__(self: Self) -> Self: ... +Self = TypeVar("Self") # noqa Y001 + +# stable +class IdentityFunction(Protocol): + def __call__(self, __x: _T) -> _T: ... + +class SupportsLessThan(Protocol): + def __lt__(self, __other: Any) -> bool: ... + +SupportsLessThanT = TypeVar("SupportsLessThanT", bound=SupportsLessThan) # noqa: Y001 + +class SupportsDivMod(Protocol[_T_contra, _T_co]): + def __divmod__(self, __other: _T_contra) -> _T_co: ... + +class SupportsRDivMod(Protocol[_T_contra, _T_co]): + def __rdivmod__(self, __other: _T_contra) -> _T_co: ... + +class SupportsLenAndGetItem(Protocol[_T_co]): + def __len__(self) -> int: ... + def __getitem__(self, __k: int) -> _T_co: ... + +# Mapping-like protocols + +# stable +class SupportsItems(Protocol[_KT_co, _VT_co]): + def items(self) -> AbstractSet[Tuple[_KT_co, _VT_co]]: ... + +# stable +class SupportsKeysAndGetItem(Protocol[_KT, _VT_co]): + def keys(self) -> Iterable[_KT]: ... + def __getitem__(self, __k: _KT) -> _VT_co: ... + +# stable +class SupportsGetItem(Container[_KT_contra], Protocol[_KT_contra, _VT_co]): + def __getitem__(self, __k: _KT_contra) -> _VT_co: ... + +# stable +class SupportsItemAccess(SupportsGetItem[_KT_contra, _VT], Protocol[_KT_contra, _VT]): + def __setitem__(self, __k: _KT_contra, __v: _VT) -> None: ... + def __delitem__(self, __v: _KT_contra) -> None: ... + +# These aliases are simple strings in Python 2. +StrPath = Union[str, PathLike[str]] # stable +BytesPath = Union[bytes, PathLike[bytes]] # stable +StrOrBytesPath = Union[str, bytes, PathLike[str], PathLike[bytes]] # stable + +OpenTextModeUpdating = Literal[ + "r+", + "+r", + "rt+", + "r+t", + "+rt", + "tr+", + "t+r", + "+tr", + "w+", + "+w", + "wt+", + "w+t", + "+wt", + "tw+", + "t+w", + "+tw", + "a+", + "+a", + "at+", + "a+t", + "+at", + "ta+", + "t+a", + "+ta", + "x+", + "+x", + "xt+", + "x+t", + "+xt", + "tx+", + "t+x", + "+tx", +] +OpenTextModeWriting = Literal["w", "wt", "tw", "a", "at", "ta", "x", "xt", "tx"] +OpenTextModeReading = Literal["r", "rt", "tr", "U", "rU", "Ur", "rtU", "rUt", "Urt", "trU", "tUr", "Utr"] +OpenTextMode = Union[OpenTextModeUpdating, OpenTextModeWriting, OpenTextModeReading] +OpenBinaryModeUpdating = Literal[ + "rb+", + "r+b", + "+rb", + "br+", + "b+r", + "+br", + "wb+", + "w+b", + "+wb", + "bw+", + "b+w", + "+bw", + "ab+", + "a+b", + "+ab", + "ba+", + "b+a", + "+ba", + "xb+", + "x+b", + "+xb", + "bx+", + "b+x", + "+bx", +] +OpenBinaryModeWriting = Literal["wb", "bw", "ab", "ba", "xb", "bx"] +OpenBinaryModeReading = Literal["rb", "br", "rbU", "rUb", "Urb", "brU", "bUr", "Ubr"] +OpenBinaryMode = Union[OpenBinaryModeUpdating, OpenBinaryModeReading, OpenBinaryModeWriting] + +# stable +class HasFileno(Protocol): + def fileno(self) -> int: ... + +FileDescriptor = int # stable +FileDescriptorLike = Union[int, HasFileno] # stable + +# stable +class SupportsRead(Protocol[_T_co]): + def read(self, __length: int = ...) -> _T_co: ... + +# stable +class SupportsReadline(Protocol[_T_co]): + def readline(self, __length: int = ...) -> _T_co: ... + +# stable +class SupportsNoArgReadline(Protocol[_T_co]): + def readline(self) -> _T_co: ... + +# stable +class SupportsWrite(Protocol[_T_contra]): + def write(self, __s: _T_contra) -> Any: ... + +ReadableBuffer = Union[bytes, bytearray, memoryview, array.array[Any]] # stable +WriteableBuffer = Union[bytearray, memoryview, array.array[Any]] # stable + +# stable +if sys.version_info >= (3, 10): + from types import NoneType as NoneType +else: + # Used by type checkers for checks involving None (does not exist at runtime) + @final + class NoneType: + def __bool__(self) -> Literal[False]: ... diff --git a/lang/lol/typeshed/stdlib/abc.pyi b/lang/lol/typeshed/stdlib/abc.pyi new file mode 100644 index 0000000..18bb090 --- /dev/null +++ b/lang/lol/typeshed/stdlib/abc.pyi @@ -0,0 +1,28 @@ +from _typeshed import SupportsWrite +from typing import Any, Callable, Tuple, Type, TypeVar + +_T = TypeVar("_T") +_FuncT = TypeVar("_FuncT", bound=Callable[..., Any]) + +# These definitions have special processing in mypy +class ABCMeta(type): + __abstractmethods__: frozenset[str] + def __init__( + self, name: str, bases: Tuple[type, ...], namespace: dict[str, Any] + ) -> None: ... + def __instancecheck__(cls: ABCMeta, instance: Any) -> Any: ... + def __subclasscheck__(cls: ABCMeta, subclass: Any) -> Any: ... + def _dump_registry(cls: ABCMeta, file: SupportsWrite[str] | None = ...) -> None: ... + def register(cls: ABCMeta, subclass: Type[_T]) -> Type[_T]: ... + +def abstractmethod(funcobj: _FuncT) -> _FuncT: ... + +class abstractproperty(property): ... + +# These two are deprecated and not supported by mypy +def abstractstaticmethod(callable: _FuncT) -> _FuncT: ... +def abstractclassmethod(callable: _FuncT) -> _FuncT: ... + +class ABC(metaclass=ABCMeta): ... + +def get_cache_token() -> object: ... diff --git a/lang/lol/typeshed/stdlib/antigravity.pyi b/lang/lol/typeshed/stdlib/antigravity.pyi new file mode 100644 index 0000000..e69de29 diff --git a/lang/lol/typeshed/stdlib/array.pyi b/lang/lol/typeshed/stdlib/array.pyi new file mode 100644 index 0000000..1e4e630 --- /dev/null +++ b/lang/lol/typeshed/stdlib/array.pyi @@ -0,0 +1,42 @@ +from typing import Generic, Iterable, MutableSequence, TypeVar, Union, overload +from typing_extensions import Literal + +_IntTypeCode = Literal["b", "B", "h", "H", "i", "I", "l", "L", "q", "Q"] +_FloatTypeCode = Literal["f", "d"] +_TypeCode = Union[_IntTypeCode, _FloatTypeCode] + +_T = TypeVar("_T", int, float) + +class array(MutableSequence[_T], Generic[_T]): + @overload + def __init__( + self: array[int], + typecode: _IntTypeCode, + __initializer: Union[bytes, Iterable[_T]] = ..., + ) -> None: ... + @overload + def __init__( + self: array[float], + typecode: _FloatTypeCode, + __initializer: Union[bytes, Iterable[_T]] = ..., + ) -> None: ... + @overload + def __init__( + self, typecode: str, __initializer: Union[bytes, Iterable[_T]] = ... + ) -> None: ... + def append(self, __v: _T) -> None: ... + def decode(self) -> str: ... + def extend(self, __bb: Iterable[_T]) -> None: ... + def __len__(self) -> int: ... + @overload + def __getitem__(self, i: int) -> _T: ... + @overload + def __getitem__(self, s: slice) -> array[_T]: ... + @overload # type: ignore # Overrides MutableSequence + def __setitem__(self, i: int, o: _T) -> None: ... + @overload + def __setitem__(self, s: slice, o: array[_T]) -> None: ... + def __add__(self, x: array[_T]) -> array[_T]: ... + def __iadd__(self, x: array[_T]) -> array[_T]: ... # type: ignore # Overrides MutableSequence + +ArrayType = array diff --git a/lang/lol/typeshed/stdlib/audio.pyi b/lang/lol/typeshed/stdlib/audio.pyi new file mode 100644 index 0000000..b1d39c7 --- /dev/null +++ b/lang/lol/typeshed/stdlib/audio.pyi @@ -0,0 +1,11 @@ +"""Play sounds using the micro:bit (import ``audio`` for V1 compatibility). +""" + +# Re-export for V1 compatibility. +from .microbit.audio import ( + is_playing as is_playing, + play as play, + stop as stop, + AudioFrame as AudioFrame, + SoundEffect as SoundEffect, +) diff --git a/lang/lol/typeshed/stdlib/builtins.pyi b/lang/lol/typeshed/stdlib/builtins.pyi new file mode 100644 index 0000000..8b7dfb9 --- /dev/null +++ b/lang/lol/typeshed/stdlib/builtins.pyi @@ -0,0 +1,1334 @@ +import sys +import types +from _typeshed import ( + OpenBinaryMode, + OpenTextMode, + ReadableBuffer, + Self, + StrOrBytesPath, + SupportsDivMod, + SupportsKeysAndGetItem, + SupportsLenAndGetItem, + SupportsLessThan, + SupportsLessThanT, + SupportsRDivMod, + SupportsWrite, +) +from types import CodeType, TracebackType +from typing import ( + IO, + AbstractSet, + Any, + AsyncIterable, + AsyncIterator, + BinaryIO, + ByteString, + Callable, + FrozenSet, + Generic, + ItemsView, + Iterable, + Iterator, + KeysView, + Mapping, + MutableMapping, + MutableSequence, + MutableSet, + NoReturn, + Protocol, + Reversible, + Sequence, + Set, + Sized, + SupportsAbs, + SupportsBytes, + SupportsComplex, + SupportsFloat, + SupportsInt, + SupportsRound, + TextIO, + Tuple, + Type, + TypeVar, + Union, + ValuesView, + overload, +) +from typing_extensions import Literal, SupportsIndex, final + +if sys.version_info >= (3, 9): + from types import GenericAlias + +class _SupportsTrunc(Protocol): + def __trunc__(self) -> int: ... + +_T = TypeVar("_T") +_T_co = TypeVar("_T_co", covariant=True) +_T_contra = TypeVar("_T_contra", contravariant=True) +_KT = TypeVar("_KT") +_VT = TypeVar("_VT") +_S = TypeVar("_S") +_T1 = TypeVar("_T1") +_T2 = TypeVar("_T2") +_T3 = TypeVar("_T3") +_T4 = TypeVar("_T4") +_T5 = TypeVar("_T5") +_TT = TypeVar("_TT", bound="type") +_TBE = TypeVar("_TBE", bound="BaseException") + +class object: + __doc__: str | None + __dict__: dict[str, Any] + __slots__: str | Iterable[str] + __module__: str + __annotations__: dict[str, Any] + @property + def __class__(self: _T) -> Type[_T]: ... + # Ignore errors about type mismatch between property getter and setter + @__class__.setter + def __class__(self, __type: Type[object]) -> None: ... # type: ignore # noqa: F811 + def __init__(self) -> None: ... + def __new__(cls: Type[_T]) -> _T: ... + def __setattr__(self, name: str, value: Any) -> None: ... + def __eq__(self, o: object) -> bool: ... + def __ne__(self, o: object) -> bool: ... + def __str__(self) -> str: ... + def __repr__(self) -> str: ... + def __hash__(self) -> int: ... + def __format__(self, format_spec: str) -> str: ... + def __getattribute__(self, name: str) -> Any: ... + def __delattr__(self, name: str) -> None: ... + def __sizeof__(self) -> int: ... + def __reduce__(self) -> str | Tuple[Any, ...]: ... + if sys.version_info >= (3, 8): + def __reduce_ex__(self, protocol: SupportsIndex) -> str | Tuple[Any, ...]: ... + else: + def __reduce_ex__(self, protocol: int) -> str | Tuple[Any, ...]: ... + def __dir__(self) -> Iterable[str]: ... + def __init_subclass__(cls) -> None: ... + +class staticmethod(object): # Special, only valid as a decorator. + __func__: Callable[..., Any] + __isabstractmethod__: bool + def __init__(self, f: Callable[..., Any]) -> None: ... + def __new__(cls: Type[_T], *args: Any, **kwargs: Any) -> _T: ... + def __get__(self, obj: _T, type: Type[_T] | None = ...) -> Callable[..., Any]: ... + +class classmethod(object): # Special, only valid as a decorator. + __func__: Callable[..., Any] + __isabstractmethod__: bool + def __init__(self, f: Callable[..., Any]) -> None: ... + def __new__(cls: Type[_T], *args: Any, **kwargs: Any) -> _T: ... + def __get__(self, obj: _T, type: Type[_T] | None = ...) -> Callable[..., Any]: ... + +class type(object): + __base__: type + __bases__: Tuple[type, ...] + __basicsize__: int + __dict__: dict[str, Any] + __dictoffset__: int + __flags__: int + __itemsize__: int + __module__: str + __name__: str + __qualname__: str + __text_signature__: str | None + __weakrefoffset__: int + @overload + def __init__(self, o: object) -> None: ... + @overload + def __init__( + self, name: str, bases: Tuple[type, ...], dict: dict[str, Any], **kwds: Any + ) -> None: ... + @overload + def __new__(cls, o: object) -> type: ... + @overload + def __new__( + cls: Type[_TT], + name: str, + bases: Tuple[type, ...], + namespace: dict[str, Any], + **kwds: Any, + ) -> _TT: ... + def __call__(self, *args: Any, **kwds: Any) -> Any: ... + def __subclasses__(self: _TT) -> list[_TT]: ... + def __instancecheck__(self, instance: Any) -> bool: ... + def __subclasscheck__(self, subclass: type) -> bool: ... + @classmethod + def __prepare__( + metacls, __name: str, __bases: Tuple[type, ...], **kwds: Any + ) -> Mapping[str, Any]: ... + if sys.version_info >= (3, 10): + def __or__(self, t: Any) -> types.UnionType: ... + def __ror__(self, t: Any) -> types.UnionType: ... + +class super(object): + @overload + def __init__(self, t: Any, obj: Any) -> None: ... + @overload + def __init__(self, t: Any) -> None: ... + @overload + def __init__(self) -> None: ... + +class int: + @overload + def __new__( + cls: Type[_T], + x: str | bytes | SupportsInt | SupportsIndex | _SupportsTrunc = ..., + ) -> _T: ... + @overload + def __new__( + cls: Type[_T], x: str | bytes | bytearray, base: SupportsIndex + ) -> _T: ... + def to_bytes( + self, + length: SupportsIndex, + byteorder: Literal["little", "big"], + *, + signed: bool = ..., + ) -> bytes: ... + @classmethod + def from_bytes( + cls, + bytes: Iterable[SupportsIndex] | SupportsBytes, + byteorder: Literal["little", "big"], + *, + signed: bool = ..., + ) -> int: ... # TODO buffer object argument + def __add__(self, x: int) -> int: ... + def __sub__(self, x: int) -> int: ... + def __mul__(self, x: int) -> int: ... + def __floordiv__(self, x: int) -> int: ... + def __truediv__(self, x: int) -> float: ... + def __mod__(self, x: int) -> int: ... + def __divmod__(self, x: int) -> Tuple[int, int]: ... + def __radd__(self, x: int) -> int: ... + def __rsub__(self, x: int) -> int: ... + def __rmul__(self, x: int) -> int: ... + def __rfloordiv__(self, x: int) -> int: ... + def __rtruediv__(self, x: int) -> float: ... + def __rmod__(self, x: int) -> int: ... + def __rdivmod__(self, x: int) -> Tuple[int, int]: ... + @overload + def __pow__(self, __x: Literal[2], __modulo: int | None = ...) -> int: ... + @overload + def __pow__( + self, __x: int, __modulo: int | None = ... + ) -> Any: ... # Return type can be int or float, depending on x. + def __rpow__(self, x: int, mod: int | None = ...) -> Any: ... + def __and__(self, n: int) -> int: ... + def __or__(self, n: int) -> int: ... + def __xor__(self, n: int) -> int: ... + def __lshift__(self, n: int) -> int: ... + def __rshift__(self, n: int) -> int: ... + def __rand__(self, n: int) -> int: ... + def __ror__(self, n: int) -> int: ... + def __rxor__(self, n: int) -> int: ... + def __rlshift__(self, n: int) -> int: ... + def __rrshift__(self, n: int) -> int: ... + def __neg__(self) -> int: ... + def __pos__(self) -> int: ... + def __invert__(self) -> int: ... + def __trunc__(self) -> int: ... + def __ceil__(self) -> int: ... + def __floor__(self) -> int: ... + def __round__(self, ndigits: SupportsIndex = ...) -> int: ... + def __getnewargs__(self) -> Tuple[int]: ... + def __eq__(self, x: object) -> bool: ... + def __ne__(self, x: object) -> bool: ... + def __lt__(self, x: int) -> bool: ... + def __le__(self, x: int) -> bool: ... + def __gt__(self, x: int) -> bool: ... + def __ge__(self, x: int) -> bool: ... + def __str__(self) -> str: ... + def __float__(self) -> float: ... + def __int__(self) -> int: ... + def __abs__(self) -> int: ... + def __hash__(self) -> int: ... + def __bool__(self) -> bool: ... + def __index__(self) -> int: ... + +class float: + def __new__( + cls: Type[_T], x: SupportsFloat | SupportsIndex | str | bytes | bytearray = ... + ) -> _T: ... + def __add__(self, x: float) -> float: ... + def __sub__(self, x: float) -> float: ... + def __mul__(self, x: float) -> float: ... + def __floordiv__(self, x: float) -> float: ... + def __truediv__(self, x: float) -> float: ... + def __mod__(self, x: float) -> float: ... + def __divmod__(self, x: float) -> Tuple[float, float]: ... + def __pow__( + self, x: float, mod: None = ... + ) -> float: ... # In Python 3, returns complex if self is negative and x is not whole + def __radd__(self, x: float) -> float: ... + def __rsub__(self, x: float) -> float: ... + def __rmul__(self, x: float) -> float: ... + def __rfloordiv__(self, x: float) -> float: ... + def __rtruediv__(self, x: float) -> float: ... + def __rmod__(self, x: float) -> float: ... + def __rdivmod__(self, x: float) -> Tuple[float, float]: ... + def __rpow__(self, x: float, mod: None = ...) -> float: ... + def __getnewargs__(self) -> Tuple[float]: ... + def __trunc__(self) -> int: ... + if sys.version_info >= (3, 9): + def __ceil__(self) -> int: ... + def __floor__(self) -> int: ... + @overload + def __round__(self, ndigits: None = ...) -> int: ... + @overload + def __round__(self, ndigits: SupportsIndex) -> float: ... + def __eq__(self, x: object) -> bool: ... + def __ne__(self, x: object) -> bool: ... + def __lt__(self, x: float) -> bool: ... + def __le__(self, x: float) -> bool: ... + def __gt__(self, x: float) -> bool: ... + def __ge__(self, x: float) -> bool: ... + def __neg__(self) -> float: ... + def __pos__(self) -> float: ... + def __str__(self) -> str: ... + def __int__(self) -> int: ... + def __float__(self) -> float: ... + def __abs__(self) -> float: ... + def __hash__(self) -> int: ... + def __bool__(self) -> bool: ... + +class complex: + @overload + def __new__(cls: Type[_T], real: float = ..., imag: float = ...) -> _T: ... + @overload + def __new__( + cls: Type[_T], real: str | SupportsComplex | SupportsIndex | complex + ) -> _T: ... + @property + def real(self) -> float: ... + @property + def imag(self) -> float: ... + def __add__(self, x: complex) -> complex: ... + def __sub__(self, x: complex) -> complex: ... + def __mul__(self, x: complex) -> complex: ... + def __pow__(self, x: complex, mod: None = ...) -> complex: ... + def __truediv__(self, x: complex) -> complex: ... + def __radd__(self, x: complex) -> complex: ... + def __rsub__(self, x: complex) -> complex: ... + def __rmul__(self, x: complex) -> complex: ... + def __rpow__(self, x: complex, mod: None = ...) -> complex: ... + def __rtruediv__(self, x: complex) -> complex: ... + def __eq__(self, x: object) -> bool: ... + def __ne__(self, x: object) -> bool: ... + def __neg__(self) -> complex: ... + def __pos__(self) -> complex: ... + def __str__(self) -> str: ... + def __abs__(self) -> float: ... + def __hash__(self) -> int: ... + def __bool__(self) -> bool: ... + +class str(Sequence[str]): + @overload + def __new__(cls: Type[_T], o: object = ...) -> _T: ... + @overload + def __new__( + cls: Type[_T], o: bytes, encoding: str = ..., errors: str = ... + ) -> _T: ... + def count( + self, + x: str, + __start: SupportsIndex | None = ..., + __end: SupportsIndex | None = ..., + ) -> int: ... + def encode(self, encoding: str = ..., errors: str = ...) -> bytes: ... + def endswith( + self, + __suffix: str | Tuple[str, ...], + __start: SupportsIndex | None = ..., + __end: SupportsIndex | None = ..., + ) -> bool: ... + def find( + self, + __sub: str, + __start: SupportsIndex | None = ..., + __end: SupportsIndex | None = ..., + ) -> int: ... + def format(self, *args: object, **kwargs: object) -> str: ... + def index( + self, + __sub: str, + __start: SupportsIndex | None = ..., + __end: SupportsIndex | None = ..., + ) -> int: ... + def isalpha(self) -> bool: ... + def isdigit(self) -> bool: ... + def islower(self) -> bool: ... + def isspace(self) -> bool: ... + def isupper(self) -> bool: ... + def join(self, __iterable: Iterable[str]) -> str: ... + def lower(self) -> str: ... + def lstrip(self, __chars: str | None = ...) -> str: ... + def replace(self, __old: str, __new: str, __count: SupportsIndex = ...) -> str: ... + def rfind( + self, + __sub: str, + __start: SupportsIndex | None = ..., + __end: SupportsIndex | None = ..., + ) -> int: ... + def rindex( + self, + __sub: str, + __start: SupportsIndex | None = ..., + __end: SupportsIndex | None = ..., + ) -> int: ... + def rsplit( + self, sep: str | None = ..., maxsplit: SupportsIndex = ... + ) -> list[str]: ... + def rstrip(self, __chars: str | None = ...) -> str: ... + def split( + self, sep: str | None = ..., maxsplit: SupportsIndex = ... + ) -> list[str]: ... + def startswith( + self, + __prefix: str | Tuple[str, ...], + __start: SupportsIndex | None = ..., + __end: SupportsIndex | None = ..., + ) -> bool: ... + def strip(self, __chars: str | None = ...) -> str: ... + def upper(self) -> str: ... + def __add__(self, s: str) -> str: ... + # Incompatible with Sequence.__contains__ + def __contains__(self, o: str) -> bool: ... # type: ignore + def __eq__(self, x: object) -> bool: ... + def __ge__(self, x: str) -> bool: ... + def __getitem__(self, i: int | slice) -> str: ... + def __gt__(self, x: str) -> bool: ... + def __hash__(self) -> int: ... + def __iter__(self) -> Iterator[str]: ... + def __le__(self, x: str) -> bool: ... + def __len__(self) -> int: ... + def __lt__(self, x: str) -> bool: ... + def __mod__(self, x: Any) -> str: ... + def __mul__(self, n: SupportsIndex) -> str: ... + def __ne__(self, x: object) -> bool: ... + def __repr__(self) -> str: ... + def __rmul__(self, n: SupportsIndex) -> str: ... + def __str__(self) -> str: ... + def __getnewargs__(self) -> Tuple[str]: ... + +class bytes(ByteString): + @overload + def __new__(cls: Type[_T], ints: Iterable[SupportsIndex]) -> _T: ... + @overload + def __new__(cls: Type[_T], string: str, encoding: str, errors: str = ...) -> _T: ... + @overload + def __new__(cls: Type[_T], length: SupportsIndex) -> _T: ... + @overload + def __new__(cls: Type[_T]) -> _T: ... + @overload + def __new__(cls: Type[_T], o: SupportsBytes) -> _T: ... + def count( + self, + __sub: bytes | SupportsIndex, + __start: SupportsIndex | None = ..., + __end: SupportsIndex | None = ..., + ) -> int: ... + def decode(self, encoding: str = ..., errors: str = ...) -> str: ... + def endswith( + self, + __suffix: bytes | Tuple[bytes, ...], + __start: SupportsIndex | None = ..., + __end: SupportsIndex | None = ..., + ) -> bool: ... + def find( + self, + __sub: bytes | SupportsIndex, + __start: SupportsIndex | None = ..., + __end: SupportsIndex | None = ..., + ) -> int: ... + def index( + self, + __sub: bytes | SupportsIndex, + __start: SupportsIndex | None = ..., + __end: SupportsIndex | None = ..., + ) -> int: ... + def isalpha(self) -> bool: ... + def isdigit(self) -> bool: ... + def islower(self) -> bool: ... + def isspace(self) -> bool: ... + def isupper(self) -> bool: ... + def join(self, __iterable_of_bytes: Iterable[ByteString | memoryview]) -> bytes: ... + def lower(self) -> bytes: ... + def lstrip(self, __bytes: bytes | None = ...) -> bytes: ... + def replace( + self, __old: bytes, __new: bytes, __count: SupportsIndex = ... + ) -> bytes: ... + def rfind( + self, + __sub: bytes | SupportsIndex, + __start: SupportsIndex | None = ..., + __end: SupportsIndex | None = ..., + ) -> int: ... + def rindex( + self, + __sub: bytes | SupportsIndex, + __start: SupportsIndex | None = ..., + __end: SupportsIndex | None = ..., + ) -> int: ... + def rsplit( + self, sep: bytes | None = ..., maxsplit: SupportsIndex = ... + ) -> list[bytes]: ... + def rstrip(self, __bytes: bytes | None = ...) -> bytes: ... + def split( + self, sep: bytes | None = ..., maxsplit: SupportsIndex = ... + ) -> list[bytes]: ... + def startswith( + self, + __prefix: bytes | Tuple[bytes, ...], + __start: SupportsIndex | None = ..., + __end: SupportsIndex | None = ..., + ) -> bool: ... + def strip(self, __bytes: bytes | None = ...) -> bytes: ... + def upper(self) -> bytes: ... + def __len__(self) -> int: ... + def __iter__(self) -> Iterator[int]: ... + def __str__(self) -> str: ... + def __repr__(self) -> str: ... + def __hash__(self) -> int: ... + @overload + def __getitem__(self, i: SupportsIndex) -> int: ... + @overload + def __getitem__(self, s: slice) -> bytes: ... + def __add__(self, s: bytes) -> bytes: ... + def __mul__(self, n: SupportsIndex) -> bytes: ... + def __rmul__(self, n: SupportsIndex) -> bytes: ... + def __mod__(self, value: Any) -> bytes: ... + # Incompatible with Sequence.__contains__ + def __contains__(self, o: SupportsIndex | bytes) -> bool: ... # type: ignore + def __eq__(self, x: object) -> bool: ... + def __ne__(self, x: object) -> bool: ... + def __lt__(self, x: bytes) -> bool: ... + def __le__(self, x: bytes) -> bool: ... + def __gt__(self, x: bytes) -> bool: ... + def __ge__(self, x: bytes) -> bool: ... + def __getnewargs__(self) -> Tuple[bytes]: ... + +class bytearray: + @overload + def __init__(self) -> None: ... + @overload + def __init__(self, ints: Iterable[SupportsIndex]) -> None: ... + @overload + def __init__(self, string: str, encoding: str, errors: str = ...) -> None: ... + @overload + def __init__(self, length: SupportsIndex) -> None: ... + def append(self, __item: SupportsIndex) -> None: ... + def decode(self, encoding: str = ..., errors: str = ...) -> str: ... + def extend(self, __iterable_of_ints: Iterable[SupportsIndex]) -> None: ... + def __len__(self) -> int: ... + def __iter__(self) -> Iterator[int]: ... + def __str__(self) -> str: ... + def __repr__(self) -> str: ... + __hash__: None # type: ignore + @overload + def __getitem__(self, i: SupportsIndex) -> int: ... + @overload + def __getitem__(self, s: slice) -> bytearray: ... + @overload + def __setitem__(self, i: SupportsIndex, x: SupportsIndex) -> None: ... + @overload + def __setitem__(self, s: slice, x: Iterable[SupportsIndex] | bytes) -> None: ... + def __delitem__(self, i: SupportsIndex | slice) -> None: ... + def __add__(self, s: bytes) -> bytearray: ... + def __iadd__(self, s: Iterable[int]) -> bytearray: ... + def __mul__(self, n: SupportsIndex) -> bytearray: ... + def __rmul__(self, n: SupportsIndex) -> bytearray: ... + def __imul__(self, n: SupportsIndex) -> bytearray: ... + def __mod__(self, value: Any) -> bytes: ... + # Incompatible with Sequence.__contains__ + def __contains__(self, o: SupportsIndex | bytes) -> bool: ... # type: ignore + def __eq__(self, x: object) -> bool: ... + def __ne__(self, x: object) -> bool: ... + def __lt__(self, x: bytes) -> bool: ... + def __le__(self, x: bytes) -> bool: ... + def __gt__(self, x: bytes) -> bool: ... + def __ge__(self, x: bytes) -> bool: ... + +class memoryview(Sized, Sequence[int]): + def __init__(self, obj: ReadableBuffer) -> None: ... + @overload + def __getitem__(self, i: SupportsIndex) -> int: ... + @overload + def __getitem__(self, s: slice) -> memoryview: ... + def __contains__(self, x: object) -> bool: ... + def __iter__(self) -> Iterator[int]: ... + def __len__(self) -> int: ... + @overload + def __setitem__(self, s: slice, o: bytes) -> None: ... + @overload + def __setitem__(self, i: SupportsIndex, o: SupportsIndex) -> None: ... + +@final +class bool(int): + def __new__(cls: Type[_T], __o: object = ...) -> _T: ... + @overload + def __and__(self, x: bool) -> bool: ... + @overload + def __and__(self, x: int) -> int: ... + @overload + def __or__(self, x: bool) -> bool: ... + @overload + def __or__(self, x: int) -> int: ... + @overload + def __xor__(self, x: bool) -> bool: ... + @overload + def __xor__(self, x: int) -> int: ... + @overload + def __rand__(self, x: bool) -> bool: ... + @overload + def __rand__(self, x: int) -> int: ... + @overload + def __ror__(self, x: bool) -> bool: ... + @overload + def __ror__(self, x: int) -> int: ... + @overload + def __rxor__(self, x: bool) -> bool: ... + @overload + def __rxor__(self, x: int) -> int: ... + def __getnewargs__(self) -> Tuple[int]: ... + +class slice(object): + start: Any + step: Any + stop: Any + __hash__: None # type: ignore + def indices(self, len: SupportsIndex) -> Tuple[int, int, int]: ... + +class tuple(Sequence[_T_co], Generic[_T_co]): + def __new__(cls: Type[_T], iterable: Iterable[_T_co] = ...) -> _T: ... + def __len__(self) -> int: ... + def __contains__(self, x: object) -> bool: ... + @overload + def __getitem__(self, x: int) -> _T_co: ... + @overload + def __getitem__(self, x: slice) -> Tuple[_T_co, ...]: ... + def __iter__(self) -> Iterator[_T_co]: ... + def __lt__(self, x: Tuple[_T_co, ...]) -> bool: ... + def __le__(self, x: Tuple[_T_co, ...]) -> bool: ... + def __gt__(self, x: Tuple[_T_co, ...]) -> bool: ... + def __ge__(self, x: Tuple[_T_co, ...]) -> bool: ... + @overload + def __add__(self, x: Tuple[_T_co, ...]) -> Tuple[_T_co, ...]: ... + @overload + def __add__(self, x: Tuple[_T, ...]) -> Tuple[_T_co | _T, ...]: ... + def __mul__(self, n: SupportsIndex) -> Tuple[_T_co, ...]: ... + def __rmul__(self, n: SupportsIndex) -> Tuple[_T_co, ...]: ... + def count(self, __value: Any) -> int: ... + def index( + self, __value: Any, __start: SupportsIndex = ..., __stop: SupportsIndex = ... + ) -> int: ... + +# Can we remove this? +class function: + # TODO not defined in builtins! + __name__: str + __module__: str + __code__: CodeType + __qualname__: str + __annotations__: dict[str, Any] + +class frozenset(AbstractSet[_T_co], Generic[_T_co]): + @overload + def __new__(cls: type[Self]) -> Self: ... + @overload + def __new__(cls: type[Self], __iterable: Iterable[_T_co]) -> Self: ... + def copy(self) -> FrozenSet[_T_co]: ... + def difference(self, *s: Iterable[object]) -> FrozenSet[_T_co]: ... + def intersection(self, *s: Iterable[object]) -> FrozenSet[_T_co]: ... + def isdisjoint(self, s: Iterable[_T_co]) -> bool: ... + def issubset(self, s: Iterable[object]) -> bool: ... + def issuperset(self, s: Iterable[object]) -> bool: ... + def symmetric_difference(self, s: Iterable[_T_co]) -> FrozenSet[_T_co]: ... + def union(self, *s: Iterable[_T_co]) -> FrozenSet[_T_co]: ... + def __len__(self) -> int: ... + def __contains__(self, o: object) -> bool: ... + def __iter__(self) -> Iterator[_T_co]: ... + def __str__(self) -> str: ... + def __and__(self, s: AbstractSet[_T_co]) -> FrozenSet[_T_co]: ... + def __or__(self, s: AbstractSet[_S]) -> FrozenSet[_T_co | _S]: ... + def __sub__(self, s: AbstractSet[_T_co]) -> FrozenSet[_T_co]: ... + def __xor__(self, s: AbstractSet[_S]) -> FrozenSet[_T_co | _S]: ... + def __le__(self, s: AbstractSet[object]) -> bool: ... + def __lt__(self, s: AbstractSet[object]) -> bool: ... + def __ge__(self, s: AbstractSet[object]) -> bool: ... + def __gt__(self, s: AbstractSet[object]) -> bool: ... + if sys.version_info >= (3, 9): + def __class_getitem__(cls, item: Any) -> GenericAlias: ... + +class list(MutableSequence[_T], Generic[_T]): + @overload + def __init__(self) -> None: ... + @overload + def __init__(self, iterable: Iterable[_T]) -> None: ... + def clear(self) -> None: ... + def copy(self) -> list[_T]: ... + def append(self, __object: _T) -> None: ... + def extend(self, __iterable: Iterable[_T]) -> None: ... + def pop(self, __index: SupportsIndex = ...) -> _T: ... + def index( + self, __value: _T, __start: SupportsIndex = ..., __stop: SupportsIndex = ... + ) -> int: ... + def count(self, __value: _T) -> int: ... + def insert(self, __index: SupportsIndex, __object: _T) -> None: ... + def remove(self, __value: _T) -> None: ... + def reverse(self) -> None: ... + @overload + def sort( + self: list[SupportsLessThanT], *, key: None = ..., reverse: bool = ... + ) -> None: ... + @overload + def sort( + self, *, key: Callable[[_T], SupportsLessThan], reverse: bool = ... + ) -> None: ... + def __len__(self) -> int: ... + def __iter__(self) -> Iterator[_T]: ... + def __str__(self) -> str: ... + __hash__: None # type: ignore + @overload + def __getitem__(self, i: SupportsIndex) -> _T: ... + @overload + def __getitem__(self, s: slice) -> list[_T]: ... + @overload + def __setitem__(self, i: SupportsIndex, o: _T) -> None: ... + @overload + def __setitem__(self, s: slice, o: Iterable[_T]) -> None: ... + def __delitem__(self, i: SupportsIndex | slice) -> None: ... + def __add__(self, x: list[_T]) -> list[_T]: ... + def __iadd__(self: _S, x: Iterable[_T]) -> _S: ... + def __mul__(self, n: SupportsIndex) -> list[_T]: ... + def __rmul__(self, n: SupportsIndex) -> list[_T]: ... + def __imul__(self: _S, n: SupportsIndex) -> _S: ... + def __contains__(self, o: object) -> bool: ... + def __reversed__(self) -> Iterator[_T]: ... + def __gt__(self, x: list[_T]) -> bool: ... + def __ge__(self, x: list[_T]) -> bool: ... + def __lt__(self, x: list[_T]) -> bool: ... + def __le__(self, x: list[_T]) -> bool: ... + if sys.version_info >= (3, 9): + def __class_getitem__(cls, item: Any) -> GenericAlias: ... + +class dict(MutableMapping[_KT, _VT], Generic[_KT, _VT]): + @overload + def __init__(self: dict[_KT, _VT]) -> None: ... + @overload + def __init__(self: dict[str, _VT], **kwargs: _VT) -> None: ... + @overload + def __init__( + self, map: SupportsKeysAndGetItem[_KT, _VT], **kwargs: _VT + ) -> None: ... + @overload + def __init__(self, iterable: Iterable[Tuple[_KT, _VT]], **kwargs: _VT) -> None: ... + def __new__(cls: Type[_T1], *args: Any, **kwargs: Any) -> _T1: ... + def clear(self) -> None: ... + def copy(self) -> dict[_KT, _VT]: ... + def popitem(self) -> Tuple[_KT, _VT]: ... + def setdefault(self, __key: _KT, __default: _VT = ...) -> _VT: ... + @overload + def update(self, __m: Mapping[_KT, _VT], **kwargs: _VT) -> None: ... + @overload + def update(self, __m: Iterable[Tuple[_KT, _VT]], **kwargs: _VT) -> None: ... + @overload + def update(self, **kwargs: _VT) -> None: ... + def keys(self) -> KeysView[_KT]: ... + def values(self) -> ValuesView[_VT]: ... + def items(self) -> ItemsView[_KT, _VT]: ... + @classmethod + @overload + def fromkeys( + cls, __iterable: Iterable[_T], __value: None = ... + ) -> dict[_T, Any | None]: ... + @classmethod + @overload + def fromkeys(cls, __iterable: Iterable[_T], __value: _S) -> dict[_T, _S]: ... + def __len__(self) -> int: ... + def __getitem__(self, k: _KT) -> _VT: ... + def __setitem__(self, k: _KT, v: _VT) -> None: ... + def __delitem__(self, v: _KT) -> None: ... + def __iter__(self) -> Iterator[_KT]: ... + if sys.version_info >= (3, 8): + def __reversed__(self) -> Iterator[_KT]: ... + def __str__(self) -> str: ... + __hash__: None # type: ignore + if sys.version_info >= (3, 9): + def __class_getitem__(cls, item: Any) -> GenericAlias: ... + def __or__(self, __value: Mapping[_T1, _T2]) -> dict[_KT | _T1, _VT | _T2]: ... + def __ror__(self, __value: Mapping[_T1, _T2]) -> dict[_KT | _T1, _VT | _T2]: ... + def __ior__(self, __value: Mapping[_KT, _VT]) -> dict[_KT, _VT]: ... # type: ignore + +class set(MutableSet[_T], Generic[_T]): + def __init__(self, iterable: Iterable[_T] = ...) -> None: ... + def add(self, element: _T) -> None: ... + def clear(self) -> None: ... + def copy(self) -> Set[_T]: ... + def difference(self, *s: Iterable[Any]) -> Set[_T]: ... + def difference_update(self, *s: Iterable[Any]) -> None: ... + def discard(self, element: _T) -> None: ... + def intersection(self, *s: Iterable[Any]) -> Set[_T]: ... + def intersection_update(self, *s: Iterable[Any]) -> None: ... + def isdisjoint(self, s: Iterable[Any]) -> bool: ... + def issubset(self, s: Iterable[Any]) -> bool: ... + def issuperset(self, s: Iterable[Any]) -> bool: ... + def pop(self) -> _T: ... + def remove(self, element: _T) -> None: ... + def symmetric_difference(self, s: Iterable[_T]) -> Set[_T]: ... + def symmetric_difference_update(self, s: Iterable[_T]) -> None: ... + def union(self, *s: Iterable[_T]) -> Set[_T]: ... + def update(self, *s: Iterable[_T]) -> None: ... + def __len__(self) -> int: ... + def __contains__(self, o: object) -> bool: ... + def __iter__(self) -> Iterator[_T]: ... + def __str__(self) -> str: ... + def __and__(self, s: AbstractSet[object]) -> Set[_T]: ... + def __iand__(self, s: AbstractSet[object]) -> Set[_T]: ... + def __or__(self, s: AbstractSet[_S]) -> Set[_T | _S]: ... + def __ior__(self, s: AbstractSet[_S]) -> Set[_T | _S]: ... + def __sub__(self, s: AbstractSet[_T | None]) -> Set[_T]: ... + def __isub__(self, s: AbstractSet[_T | None]) -> Set[_T]: ... + def __xor__(self, s: AbstractSet[_S]) -> Set[_T | _S]: ... + def __ixor__(self, s: AbstractSet[_S]) -> Set[_T | _S]: ... + def __le__(self, s: AbstractSet[object]) -> bool: ... + def __lt__(self, s: AbstractSet[object]) -> bool: ... + def __ge__(self, s: AbstractSet[object]) -> bool: ... + def __gt__(self, s: AbstractSet[object]) -> bool: ... + __hash__: None # type: ignore + if sys.version_info >= (3, 9): + def __class_getitem__(cls, item: Any) -> GenericAlias: ... + +class enumerate(Iterator[Tuple[int, _T]], Generic[_T]): + def __init__(self, iterable: Iterable[_T], start: int = ...) -> None: ... + def __iter__(self) -> Iterator[Tuple[int, _T]]: ... + def __next__(self) -> Tuple[int, _T]: ... + if sys.version_info >= (3, 9): + def __class_getitem__(cls, item: Any) -> GenericAlias: ... + +class range(Sequence[int]): + start: int + stop: int + step: int + @overload + def __init__(self, stop: SupportsIndex) -> None: ... + @overload + def __init__( + self, start: SupportsIndex, stop: SupportsIndex, step: SupportsIndex = ... + ) -> None: ... + def __len__(self) -> int: ... + def __contains__(self, o: object) -> bool: ... + def __iter__(self) -> Iterator[int]: ... + @overload + def __getitem__(self, i: SupportsIndex) -> int: ... + @overload + def __getitem__(self, s: slice) -> range: ... + def __repr__(self) -> str: ... + def __reversed__(self) -> Iterator[int]: ... + +class property(object): + fget: Callable[[Any], Any] | None + fset: Callable[[Any, Any], None] | None + fdel: Callable[[Any], None] | None + def __init__( + self, + fget: Callable[[Any], Any] | None = ..., + fset: Callable[[Any, Any], None] | None = ..., + fdel: Callable[[Any], None] | None = ..., + doc: str | None = ..., + ) -> None: ... + def getter(self, fget: Callable[[Any], Any]) -> property: ... + def setter(self, fset: Callable[[Any, Any], None]) -> property: ... + def deleter(self, fdel: Callable[[Any], None]) -> property: ... + def __get__(self, obj: Any, type: type | None = ...) -> Any: ... + def __set__(self, obj: Any, value: Any) -> None: ... + def __delete__(self, obj: Any) -> None: ... + +class _NotImplementedType(Any): # type: ignore + # A little weird, but typing the __call__ as NotImplemented makes the error message + # for NotImplemented() much better + __call__: NotImplemented # type: ignore + +NotImplemented: _NotImplementedType + +def abs(__x: SupportsAbs[_T]) -> _T: ... +def all(__iterable: Iterable[object]) -> bool: ... +def any(__iterable: Iterable[object]) -> bool: ... +def bin(__number: int | SupportsIndex) -> str: ... + +if sys.version_info >= (3, 7): + def breakpoint(*args: Any, **kws: Any) -> None: ... + +def callable(__obj: object) -> bool: ... +def chr(__i: int) -> str: ... + +# We define this here instead of using os.PathLike to avoid import cycle issues. +# See https://github.com/python/typeshed/pull/991#issuecomment-288160993 +_AnyStr_co = TypeVar("_AnyStr_co", str, bytes, covariant=True) + +class _PathLike(Protocol[_AnyStr_co]): + def __fspath__(self) -> _AnyStr_co: ... + +if sys.version_info >= (3, 10): + def aiter(__iterable: AsyncIterable[_T]) -> AsyncIterator[_T]: ... + @overload + async def anext(__i: AsyncIterator[_T]) -> _T: ... + @overload + async def anext(__i: AsyncIterator[_T], default: _VT) -> _T | _VT: ... + +def delattr(__obj: Any, __name: str) -> None: ... +def dir(__o: object = ...) -> list[str]: ... +@overload +def divmod(__x: SupportsDivMod[_T_contra, _T_co], __y: _T_contra) -> _T_co: ... +@overload +def divmod(__x: _T_contra, __y: SupportsRDivMod[_T_contra, _T_co]) -> _T_co: ... +def eval( + __source: str | bytes | CodeType, + __globals: dict[str, Any] | None = ..., + __locals: Mapping[str, Any] | None = ..., +) -> Any: ... +def exec( + __source: str | bytes | CodeType, + __globals: dict[str, Any] | None = ..., + __locals: Mapping[str, Any] | None = ..., +) -> Any: ... + +class filter(Iterator[_T], Generic[_T]): + @overload + def __init__(self, __function: None, __iterable: Iterable[_T | None]) -> None: ... + @overload + def __init__( + self, __function: Callable[[_T], Any], __iterable: Iterable[_T] + ) -> None: ... + def __iter__(self) -> Iterator[_T]: ... + def __next__(self) -> _T: ... + +@overload +def getattr(__o: object, name: str) -> Any: ... + +# While technically covered by the last overload, spelling out the types for None and bool +# help mypy out in some tricky situations involving type context (aka bidirectional inference) +@overload +def getattr(__o: object, name: str, __default: None) -> Any | None: ... +@overload +def getattr(__o: object, name: str, __default: bool) -> Any | bool: ... +@overload +def getattr(__o: object, name: str, __default: _T) -> Any | _T: ... +def globals() -> dict[str, Any]: ... +def hasattr(__obj: object, __name: str) -> bool: ... +def hash(__obj: object) -> int: ... +def help(*args: Any, **kwds: Any) -> None: ... +def hex(__number: int | SupportsIndex) -> str: ... +def id(__obj: object) -> int: ... +def input(__prompt: Any = ...) -> str: ... +@overload +def iter(__iterable: Iterable[_T]) -> Iterator[_T]: ... +@overload +def iter(__function: Callable[[], _T | None], __sentinel: None) -> Iterator[_T]: ... +@overload +def iter(__function: Callable[[], _T], __sentinel: Any) -> Iterator[_T]: ... + +if sys.version_info >= (3, 10): + def isinstance( + __obj: object, + __class_or_tuple: type + | types.UnionType + | Tuple[type | types.UnionType | Tuple[Any, ...], ...], + ) -> bool: ... + def issubclass( + __cls: type, + __class_or_tuple: type + | types.UnionType + | Tuple[type | types.UnionType | Tuple[Any, ...], ...], + ) -> bool: ... + +else: + def isinstance( + __obj: object, __class_or_tuple: type | Tuple[type | Tuple[Any, ...], ...] + ) -> bool: ... + def issubclass( + __cls: type, __class_or_tuple: type | Tuple[type | Tuple[Any, ...], ...] + ) -> bool: ... + +def len(__obj: Sized) -> int: ... +def locals() -> dict[str, Any]: ... + +class map(Iterator[_S], Generic[_S]): + @overload + def __init__(self, __func: Callable[[_T1], _S], __iter1: Iterable[_T1]) -> None: ... + @overload + def __init__( + self, + __func: Callable[[_T1, _T2], _S], + __iter1: Iterable[_T1], + __iter2: Iterable[_T2], + ) -> None: ... + @overload + def __init__( + self, + __func: Callable[[_T1, _T2, _T3], _S], + __iter1: Iterable[_T1], + __iter2: Iterable[_T2], + __iter3: Iterable[_T3], + ) -> None: ... + @overload + def __init__( + self, + __func: Callable[[_T1, _T2, _T3, _T4], _S], + __iter1: Iterable[_T1], + __iter2: Iterable[_T2], + __iter3: Iterable[_T3], + __iter4: Iterable[_T4], + ) -> None: ... + @overload + def __init__( + self, + __func: Callable[[_T1, _T2, _T3, _T4, _T5], _S], + __iter1: Iterable[_T1], + __iter2: Iterable[_T2], + __iter3: Iterable[_T3], + __iter4: Iterable[_T4], + __iter5: Iterable[_T5], + ) -> None: ... + @overload + def __init__( + self, + __func: Callable[..., _S], + __iter1: Iterable[Any], + __iter2: Iterable[Any], + __iter3: Iterable[Any], + __iter4: Iterable[Any], + __iter5: Iterable[Any], + __iter6: Iterable[Any], + *iterables: Iterable[Any], + ) -> None: ... + def __iter__(self) -> Iterator[_S]: ... + def __next__(self) -> _S: ... + +@overload +def max( + __arg1: SupportsLessThanT, + __arg2: SupportsLessThanT, + *_args: SupportsLessThanT, + key: None = ..., +) -> SupportsLessThanT: ... +@overload +def max( + __arg1: _T, __arg2: _T, *_args: _T, key: Callable[[_T], SupportsLessThan] +) -> _T: ... +@overload +def max( + __iterable: Iterable[SupportsLessThanT], *, key: None = ... +) -> SupportsLessThanT: ... +@overload +def max(__iterable: Iterable[_T], *, key: Callable[[_T], SupportsLessThan]) -> _T: ... +@overload +def max( + __iterable: Iterable[SupportsLessThanT], *, key: None = ..., default: _T +) -> SupportsLessThanT | _T: ... +@overload +def max( + __iterable: Iterable[_T1], *, key: Callable[[_T1], SupportsLessThan], default: _T2 +) -> _T1 | _T2: ... +@overload +def min( + __arg1: SupportsLessThanT, + __arg2: SupportsLessThanT, + *_args: SupportsLessThanT, + key: None = ..., +) -> SupportsLessThanT: ... +@overload +def min( + __arg1: _T, __arg2: _T, *_args: _T, key: Callable[[_T], SupportsLessThan] +) -> _T: ... +@overload +def min( + __iterable: Iterable[SupportsLessThanT], *, key: None = ... +) -> SupportsLessThanT: ... +@overload +def min(__iterable: Iterable[_T], *, key: Callable[[_T], SupportsLessThan]) -> _T: ... +@overload +def min( + __iterable: Iterable[SupportsLessThanT], *, key: None = ..., default: _T +) -> SupportsLessThanT | _T: ... +@overload +def min( + __iterable: Iterable[_T1], *, key: Callable[[_T1], SupportsLessThan], default: _T2 +) -> _T1 | _T2: ... +@overload +def next(__i: Iterator[_T]) -> _T: ... +@overload +def next(__i: Iterator[_T], default: _VT) -> _T | _VT: ... +def oct(__number: int | SupportsIndex) -> str: ... + +_OpenFile = Union[StrOrBytesPath, int] +_Opener = Callable[[str, int], int] + +# Text mode: always returns a TextIOWrapper +@overload +def open( + file: _OpenFile, + mode: OpenTextMode = ..., + buffering: int = ..., + encoding: str | None = ..., + errors: str | None = ..., + newline: str | None = ..., + closefd: bool = ..., + opener: _Opener | None = ..., +) -> TextIO: ... + +# Unbuffered binary mode: returns a FileIO +@overload +def open( + file: _OpenFile, + mode: OpenBinaryMode, + buffering: int = ..., + encoding: None = ..., + errors: None = ..., + newline: None = ..., + closefd: bool = ..., + opener: _Opener | None = ..., +) -> BinaryIO: ... + +# Fallback if mode is not specified +@overload +def open( + file: _OpenFile, + mode: str, + buffering: int = ..., + encoding: str | None = ..., + errors: str | None = ..., + newline: str | None = ..., + closefd: bool = ..., + opener: _Opener | None = ..., +) -> IO[Any]: ... +def ord(__c: str | bytes) -> int: ... +def print( + *values: object, + sep: str | None = ..., + end: str | None = ..., + file: SupportsWrite[str] | None = ..., + flush: bool = ..., +) -> None: ... + +_E = TypeVar("_E", contravariant=True) +_M = TypeVar("_M", contravariant=True) + +class _SupportsPow2(Protocol[_E, _T_co]): + def __pow__(self, __other: _E) -> _T_co: ... + +class _SupportsPow3(Protocol[_E, _M, _T_co]): + def __pow__(self, __other: _E, __modulo: _M) -> _T_co: ... + +if sys.version_info >= (3, 8): + @overload + def pow( + base: int, exp: int, mod: None = ... + ) -> Any: ... # returns int or float depending on whether exp is non-negative + @overload + def pow(base: int, exp: int, mod: int) -> int: ... + @overload + def pow(base: float, exp: float, mod: None = ...) -> float: ... + @overload + def pow(base: _SupportsPow2[_E, _T_co], exp: _E) -> _T_co: ... + @overload + def pow(base: _SupportsPow3[_E, _M, _T_co], exp: _E, mod: _M) -> _T_co: ... + +else: + @overload + def pow( + __base: int, __exp: int, __mod: None = ... + ) -> Any: ... # returns int or float depending on whether exp is non-negative + @overload + def pow(__base: int, __exp: int, __mod: int) -> int: ... + @overload + def pow(__base: float, __exp: float, __mod: None = ...) -> float: ... + @overload + def pow(__base: _SupportsPow2[_E, _T_co], __exp: _E) -> _T_co: ... + @overload + def pow(__base: _SupportsPow3[_E, _M, _T_co], __exp: _E, __mod: _M) -> _T_co: ... + +class reversed(Iterator[_T], Generic[_T]): + @overload + def __init__(self, __sequence: Reversible[_T]) -> None: ... + @overload + def __init__(self, __sequence: SupportsLenAndGetItem[_T]) -> None: ... + def __iter__(self) -> Iterator[_T]: ... + def __next__(self) -> _T: ... + +def repr(__obj: object) -> str: ... +@overload +def round(number: SupportsRound[Any]) -> int: ... +@overload +def round(number: SupportsRound[Any], ndigits: None) -> int: ... +@overload +def round(number: SupportsRound[_T], ndigits: SupportsIndex) -> _T: ... +def setattr(__obj: object, __name: str, __value: Any) -> None: ... +@overload +def sorted( + __iterable: Iterable[SupportsLessThanT], *, key: None = ..., reverse: bool = ... +) -> list[SupportsLessThanT]: ... +@overload +def sorted( + __iterable: Iterable[_T], + *, + key: Callable[[_T], SupportsLessThan], + reverse: bool = ..., +) -> list[_T]: ... + +if sys.version_info >= (3, 8): + @overload + def sum(__iterable: Iterable[_T]) -> _T | int: ... + @overload + def sum(__iterable: Iterable[_T], start: _S) -> _T | _S: ... + +else: + @overload + def sum(__iterable: Iterable[_T]) -> _T | int: ... + @overload + def sum(__iterable: Iterable[_T], __start: _S) -> _T | _S: ... + +class zip(Iterator[_T_co], Generic[_T_co]): + @overload + def __new__(cls, __iter1: Iterable[_T1]) -> zip[Tuple[_T1]]: ... + @overload + def __new__( + cls, __iter1: Iterable[_T1], __iter2: Iterable[_T2] + ) -> zip[Tuple[_T1, _T2]]: ... + @overload + def __new__( + cls, __iter1: Iterable[_T1], __iter2: Iterable[_T2], __iter3: Iterable[_T3] + ) -> zip[Tuple[_T1, _T2, _T3]]: ... + @overload + def __new__( + cls, + __iter1: Iterable[_T1], + __iter2: Iterable[_T2], + __iter3: Iterable[_T3], + __iter4: Iterable[_T4], + ) -> zip[Tuple[_T1, _T2, _T3, _T4]]: ... + @overload + def __new__( + cls, + __iter1: Iterable[_T1], + __iter2: Iterable[_T2], + __iter3: Iterable[_T3], + __iter4: Iterable[_T4], + __iter5: Iterable[_T5], + ) -> zip[Tuple[_T1, _T2, _T3, _T4, _T5]]: ... + @overload + def __new__( + cls, + __iter1: Iterable[Any], + __iter2: Iterable[Any], + __iter3: Iterable[Any], + __iter4: Iterable[Any], + __iter5: Iterable[Any], + __iter6: Iterable[Any], + *iterables: Iterable[Any], + ) -> zip[Tuple[Any, ...]]: ... + def __iter__(self) -> Iterator[_T_co]: ... + def __next__(self) -> _T_co: ... + +def __import__( + name: str, + globals: Mapping[str, Any] | None = ..., + locals: Mapping[str, Any] | None = ..., + fromlist: Sequence[str] = ..., + level: int = ..., +) -> Any: ... + +# Actually the type of Ellipsis is , but since it's +# not exposed anywhere under that name, we make it private here. +class ellipsis: ... + +Ellipsis: ellipsis + +class BaseException(object): + args: Tuple[Any, ...] + __cause__: BaseException | None + __context__: BaseException | None + __suppress_context__: bool + __traceback__: TracebackType | None + def __init__(self, *args: object) -> None: ... + def __str__(self) -> str: ... + def __repr__(self) -> str: ... + def with_traceback(self: _TBE, tb: TracebackType | None) -> _TBE: ... + +class GeneratorExit(BaseException): ... +class KeyboardInterrupt(BaseException): ... + +class SystemExit(BaseException): + code: int + +class Exception(BaseException): ... + +class StopIteration(Exception): + value: Any + +_StandardError = Exception + +class OSError(Exception): + errno: int + strerror: str + # filename, filename2 are actually str | bytes | None + filename: Any + filename2: Any + if sys.platform == "win32": + winerror: int + +if sys.platform == "win32": + WindowsError = OSError + +class ArithmeticError(_StandardError): ... +class AssertionError(_StandardError): ... + +class AttributeError(_StandardError): + if sys.version_info >= (3, 10): + name: str + obj: object + +class EOFError(_StandardError): ... + +class ImportError(_StandardError): + def __init__( + self, *args: object, name: str | None = ..., path: str | None = ... + ) -> None: ... + name: str | None + path: str | None + msg: str # undocumented + +class LookupError(_StandardError): ... +class MemoryError(_StandardError): ... + +class NameError(_StandardError): + if sys.version_info >= (3, 10): + name: str + +class RuntimeError(_StandardError): ... + +class StopAsyncIteration(Exception): + value: Any + +class SyntaxError(_StandardError): + msg: str + lineno: int | None + offset: int | None + text: str | None + filename: str | None + if sys.version_info >= (3, 10): + end_lineno: int | None + end_offset: int | None + +class TypeError(_StandardError): ... +class ValueError(_StandardError): ... +class FloatingPointError(ArithmeticError): ... +class OverflowError(ArithmeticError): ... +class ZeroDivisionError(ArithmeticError): ... +class IndexError(LookupError): ... +class KeyError(LookupError): ... +class NotImplementedError(RuntimeError): ... +class IndentationError(SyntaxError): ... +class TabError(IndentationError): ... diff --git a/lang/lol/typeshed/stdlib/collections/__init__.pyi b/lang/lol/typeshed/stdlib/collections/__init__.pyi new file mode 100644 index 0000000..8815a4b --- /dev/null +++ b/lang/lol/typeshed/stdlib/collections/__init__.pyi @@ -0,0 +1,60 @@ +import sys +from typing import ( + Any, + Dict, + Generic, + ItemsView, + Iterable, + Iterator, + KeysView, + Optional, + Reversible, + Tuple, + Type, + TypeVar, + Union, + ValuesView, +) + +_S = TypeVar("_S") +_T = TypeVar("_T") +_KT = TypeVar("_KT") +_VT = TypeVar("_VT") + +if sys.version_info >= (3, 7): + def namedtuple( + typename: str, + field_names: Union[str, Iterable[str]], + *, + rename: bool = ..., + module: Optional[str] = ..., + defaults: Optional[Iterable[Any]] = ..., + ) -> Type[Tuple[Any, ...]]: ... + +else: + def namedtuple( + typename: str, + field_names: Union[str, Iterable[str]], + *, + verbose: bool = ..., + rename: bool = ..., + module: Optional[str] = ..., + ) -> Type[Tuple[Any, ...]]: ... + +class _OrderedDictKeysView(KeysView[_KT], Reversible[_KT]): + def __reversed__(self) -> Iterator[_KT]: ... + +class _OrderedDictItemsView(ItemsView[_KT, _VT], Reversible[Tuple[_KT, _VT]]): + def __reversed__(self) -> Iterator[Tuple[_KT, _VT]]: ... + +class _OrderedDictValuesView(ValuesView[_VT], Reversible[_VT]): + def __reversed__(self) -> Iterator[_VT]: ... + +class OrderedDict(Dict[_KT, _VT], Reversible[_KT], Generic[_KT, _VT]): + def popitem(self, last: bool = ...) -> Tuple[_KT, _VT]: ... + def move_to_end(self, key: _KT, last: bool = ...) -> None: ... + def copy(self: _S) -> _S: ... + def __reversed__(self) -> Iterator[_KT]: ... + def keys(self) -> _OrderedDictKeysView[_KT]: ... + def items(self) -> _OrderedDictItemsView[_KT, _VT]: ... + def values(self) -> _OrderedDictValuesView[_VT]: ... diff --git a/lang/lol/typeshed/stdlib/errno.pyi b/lang/lol/typeshed/stdlib/errno.pyi new file mode 100644 index 0000000..6ff1c70 --- /dev/null +++ b/lang/lol/typeshed/stdlib/errno.pyi @@ -0,0 +1,26 @@ +from typing import Mapping + +errorcode: Mapping[int, str] + +EACCES: int +EADDRINUSE: int +EAGAIN: int +EALREADY: int +EBADF: int +ECONNABORTED: int +ECONNREFUSED: int +ECONNRESET: int +EEXIST: int +EHOSTUNREACH: int +EINPROGRESS: int +EINVAL: int +EIO: int +EISDIR: int +ENOBUFS: int +ENODEV: int +ENOENT: int +ENOMEM: int +ENOTCONN: int +EOPNOTSUPP: int +EPERM: int +ETIMEDOUT: int diff --git a/lang/lol/typeshed/stdlib/gc.pyi b/lang/lol/typeshed/stdlib/gc.pyi new file mode 100644 index 0000000..d91bd02 --- /dev/null +++ b/lang/lol/typeshed/stdlib/gc.pyi @@ -0,0 +1,68 @@ +"""crwdns328732:0crwdne328732:0 (crwdns328730:0crwdne328730:0)""" +from typing import overload + +def enable() -> None: + """crwdns328736:0crwdne328736:0 (crwdns328734:0crwdne328734:0)""" + ... + +def disable() -> None: + """crwdns328740:0crwdne328740:0 (crwdns328738:0crwdne328738:0) + +Heap memory can still be allocated, +and garbage collection can still be initiated manually using ``gc.collect``.""" + +def collect() -> None: + """crwdns328744:0crwdne328744:0 (crwdns328742:0crwdne328742:0)""" + ... + +def mem_alloc() -> int: + """crwdns328748:0crwdne328748:0 (crwdns328746:0crwdne328746:0) + +:return: The number of bytes allocated. + +This function is MicroPython extension.""" + ... + +def mem_free() -> int: + """crwdns328752:0crwdne328752:0 (crwdns328750:0crwdne328750:0) + +:return: The number of bytes free. + +This function is MicroPython extension.""" + ... + +@overload +def threshold() -> int: + """crwdns328756:0crwdne328756:0 (crwdns328754:0crwdne328754:0) + +:return: The GC allocation threshold. + +This function is a MicroPython extension. CPython has a similar +function - ``set_threshold()``, but due to different GC +implementations, its signature and semantics are different.""" + ... + +@overload +def threshold(amount: int) -> None: + """crwdns328760:0crwdne328760:0 (crwdns328758:0crwdne328758:0) + +Normally, a collection is triggered only when a new allocation +cannot be satisfied, i.e. on an out-of-memory (OOM) condition. +If this function is called, in addition to OOM, a collection +will be triggered each time after ``amount`` bytes have been +allocated (in total, since the previous time such an amount of bytes +have been allocated). ``amount`` is usually specified as less than the +full heap size, with the intention to trigger a collection earlier than when the +heap becomes exhausted, and in the hope that an early collection will prevent +excessive memory fragmentation. This is a heuristic measure, the effect +of which will vary from application to application, as well as +the optimal value of the ``amount`` parameter. + +A value of -1 means a disabled allocation threshold. + +This function is a MicroPython extension. CPython has a similar +function - ``set_threshold()``, but due to different GC +implementations, its signature and semantics are different. + +:param amount: (crwdns328762:0crwdne328762:0) crwdns328764:0crwdne328764:0""" + ... \ No newline at end of file diff --git a/lang/lol/typeshed/stdlib/log.pyi b/lang/lol/typeshed/stdlib/log.pyi new file mode 100644 index 0000000..725cc6e --- /dev/null +++ b/lang/lol/typeshed/stdlib/log.pyi @@ -0,0 +1,89 @@ +"""crwdns328768:0crwdne328768:0 (crwdns328766:0crwdne328766:0)""" +from typing import Literal, Mapping, Optional, Union, overload +MILLISECONDS = 1 +"""crwdns328772:0crwdne328772:0 (crwdns328770:0crwdne328770:0)""" +SECONDS = 10 +"""crwdns328776:0crwdne328776:0 (crwdns328774:0crwdne328774:0)""" +MINUTES = 600 +"""crwdns328780:0crwdne328780:0 (crwdns328778:0crwdne328778:0)""" +HOURS = 36000 +"""crwdns328784:0crwdne328784:0 (crwdns328782:0crwdne328782:0)""" +DAYS = 864000 +"""crwdns328788:0crwdne328788:0 (crwdns328786:0crwdne328786:0)""" + +def set_labels(*labels: str, timestamp: Optional[Literal[1, 10, 36000, 864000]]=SECONDS) -> None: + """crwdns328792:0crwdne328792:0 (crwdns328790:0crwdne328790:0) + +Example: ``log.set_labels('X', 'Y', 'Z', timestamp=log.MINUTES)`` + +Ideally this function should be called a single time, before any data is +logged, to configure the data table header once. + +If a log file already exists when the program starts, or if this function +is called multiple times, it will check the labels already defined in the +log file. If this function call contains any new labels not already +present, it will generate a new header row with the additional columns. + +By default the first column contains a timestamp for each row. The time +unit can be selected via the timestamp argument. + +:param *labels: (crwdns335772:0crwdne335772:0) crwdns335774:0crwdne335774:0 +:param timestamp: (crwdns328798:0crwdne328798:0) crwdns335776:0``log.MILLISECONDS``crwdnd335776:0``log.SECONDS``crwdnd335776:0``log.MINUTES``crwdnd335776:0``log.HOURS``crwdnd335776:0``log.DAYS``crwdnd335776:0``None``crwdnd335776:0``log.SECONDS``crwdne335776:0""" + ... + +@overload +def add(data_dictionary: Optional[Mapping[str, Union[str, int, float]]]) -> None: + """crwdns328804:0crwdne328804:0 (crwdns328802:0crwdne328802:0) + +Example: ``log.add({ 'temp': temperature() })`` + +Each call to this function adds a row to the log. + +New labels not previously specified via the set_labels function, or by a +previous call to this function, will trigger a new header entry to be added +to the log with the extra labels. + +Labels previously specified and not present in a call to this function will +be skipped with an empty value in the log row. + +:param data_dictionary: (crwdns335778:0crwdne335778:0) crwdns335780:0crwdne335780:0""" + ... + +@overload +def add(**kwargs: Union[str, int, float]) -> None: + """crwdns328812:0crwdne328812:0 (crwdns328810:0crwdne328810:0) + +Example: ``log.add(temp=temperature())`` + +Each call to this function adds a row to the log. + +New labels not previously specified via the set_labels function, or by a +previous call to this function, will trigger a new header entry to be added +to the log with the extra labels. + +Labels previously specified and not present in a call to this function will +be skipped with an empty value in the log row.""" + ... + +def delete(full=False): + """crwdns328816:0crwdne328816:0 (crwdns328814:0crwdne328814:0) + +Example: ``log.delete()`` + +To add the log headers again the ``set_labels`` function should to be called after this function. + +There are two erase modes; “full” completely removes the data from the physical storage, +and “fast” invalidates the data without removing it. + +:param full: (crwdns328818:0crwdne328818:0) crwdns335782:0``True``crwdnd335782:0``False``crwdne335782:0""" + ... + +def set_mirroring(serial: bool): + """crwdns335784:0crwdne335784:0 (crwdns328822:0crwdne328822:0) + +Example: ``log.set_mirroring(True)`` + +Serial mirroring is disabled by default. When enabled, it will print to serial each row logged into the log file. + +:param serial: (crwdns328826:0crwdne328826:0) crwdns335786:0``True``crwdne335786:0""" + ... \ No newline at end of file diff --git a/lang/lol/typeshed/stdlib/love.pyi b/lang/lol/typeshed/stdlib/love.pyi new file mode 100644 index 0000000..9018624 --- /dev/null +++ b/lang/lol/typeshed/stdlib/love.pyi @@ -0,0 +1 @@ +def badaboom() -> None: ... diff --git a/lang/lol/typeshed/stdlib/machine.pyi b/lang/lol/typeshed/stdlib/machine.pyi new file mode 100644 index 0000000..6dd178c --- /dev/null +++ b/lang/lol/typeshed/stdlib/machine.pyi @@ -0,0 +1,84 @@ +"""crwdns328832:0crwdne328832:0 (crwdns328830:0crwdne328830:0)""" +from typing import Any +from .microbit import MicroBitDigitalPin + +def unique_id() -> bytes: + """crwdns328836:0crwdne328836:0 (crwdns328834:0crwdne328834:0) + +Example: ``machine.unique_id()`` + +:return: An identifier that varies from one board instance to another.""" + ... + +def reset() -> None: + """crwdns328840:0crwdne328840:0 (crwdns328838:0crwdne328838:0) + +Example: ``machine.reset()``""" + ... + +def freq() -> int: + """crwdns328844:0crwdne328844:0 (crwdns328842:0crwdne328842:0) + +Example: ``machine.freq()`` + +:return: The CPU frequency.""" + ... + +def disable_irq() -> Any: + """crwdns328848:0crwdne328848:0 (crwdns328846:0crwdne328846:0) + +Example: ``interrupt_state = machine.disable_irq()`` + +:return: the previous IRQ state which should be considered an opaque value + +The return value should be passed to the ``enable_irq`` function to restore +interrupts to their original state.""" + ... + +def enable_irq(state: Any) -> None: + """crwdns328852:0crwdne328852:0 (crwdns328850:0crwdne328850:0) + +Example: ``machine.enable_irq(interrupt_state)`` + +:param state: (crwdns328854:0crwdne328854:0) crwdns328856:0``disable_irq``crwdne328856:0""" + ... + +def time_pulse_us(pin: MicroBitDigitalPin, pulse_level: int, timeout_us: int=1000000) -> int: + """crwdns328860:0crwdne328860:0 (crwdns328858:0crwdne328858:0) + +Example: ``time_pulse_us(pin0, 1)`` + +If the current input value of the pin is different to ``pulse_level``, the +function first waits until the pin input becomes equal to +``pulse_level``, then times the duration that the pin is equal to +``pulse_level``. If the pin is already equal to ``pulse_level`` then timing +starts straight away. + +:param pin: (crwdns328862:0crwdne328862:0) crwdns328864:0crwdne328864:0 +:param pulse_level: (crwdns328866:0crwdne328866:0) crwdns328868:0crwdne328868:0 +:param timeout_us: (crwdns328870:0crwdne328870:0) crwdns328872:0crwdne328872:0 +: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""" + ... + +class mem: + """crwdns328876:0``mem8``crwdnd328876:0``mem16``crwdnd328876:0``mem32``crwdne328876:0 (crwdns328874:0crwdne328874:0)""" + + def __getitem__(self, address: int) -> int: + """crwdns328880:0crwdne328880:0 (crwdns328878:0crwdne328878:0) + +:param address: (crwdns328882:0crwdne328882:0) crwdns328884:0crwdne328884:0 +:return: The value at that address as an integer.""" + ... + + def __setitem__(self, address: int, value: int) -> None: + """crwdns328888:0crwdne328888:0 (crwdns328886:0crwdne328886:0) + +:param address: (crwdns328890:0crwdne328890:0) crwdns328892:0crwdne328892:0 +:param value: (crwdns328894:0crwdne328894:0) crwdns328896:0crwdne328896:0""" + ... +mem8: mem +"""crwdns328900:0crwdne328900:0 (crwdns328898:0crwdne328898:0)""" +mem16: mem +"""crwdns328904:0crwdne328904:0 (crwdns328902:0crwdne328902:0)""" +mem32: mem +"""crwdns328908:0crwdne328908:0 (crwdns328906:0crwdne328906:0)""" \ No newline at end of file diff --git a/lang/lol/typeshed/stdlib/math.pyi b/lang/lol/typeshed/stdlib/math.pyi new file mode 100644 index 0000000..9373c19 --- /dev/null +++ b/lang/lol/typeshed/stdlib/math.pyi @@ -0,0 +1,246 @@ +"""crwdns328912:0crwdne328912:0 (crwdns328910:0crwdne328910:0)""" +from typing import Tuple + +def acos(x: float) -> float: + """crwdns328916:0crwdne328916:0 (crwdns328914:0crwdne328914:0) + +Example: ``math.acos(1)`` + +:param x: (crwdns328918:0crwdne328918:0) crwdns328920:0crwdne328920:0 +:return: The inverse cosine of ``x``""" + ... + +def asin(x: float) -> float: + """crwdns328924:0crwdne328924:0 (crwdns328922:0crwdne328922:0) + +Example: ``math.asin(0)`` + +:param x: (crwdns328926:0crwdne328926:0) crwdns328928:0crwdne328928:0 +:return: The inverse sine of ``x``""" + ... + +def atan(x: float) -> float: + """crwdns328932:0crwdne328932:0 (crwdns328930:0crwdne328930:0) + +Example: ``math.atan(0)`` + +:param x: (crwdns328934:0crwdne328934:0) crwdns328936:0crwdne328936:0 +:return: The inverse tangent of ``x``""" + ... + +def atan2(y: float, x: float) -> float: + """crwdns328940:0``y/x``crwdne328940:0 (crwdns328938:0crwdne328938:0) + +Example: ``math.atan2(0, -1)`` + +:param y: (crwdns328942:0crwdne328942:0) crwdns328944:0crwdne328944:0 +:param x: (crwdns328942:0crwdne328942:0) crwdns328944:0crwdne328944:0 +:return: The principal value of the inverse tangent of ``y/x``""" + ... + +def ceil(x: float) -> float: + """crwdns328952:0crwdne328952:0 (crwdns328950:0crwdne328950:0) + +Example: ``math.ceil(0.1)`` + +:param x: (crwdns328954:0crwdne328954:0) crwdns328956:0crwdne328956:0 +:return: ``x`` rounded towards positive infinity.""" + ... + +def copysign(x: float, y: float) -> float: + """crwdns328960:0``x``crwdnd328960:0``y``crwdne328960:0 (crwdns328958:0crwdne328958:0) + +Example: ``math.copysign(1, -1)`` + +:param x: (crwdns328962:0crwdne328962:0) crwdns328964:0crwdne328964:0 +:param y: (crwdns328966:0crwdne328966:0) crwdns328968:0crwdne328968:0 +:return: ``x`` with the sign of ``y``""" + ... + +def cos(x: float) -> float: + """crwdns328972:0``x``crwdne328972:0 (crwdns328970:0crwdne328970:0) + +Example: ``math.cos(0)`` + +:param x: (crwdns328974:0crwdne328974:0) crwdns328976:0crwdne328976:0 +:return: The cosine of ``x``""" + ... + +def degrees(x: float) -> float: + """crwdns328980:0crwdne328980:0 (crwdns328978:0crwdne328978:0) + +Example: ``math.degrees(2 * math.pi)`` + +:param x: (crwdns328982:0crwdne328982:0) crwdns328984:0crwdne328984:0 +:return: The value converted to degrees""" + ... + +def exp(x: float) -> float: + """crwdns328988:0``x``crwdne328988:0 (crwdns328986:0crwdne328986:0) + +Example: ``math.exp(1)`` + +:param x: (crwdns328990:0crwdne328990:0) crwdns328992:0crwdne328992:0 +:return: The exponential of ``x``.""" + ... + +def fabs(x: float) -> float: + """crwdns328996:0``x``crwdne328996:0 (crwdns328994:0crwdne328994:0) + +Example: ``math.fabs(-0.1)`` + +:param x: (crwdns328998:0crwdne328998:0) crwdns329000:0crwdne329000:0 +:return: The absolute value of ``x``""" + ... + +def floor(x: float) -> int: + """crwdns329004:0crwdne329004:0 (crwdns329002:0crwdne329002:0) + +Example: ``math.floor(0.9)`` + +:param x: (crwdns329006:0crwdne329006:0) crwdns329008:0crwdne329008:0 +:return: ``x`` rounded towards negative infinity.""" + ... + +def fmod(x: float, y: float) -> float: + """crwdns329012:0``x/y``crwdne329012:0 (crwdns329010:0crwdne329010:0) + +Example: ``math.fmod(10, 3)`` + +:param x: (crwdns329014:0crwdne329014:0) crwdns329016:0crwdne329016:0 +:param y: (crwdns329018:0crwdne329018:0) crwdns329020:0crwdne329020:0""" + ... + +def frexp(x: float) -> Tuple[float, int]: + """crwdns329024:0crwdne329024:0 (crwdns329022:0crwdne329022:0) + +Example: ``mantissa, exponent = math.frexp(2)`` + +The returned value is the tuple ``(m, e)`` such that ``x == m * 2**e`` +exactly. If ``x == 0`` then the function returns ``(0.0, 0)``, otherwise +the relation ``0.5 <= abs(m) < 1`` holds. + +:param x: (crwdns329026:0crwdne329026:0) crwdns329028:0crwdne329028:0 +:return: A tuple of length two containing its mantissa then exponent""" + ... + +def isfinite(x: float) -> bool: + """crwdns329032:0crwdne329032:0 (crwdns329030:0crwdne329030:0) + +Example: ``math.isfinite(float('inf'))`` + +:param x: (crwdns329034:0crwdne329034:0) crwdns329036:0crwdne329036:0 +:return: ``True`` if ``x`` is finite, ``False`` otherwise.""" + ... + +def isinf(x: float) -> bool: + """crwdns329040:0crwdne329040:0 (crwdns329038:0crwdne329038:0) + +Example: ``math.isinf(float('-inf'))`` + +:param x: (crwdns329042:0crwdne329042:0) crwdns329044:0crwdne329044:0 +:return: ``True`` if ``x`` is infinite, ``False`` otherwise.""" + ... + +def isnan(x: float) -> bool: + """crwdns329048:0crwdne329048:0 (crwdns329046:0crwdne329046:0) + +Example: ``math.isnan(float('nan'))`` + +:param x: (crwdns329050:0crwdne329050:0) crwdns329052:0crwdne329052:0 +:return: ``True`` if ``x`` is not-a-number (NaN), ``False`` otherwise.""" + ... + +def ldexp(x: float, exp: int) -> float: + """crwdns329056:0crwdne329056:0 (crwdns329054:0crwdne329054:0) + +Example: ``math.ldexp(0.5, 2)`` + +:param x: (crwdns329062:0crwdne329062:0) crwdns329064:0crwdne329064:0 +:param exp: (crwdns329058:0crwdne329058:0) crwdns329060:0crwdne329060:0 +:return: ``x * (2**exp)``""" + ... + +def log(x: float, base: float=e) -> float: + """crwdns329068:0``x``crwdne329068:0 (crwdns329066:0crwdne329066:0) + +Example: ``math.log(math.e)`` + +With one argument, return the natural logarithm of x (to base e). + +With two arguments, return the logarithm of x to the given base, calculated as ``log(x)/log(base)``. + +:param x: (crwdns329074:0crwdne329074:0) crwdns329076:0crwdne329076:0 +:param base: (crwdns329070:0crwdne329070:0) crwdns329072:0crwdne329072:0 +:return: The natural logarithm of ``x``""" + ... + +def modf(x: float) -> Tuple[float, float]: + """crwdns329080:0``x``crwdne329080:0 (crwdns329078:0crwdne329078:0) + +Example: ``fractional, integral = math.modf(1.5)`` + +:param x: (crwdns329082:0crwdne329082:0) crwdns329084:0crwdne329084:0 +:return: A tuple of two floats representing the fractional then integral parts of ``x``. + +Both the fractional and integral values have the same sign as ``x``.""" + ... + +def pow(x: float, y: float) -> float: + """crwdns329088:0``x``crwdnd329088:0``y``crwdne329088:0 (crwdns329086:0crwdne329086:0) + +Example: ``math.pow(4, 0.5)`` + +:param x: (crwdns329090:0crwdne329090:0) crwdns329092:0crwdne329092:0 +:param y: (crwdns329094:0crwdne329094:0) crwdns329096:0crwdne329096:0 +:return: ``x`` to the power of ``y``""" + ... + +def radians(x: float) -> float: + """crwdns329100:0crwdne329100:0 (crwdns329098:0crwdne329098:0) + +Example: ``math.radians(360)`` + +:param x: (crwdns329102:0crwdne329102:0) crwdns329104:0crwdne329104:0 +:return: The value converted to radians""" + ... + +def sin(x: float) -> float: + """crwdns329108:0``x``crwdne329108:0 (crwdns329106:0crwdne329106:0) + +Example: ``math.sin(math.pi/2)`` + +:param x: (crwdns329110:0crwdne329110:0) crwdns329112:0crwdne329112:0 +:return: The sine of ``x``""" + ... + +def sqrt(x: float) -> float: + """crwdns329116:0``x``crwdne329116:0 (crwdns329114:0crwdne329114:0) + +Example: ``math.sqrt(4)`` + +:param x: (crwdns329118:0crwdne329118:0) crwdns329120:0crwdne329120:0 +:return: The square root of ``x``""" + ... + +def tan(x: float) -> float: + """crwdns329124:0``x``crwdne329124:0 (crwdns329122:0crwdne329122:0) + +Example: ``math.tan(0)`` + +:param x: (crwdns329126:0crwdne329126:0) crwdns329128:0crwdne329128:0 +:return: The tangent of ``x``.""" + ... + +def trunc(x: float) -> int: + """crwdns329132:0crwdne329132:0 (crwdns329130:0crwdne329130:0) + +Example: ``math.trunc(-0.9)`` + +:param x: (crwdns329134:0crwdne329134:0) crwdns329136:0crwdne329136:0 +:return: ``x`` rounded towards zero.""" + ... +e: float +"""crwdns329140:0crwdne329140:0 (crwdns329138:0crwdne329138:0)""" +pi: float +"""crwdns329144:0crwdne329144:0 (crwdns329142:0crwdne329142:0)""" \ No newline at end of file diff --git a/lang/lol/typeshed/stdlib/microbit/__init__.pyi b/lang/lol/typeshed/stdlib/microbit/__init__.pyi new file mode 100644 index 0000000..f0c5493 --- /dev/null +++ b/lang/lol/typeshed/stdlib/microbit/__init__.pyi @@ -0,0 +1,706 @@ +"""crwdns329148:0crwdne329148:0 (crwdns329146:0crwdne329146:0)""" +from typing import Any, Callable, List, Optional, Tuple, Union, overload +from _typeshed import ReadableBuffer +from . import accelerometer as accelerometer +from . import audio as audio +from . import compass as compass +from . import display as display +from . import i2c as i2c +from . import microphone as microphone +from . import speaker as speaker +from . import spi as spi +from . import uart as uart + +def 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]]: + """crwdns335788:0crwdne335788:0 (crwdns329150:0crwdne329150:0) + +Example: ``run_every(my_logging, min=5)`` + +``run_every`` can be used in two ways: + +As a Decorator - placed on top of the function to schedule. For example:: + + @run_every(h=1, min=20, s=30, ms=50) + def my_function(): + # Do something here + +As a Function - passing the callback as a positional argument. For example:: + + def my_function(): + # Do something here + run_every(my_function, s=30) + +Each argument corresponds to a different time unit and they are additive. +So ``run_every(min=1, s=30)`` schedules the callback every minute and a half. + +When an exception is thrown inside the callback function it deschedules the +function. To avoid this you can catch exceptions with ``try/except``. + +:param callback: (crwdns329154:0crwdne329154:0) crwdns335790:0crwdne335790:0 +:param days: (crwdns329158:0crwdne329158:0) crwdns335792:0crwdne335792:0 +:param h: (crwdns329162:0crwdne329162:0) crwdns335794:0crwdne335794:0 +:param min: (crwdns329166:0crwdne329166:0) crwdns335796:0crwdne335796:0 +:param s: (crwdns329174:0crwdne329174:0) crwdns335800:0crwdne335800:0 +:param ms: (crwdns329170:0crwdne329170:0) crwdns335798:0crwdne335798:0""" + +def panic(n: int) -> None: + """crwdns329180:0crwdne329180:0 (crwdns329178:0crwdne329178:0) + +Example: ``panic(127)`` + +:param n: (crwdns329182:0crwdne329182:0) crwdns329184:0crwdne329184:0 + +Requires restart.""" + +def reset() -> None: + """crwdns329188:0crwdne329188:0 (crwdns329186:0crwdne329186:0)""" + +@overload +def scale(value: float, from_: Tuple[float, float], to: Tuple[int, int]) -> int: + """crwdns336078:0crwdne336078:0 (crwdns336076:0crwdne336076:0) + +Example: ``volume = scale(accelerometer.get_x(), from_=(-2000, 2000), to=(0, 255))`` + +For example, to convert an accelerometer X value to a speaker volume. + +If one of the numbers in the ``to`` parameter is a floating point +(i.e a decimal number like ``10.0``), this function will return a +floating point number. + + temp_fahrenheit = scale(30, from_=(0.0, 100.0), to=(32.0, 212.0)) + +:param value: (crwdns336088:0crwdne336088:0) crwdns336090:0crwdne336090:0 +:param from_: (crwdns336080:0crwdne336080:0) crwdns336082:0crwdne336082:0 +:param to: (crwdns336084:0crwdne336084:0) crwdns336086:0crwdne336086:0 +:return: The ``value`` converted to the ``to`` range.""" + +@overload +def scale(value: float, from_: Tuple[float, float], to: Tuple[float, float]) -> float: + """crwdns336094:0crwdne336094:0 (crwdns336092:0crwdne336092:0) + +Example: ``temp_fahrenheit = scale(30, from_=(0.0, 100.0), to=(32.0, 212.0))`` + +For example, to convert temperature from a Celsius scale to Fahrenheit. + +If one of the numbers in the ``to`` parameter is a floating point +(i.e a decimal number like ``10.0``), this function will return a +floating point number. +If they are both integers (i.e ``10``), it will return an integer:: + + returns_int = scale(accelerometer.get_x(), from_=(-2000, 2000), to=(0, 255)) + +:param value: (crwdns336104:0crwdne336104:0) crwdns336106:0crwdne336106:0 +:param from_: (crwdns336096:0crwdne336096:0) crwdns336098:0crwdne336098:0 +:param to: (crwdns336100:0crwdne336100:0) crwdns336102:0crwdne336102:0 +:return: The ``value`` converted to the ``to`` range.""" + +def sleep(n: float) -> None: + """crwdns329192:0``n``crwdne329192:0 (crwdns329190:0crwdne329190:0) + +Example: ``sleep(1000)`` + +:param n: (crwdns329194:0crwdne329194:0) crwdns329196:0crwdne329196:0 + +One second is 1000 milliseconds, so:: + + microbit.sleep(1000) + +will pause the execution for one second.""" + +def running_time() -> int: + """crwdns329200:0crwdne329200:0 (crwdns329198:0crwdne329198:0) + +:return: The number of milliseconds since the board was switched on or restarted.""" + +def temperature() -> int: + """crwdns329204:0crwdne329204:0 (crwdns329202:0crwdne329202:0)""" + +def set_volume(v: int) -> None: + """crwdns329208:0crwdne329208:0 (crwdns329206:0crwdne329206:0) + +Example: ``set_volume(127)`` + +:param v: (crwdns329210:0crwdne329210:0) crwdns329212:0crwdne329212:0 + +Out of range values will be clamped to 0 or 255. + +**V2** only.""" + ... + +class Button: + """crwdns329216:0``button_a``crwdnd329216:0``button_b``crwdne329216:0 (crwdns329214:0crwdne329214:0)""" + + def is_pressed(self) -> bool: + """crwdns329220:0crwdne329220:0 (crwdns329218:0crwdne329218:0) + +:return: ``True`` if the specified button ``button`` is pressed, and ``False`` otherwise.""" + ... + + def was_pressed(self) -> bool: + """crwdns329224:0crwdne329224:0 (crwdns329222:0crwdne329222:0) + +Calling this method will clear the press state so +that the button must be pressed again before this method will return +``True`` again. + +:return: ``True`` if the specified button ``button`` was pressed, and ``False`` otherwise""" + ... + + def get_presses(self) -> int: + """crwdns329228:0crwdne329228:0 (crwdns329226:0crwdne329226:0) + +:return: The number of presses since the device started or the last time this method was called""" + ... +button_a: Button +"""crwdns329232:0``Button``crwdne329232:0 (crwdns329230:0crwdne329230:0)""" +button_b: Button +"""crwdns329236:0``Button``crwdne329236:0 (crwdns329234:0crwdne329234:0)""" + +class MicroBitDigitalPin: + """crwdns329240:0crwdne329240:0 (crwdns329238:0crwdne329238:0) + +Some pins support analog and touch features using the ``MicroBitAnalogDigitalPin`` and ``MicroBitTouchPin`` subclasses.""" + NO_PULL: int + PULL_UP: int + PULL_DOWN: int + + def read_digital(self) -> int: + """crwdns329244:0crwdne329244:0 (crwdns329242:0crwdne329242:0) + +Example: ``value = pin0.read_digital()`` + +:return: 1 if the pin is high, and 0 if it's low.""" + ... + + def write_digital(self, value: int) -> None: + """crwdns329248:0crwdne329248:0 (crwdns329246:0crwdne329246:0) + +Example: ``pin0.write_digital(1)`` + +:param value: (crwdns329250:0crwdne329250:0) crwdns329252:0crwdne329252:0""" + ... + + def set_pull(self, value: int) -> None: + """crwdns329256:0``PULL_UP``crwdnd329256:0``PULL_DOWN``crwdnd329256:0``NO_PULL``crwdne329256:0 (crwdns329254:0crwdne329254:0) + +Example: ``pin0.set_pull(pin0.PULL_UP)`` + +:param value: (crwdns329258:0crwdne329258:0) crwdns329260:0``pin0.PULL_UP``crwdne329260:0""" + ... + + def get_pull(self) -> int: + """crwdns329264:0crwdne329264:0 (crwdns329262:0crwdne329262:0) + +Example: ``pin0.get_pull()`` + +:return: ``NO_PULL``, ``PULL_DOWN``, or ``PULL_UP`` + +These are set using the ``set_pull()`` method or automatically configured +when a pin mode requires it.""" + ... + + def get_mode(self) -> str: + """crwdns329268:0crwdne329268:0 (crwdns329266:0crwdne329266:0) + +Example: ``pin0.get_mode()`` + +When a pin is used for a specific function, like +writing a digital value, or reading an analog value, the pin mode +changes. + +:return: ``"unused"``, ``"analog"``, ``"read_digital"``, ``"write_digital"``, ``"display"``, ``"button"``, ``"music"``, ``"audio"``, ``"touch"``, ``"i2c"``, or ``"spi"``""" + ... + + def write_analog(self, value: int) -> None: + """crwdns329272:0``value``crwdne329272:0 (crwdns329270:0crwdne329270:0) + +Example: ``pin0.write_analog(254)`` + +:param value: (crwdns329274:0crwdne329274:0) crwdns329276:0crwdne329276:0""" + + def set_analog_period(self, period: int) -> None: + """crwdns329280:0``period``crwdne329280:0 (crwdns329278:0crwdne329278:0) + +Example: ``pin0.set_analog_period(10)`` + +:param period: (crwdns329282:0crwdne329282:0) crwdns329284:0crwdne329284:0""" + + def set_analog_period_microseconds(self, period: int) -> None: + """crwdns329288:0``period``crwdne329288:0 (crwdns329286:0crwdne329286:0) + +Example: ``pin0.set_analog_period_microseconds(512)`` + +:param period: (crwdns329290:0crwdne329290:0) crwdns329292:0crwdne329292:0""" + +class MicroBitAnalogDigitalPin(MicroBitDigitalPin): + """crwdns329296:0crwdne329296:0 (crwdns329294:0crwdne329294:0)""" + + def read_analog(self) -> int: + """crwdns329300:0crwdne329300:0 (crwdns329298:0crwdne329298:0) + +Example: ``pin0.read_analog()`` + +:return: An integer between 0 (meaning 0V) and 1023 (meaning 3.3V).""" + +class MicroBitTouchPin(MicroBitAnalogDigitalPin): + """crwdns329304:0crwdne329304:0 (crwdns329302:0crwdne329302:0)""" + CAPACITIVE: int + RESISTIVE: int + + def is_touched(self) -> bool: + """crwdns329308:0crwdne329308:0 (crwdns329306:0crwdne329306:0) + +Example: ``pin0.is_touched()`` + +The default touch mode for the pins on the edge connector is ``resistive``. +The default for the logo pin **V2** is ``capacitive``. + +**Resistive touch** +This test is done by measuring how much resistance there is between the +pin and ground. A low resistance gives a reading of ``True``. To get +a reliable reading using a finger you may need to touch the ground pin +with another part of your body, for example your other hand. + +**Capacitive touch** +This test is done by interacting with the electric field of a capacitor +using a finger as a conductor. `Capacitive touch +`_ +does not require you to make a ground connection as part of a circuit. + +:return: ``True`` if the pin is being touched with a finger, otherwise return ``False``.""" + ... + + def set_touch_mode(self, value: int) -> None: + """crwdns329312:0crwdne329312:0 (crwdns329310:0crwdne329310:0) + +Example: ``pin0.set_touch_mode(pin0.CAPACITIVE)`` + +The default touch mode for the pins on the edge connector is +``resistive``. The default for the logo pin **V2** is ``capacitive``. + +:param value: (crwdns329314:0crwdne329314:0) crwdns329316:0``CAPACITIVE``crwdnd329316:0``RESISTIVE``crwdne329316:0""" + ... +pin0: MicroBitTouchPin +"""crwdns329320:0crwdne329320:0 (crwdns329318:0crwdne329318:0)""" +pin1: MicroBitTouchPin +"""crwdns329324:0crwdne329324:0 (crwdns329322:0crwdne329322:0)""" +pin2: MicroBitTouchPin +"""crwdns329328:0crwdne329328:0 (crwdns329326:0crwdne329326:0)""" +pin3: MicroBitAnalogDigitalPin +"""crwdns329332:0crwdne329332:0 (crwdns329330:0crwdne329330:0)""" +pin4: MicroBitAnalogDigitalPin +"""crwdns329336:0crwdne329336:0 (crwdns329334:0crwdne329334:0)""" +pin5: MicroBitDigitalPin +"""crwdns329340:0crwdne329340:0 (crwdns329338:0crwdne329338:0)""" +pin6: MicroBitDigitalPin +"""crwdns329344:0crwdne329344:0 (crwdns329342:0crwdne329342:0)""" +pin7: MicroBitDigitalPin +"""crwdns329348:0crwdne329348:0 (crwdns329346:0crwdne329346:0)""" +pin8: MicroBitDigitalPin +"""crwdns329352:0crwdne329352:0 (crwdns329350:0crwdne329350:0)""" +pin9: MicroBitDigitalPin +"""crwdns329356:0crwdne329356:0 (crwdns329354:0crwdne329354:0)""" +pin10: MicroBitAnalogDigitalPin +"""crwdns329360:0crwdne329360:0 (crwdns329358:0crwdne329358:0)""" +pin11: MicroBitDigitalPin +"""crwdns329364:0crwdne329364:0 (crwdns329362:0crwdne329362:0)""" +pin12: MicroBitDigitalPin +"""crwdns329368:0crwdne329368:0 (crwdns329366:0crwdne329366:0)""" +pin13: MicroBitDigitalPin +"""crwdns329372:0crwdne329372:0 (crwdns329370:0crwdne329370:0)""" +pin14: MicroBitDigitalPin +"""crwdns329376:0crwdne329376:0 (crwdns329374:0crwdne329374:0)""" +pin15: MicroBitDigitalPin +"""crwdns329380:0crwdne329380:0 (crwdns329378:0crwdne329378:0)""" +pin16: MicroBitDigitalPin +"""crwdns329384:0crwdne329384:0 (crwdns329382:0crwdne329382:0)""" +pin19: MicroBitDigitalPin +"""crwdns329388:0crwdne329388:0 (crwdns329386:0crwdne329386:0)""" +pin20: MicroBitDigitalPin +"""crwdns329392:0crwdne329392:0 (crwdns329390:0crwdne329390:0)""" +pin_logo: MicroBitTouchPin +"""crwdns329396:0crwdne329396:0 (crwdns329394:0crwdne329394:0)""" +pin_speaker: MicroBitAnalogDigitalPin +"""crwdns329400:0crwdne329400:0 (crwdns329398:0crwdne329398:0) + +This API is intended only for use in Pulse-Width Modulation pin operations e.g. pin_speaker.write_analog(128). +""" + +class Image: + """crwdns329404:0crwdne329404:0 (crwdns329402:0crwdne329402:0) + +Given an image object it's possible to display it via the ``display`` API:: + + display.show(Image.HAPPY)""" + HEART: Image + """crwdns329408:0crwdne329408:0 (crwdns329406:0crwdne329406:0)""" + HEART_SMALL: Image + """crwdns329412:0crwdne329412:0 (crwdns329410:0crwdne329410:0)""" + HAPPY: Image + """crwdns329416:0crwdne329416:0 (crwdns329414:0crwdne329414:0)""" + SMILE: Image + """crwdns329420:0crwdne329420:0 (crwdns329418:0crwdne329418:0)""" + SAD: Image + """crwdns329424:0crwdne329424:0 (crwdns329422:0crwdne329422:0)""" + CONFUSED: Image + """crwdns329428:0crwdne329428:0 (crwdns329426:0crwdne329426:0)""" + ANGRY: Image + """crwdns329432:0crwdne329432:0 (crwdns329430:0crwdne329430:0)""" + ASLEEP: Image + """crwdns329436:0crwdne329436:0 (crwdns329434:0crwdne329434:0)""" + SURPRISED: Image + """crwdns329440:0crwdne329440:0 (crwdns329438:0crwdne329438:0)""" + SILLY: Image + """crwdns329444:0crwdne329444:0 (crwdns329442:0crwdne329442:0)""" + FABULOUS: Image + """crwdns329448:0crwdne329448:0 (crwdns329446:0crwdne329446:0)""" + MEH: Image + """crwdns329452:0crwdne329452:0 (crwdns329450:0crwdne329450:0)""" + YES: Image + """crwdns329456:0crwdne329456:0 (crwdns329454:0crwdne329454:0)""" + NO: Image + """crwdns329460:0crwdne329460:0 (crwdns329458:0crwdne329458:0)""" + CLOCK12: Image + """crwdns329464:0crwdne329464:0 (crwdns329462:0crwdne329462:0)""" + CLOCK11: Image + """crwdns329468:0crwdne329468:0 (crwdns329466:0crwdne329466:0)""" + CLOCK10: Image + """crwdns329472:0crwdne329472:0 (crwdns329470:0crwdne329470:0)""" + CLOCK9: Image + """crwdns329476:0crwdne329476:0 (crwdns329474:0crwdne329474:0)""" + CLOCK8: Image + """crwdns329480:0crwdne329480:0 (crwdns329478:0crwdne329478:0)""" + CLOCK7: Image + """crwdns329484:0crwdne329484:0 (crwdns329482:0crwdne329482:0)""" + CLOCK6: Image + """crwdns329488:0crwdne329488:0 (crwdns329486:0crwdne329486:0)""" + CLOCK5: Image + """crwdns329492:0crwdne329492:0 (crwdns329490:0crwdne329490:0)""" + CLOCK4: Image + """crwdns329496:0crwdne329496:0 (crwdns329494:0crwdne329494:0)""" + CLOCK3: Image + """crwdns329500:0crwdne329500:0 (crwdns329498:0crwdne329498:0)""" + CLOCK2: Image + """crwdns329504:0crwdne329504:0 (crwdns329502:0crwdne329502:0)""" + CLOCK1: Image + """crwdns329508:0crwdne329508:0 (crwdns329506:0crwdne329506:0)""" + ARROW_N: Image + """crwdns329512:0crwdne329512:0 (crwdns329510:0crwdne329510:0)""" + ARROW_NE: Image + """crwdns329516:0crwdne329516:0 (crwdns329514:0crwdne329514:0)""" + ARROW_E: Image + """crwdns329520:0crwdne329520:0 (crwdns329518:0crwdne329518:0)""" + ARROW_SE: Image + """crwdns329524:0crwdne329524:0 (crwdns329522:0crwdne329522:0)""" + ARROW_S: Image + """crwdns329528:0crwdne329528:0 (crwdns329526:0crwdne329526:0)""" + ARROW_SW: Image + """crwdns329532:0crwdne329532:0 (crwdns329530:0crwdne329530:0)""" + ARROW_W: Image + """crwdns329536:0crwdne329536:0 (crwdns329534:0crwdne329534:0)""" + ARROW_NW: Image + """crwdns329540:0crwdne329540:0 (crwdns329538:0crwdne329538:0)""" + TRIANGLE: Image + """crwdns329544:0crwdne329544:0 (crwdns329542:0crwdne329542:0)""" + TRIANGLE_LEFT: Image + """crwdns329548:0crwdne329548:0 (crwdns329546:0crwdne329546:0)""" + CHESSBOARD: Image + """crwdns329552:0crwdne329552:0 (crwdns329550:0crwdne329550:0)""" + DIAMOND: Image + """crwdns329556:0crwdne329556:0 (crwdns329554:0crwdne329554:0)""" + DIAMOND_SMALL: Image + """crwdns329560:0crwdne329560:0 (crwdns329558:0crwdne329558:0)""" + SQUARE: Image + """crwdns329564:0crwdne329564:0 (crwdns329562:0crwdne329562:0)""" + SQUARE_SMALL: Image + """crwdns329568:0crwdne329568:0 (crwdns329566:0crwdne329566:0)""" + RABBIT: Image + """crwdns329572:0crwdne329572:0 (crwdns329570:0crwdne329570:0)""" + COW: Image + """crwdns329576:0crwdne329576:0 (crwdns329574:0crwdne329574:0)""" + MUSIC_CROTCHET: Image + """crwdns329580:0crwdne329580:0 (crwdns329578:0crwdne329578:0)""" + MUSIC_QUAVER: Image + """crwdns329584:0crwdne329584:0 (crwdns329582:0crwdne329582:0)""" + MUSIC_QUAVERS: Image + """crwdns329588:0crwdne329588:0 (crwdns329586:0crwdne329586:0)""" + PITCHFORK: Image + """crwdns329592:0crwdne329592:0 (crwdns329590:0crwdne329590:0)""" + XMAS: Image + """crwdns329596:0crwdne329596:0 (crwdns329594:0crwdne329594:0)""" + PACMAN: Image + """crwdns329600:0crwdne329600:0 (crwdns329598:0crwdne329598:0)""" + TARGET: Image + """crwdns329604:0crwdne329604:0 (crwdns329602:0crwdne329602:0)""" + TSHIRT: Image + """crwdns329608:0crwdne329608:0 (crwdns329606:0crwdne329606:0)""" + ROLLERSKATE: Image + """crwdns329612:0crwdne329612:0 (crwdns329610:0crwdne329610:0)""" + DUCK: Image + """crwdns329616:0crwdne329616:0 (crwdns329614:0crwdne329614:0)""" + HOUSE: Image + """crwdns329620:0crwdne329620:0 (crwdns329618:0crwdne329618:0)""" + TORTOISE: Image + """crwdns329624:0crwdne329624:0 (crwdns329622:0crwdne329622:0)""" + BUTTERFLY: Image + """crwdns329628:0crwdne329628:0 (crwdns329626:0crwdne329626:0)""" + STICKFIGURE: Image + """crwdns329632:0crwdne329632:0 (crwdns329630:0crwdne329630:0)""" + GHOST: Image + """crwdns329636:0crwdne329636:0 (crwdns329634:0crwdne329634:0)""" + SWORD: Image + """crwdns329640:0crwdne329640:0 (crwdns329638:0crwdne329638:0)""" + GIRAFFE: Image + """crwdns329644:0crwdne329644:0 (crwdns329642:0crwdne329642:0)""" + SKULL: Image + """crwdns329648:0crwdne329648:0 (crwdns329646:0crwdne329646:0)""" + UMBRELLA: Image + """crwdns329652:0crwdne329652:0 (crwdns329650:0crwdne329650:0)""" + SNAKE: Image + """crwdns329656:0crwdne329656:0 (crwdns329654:0crwdne329654:0)""" + SCISSORS: Image + """crwdns335820:0crwdne335820:0 (crwdns335818:0crwdne335818:0)""" + ALL_CLOCKS: List[Image] + """crwdns329660:0crwdne329660:0 (crwdns329658:0crwdne329658:0)""" + ALL_ARROWS: List[Image] + """crwdns329664:0crwdne329664:0 (crwdns329662:0crwdne329662:0)""" + + @overload + def __init__(self, string: str) -> None: + """crwdns329668:0crwdne329668:0 (crwdns329666:0crwdne329666:0) + +``string`` has to consist of digits 0-9 arranged into lines, +describing the image, for example:: + + image = Image("90009:" + "09090:" + "00900:" + "09090:" + "90009") + +will create a 5×5 image of an X. The end of a line is indicated by a +colon. It's also possible to use newlines (\\n) insead of the colons. + +:param string: (crwdns329670:0crwdne329670:0) crwdns329672:0crwdne329672:0""" + ... + + @overload + def __init__(self, width: int=5, height: int=5, buffer: ReadableBuffer=None) -> None: + """crwdns329676:0``width``crwdnd329676:0``height``crwdne329676:0 (crwdns329674:0crwdne329674:0) + +:param width: (crwdns329686:0crwdne329686:0) crwdns329688:0crwdne329688:0 +:param height: (crwdns329682:0crwdne329682:0) crwdns329684:0crwdne329684:0 +:param buffer: (crwdns329678:0crwdne329678:0) crwdns329680:0``width``crwdnd329680:0``height``crwdne329680:0 + +Examples:: + + Image(2, 2, b'\x08\x08\x08\x08') + Image(2, 2, bytearray([9,9,9,9])) + +These create 2 x 2 pixel images at full brightness.""" + ... + + def width(self) -> int: + """crwdns329692:0crwdne329692:0 (crwdns329690:0crwdne329690:0) + +:return: The number of columns in the image""" + ... + + def height(self) -> int: + """crwdns329696:0crwdne329696:0 (crwdns329694:0crwdne329694:0) + +:return: The number of rows in the image""" + ... + + def set_pixel(self, x: int, y: int, value: int) -> None: + """crwdns329700:0crwdne329700:0 (crwdns329698:0crwdne329698:0) + +Example: ``my_image.set_pixel(0, 0, 9)`` + +:param x: (crwdns329706:0crwdne329706:0) crwdns329708:0crwdne329708:0 +:param y: (crwdns329710:0crwdne329710:0) crwdns329712:0crwdne329712:0 +:param value: (crwdns329702:0crwdne329702:0) crwdns329704:0crwdne329704:0 + +This method will raise an exception when called on any of the built-in +read-only images, like ``Image.HEART``.""" + ... + + def get_pixel(self, x: int, y: int) -> int: + """crwdns329716:0crwdne329716:0 (crwdns329714:0crwdne329714:0) + +Example: ``my_image.get_pixel(0, 0)`` + +:param x: (crwdns329718:0crwdne329718:0) crwdns329720:0crwdne329720:0 +:param y: (crwdns329722:0crwdne329722:0) crwdns329724:0crwdne329724:0 +:return: The brightness as an integer between 0 and 9.""" + ... + + def shift_left(self, n: int) -> Image: + """crwdns329728:0crwdne329728:0 (crwdns329726:0crwdne329726:0) + +Example: ``Image.HEART_SMALL.shift_left(1)`` + +:param n: (crwdns329730:0crwdne329730:0) crwdns329732:0crwdne329732:0 +:return: The shifted image""" + ... + + def shift_right(self, n: int) -> Image: + """crwdns329736:0crwdne329736:0 (crwdns329734:0crwdne329734:0) + +Example: ``Image.HEART_SMALL.shift_right(1)`` + +:param n: (crwdns329738:0crwdne329738:0) crwdns329740:0crwdne329740:0 +:return: The shifted image""" + ... + + def shift_up(self, n: int) -> Image: + """crwdns329744:0crwdne329744:0 (crwdns329742:0crwdne329742:0) + +Example: ``Image.HEART_SMALL.shift_up(1)`` + +:param n: (crwdns329746:0crwdne329746:0) crwdns329748:0crwdne329748:0 +:return: The shifted image""" + ... + + def shift_down(self, n: int) -> Image: + """crwdns329752:0crwdne329752:0 (crwdns329750:0crwdne329750:0) + +Example: ``Image.HEART_SMALL.shift_down(1)`` + +:param n: (crwdns329754:0crwdne329754:0) crwdns329756:0crwdne329756:0 +:return: The shifted image""" + ... + + def crop(self, x: int, y: int, w: int, h: int) -> Image: + """crwdns329760:0crwdne329760:0 (crwdns329758:0crwdne329758:0) + +Example: ``Image.HEART.crop(1, 1, 3, 3)`` + +:param x: (crwdns329770:0crwdne329770:0) crwdns329772:0crwdne329772:0 +:param y: (crwdns329774:0crwdne329774:0) crwdns329776:0crwdne329776:0 +:param w: (crwdns329766:0crwdne329766:0) crwdns329768:0crwdne329768:0 +:param h: (crwdns329762:0crwdne329762:0) crwdns329764:0crwdne329764:0 +:return: The new image""" + ... + + def copy(self) -> Image: + """crwdns329780:0crwdne329780:0 (crwdns329778:0crwdne329778:0) + +Example: ``Image.HEART.copy()`` + +:return: The new image""" + ... + + def invert(self) -> Image: + """crwdns329784:0crwdne329784:0 (crwdns329782:0crwdne329782:0) + +Example: ``Image.SMALL_HEART.invert()`` + +:return: The new image.""" + ... + + def fill(self, value: int) -> None: + """crwdns329788:0crwdne329788:0 (crwdns329786:0crwdne329786:0) + +Example: ``my_image.fill(5)`` + +:param value: (crwdns329790:0crwdne329790:0) crwdns329792:0crwdne329792:0 + +This method will raise an exception when called on any of the built-in +read-only images, like ``Image.HEART``.""" + ... + + def blit(self, src: Image, x: int, y: int, w: int, h: int, xdest: int=0, ydest: int=0) -> None: + """crwdns329796:0crwdne329796:0 (crwdns329794:0crwdne329794:0) + +Example: ``my_image.blit(Image.HEART, 1, 1, 3, 3, 1, 1)`` + +:param src: (crwdns329802:0crwdne329802:0) crwdns329804:0crwdne329804:0 +:param x: (crwdns329810:0crwdne329810:0) crwdns329812:0crwdne329812:0 +:param y: (crwdns329818:0crwdne329818:0) crwdns329820:0crwdne329820:0 +:param w: (crwdns329806:0crwdne329806:0) crwdns329808:0crwdne329808:0 +:param h: (crwdns329798:0crwdne329798:0) crwdns329800:0crwdne329800:0 +:param xdest: (crwdns329814:0crwdne329814:0) crwdns329816:0crwdne329816:0 +:param ydest: (crwdns329822:0crwdne329822:0) crwdns329824:0crwdne329824:0 + +Pixels outside the source image are treated as having a brightness of 0. + +``shift_left()``, ``shift_right()``, ``shift_up()``, ``shift_down()`` +and ``crop()`` can are all implemented by using ``blit()``. + +For example, img.crop(x, y, w, h) can be implemented as:: + + def crop(self, x, y, w, h): + res = Image(w, h) + res.blit(self, x, y, w, h) + return res""" + ... + + def __repr__(self) -> str: + """crwdns329828:0crwdne329828:0 (crwdns329826:0crwdne329826:0)""" + ... + + def __str__(self) -> str: + """crwdns329832:0crwdne329832:0 (crwdns329830:0crwdne329830:0)""" + ... + + def __add__(self, other: Image) -> Image: + """crwdns329836:0crwdne329836:0 (crwdns329834:0crwdne329834:0) + +Example: ``Image.HEART + Image.HAPPY`` + +:param other: (crwdns329838:0crwdne329838:0) crwdns329840:0crwdne329840:0""" + ... + + def __sub__(self, other: Image) -> Image: + """crwdns329844:0crwdne329844:0 (crwdns329842:0crwdne329842:0) + +Example: ``Image.HEART - Image.HEART_SMALL`` + +:param other: (crwdns329846:0crwdne329846:0) crwdns329848:0crwdne329848:0""" + ... + + def __mul__(self, n: float) -> Image: + """crwdns329852:0``n``crwdne329852:0 (crwdns329850:0crwdne329850:0) + +Example: ``Image.HEART * 0.5`` + +:param n: (crwdns329854:0crwdne329854:0) crwdns329856:0crwdne329856:0""" + ... + + def __truediv__(self, n: float) -> Image: + """crwdns329860:0``n``crwdne329860:0 (crwdns329858:0crwdne329858:0) + +Example: ``Image.HEART / 2`` + +:param n: (crwdns329862:0crwdne329862:0) crwdns329864:0crwdne329864:0""" + ... + +class SoundEvent: + LOUD: SoundEvent + """crwdns334408:0``quiet``crwdnd334408:0``loud``crwdne334408:0 (crwdns329866:0crwdne329866:0)""" + QUIET: SoundEvent + """crwdns334410:0``loud``crwdnd334410:0``quiet``crwdne334410:0 (crwdns329870:0crwdne329870:0)""" + +class Sound: + """crwdns329876:0``audio.play(Sound.NAME)``crwdne329876:0 (crwdns329874:0crwdne329874:0)""" + GIGGLE: Sound + """crwdns329880:0crwdne329880:0 (crwdns329878:0crwdne329878:0)""" + HAPPY: Sound + """crwdns329884:0crwdne329884:0 (crwdns329882:0crwdne329882:0)""" + HELLO: Sound + """crwdns329888:0crwdne329888:0 (crwdns329886:0crwdne329886:0)""" + MYSTERIOUS: Sound + """crwdns329892:0crwdne329892:0 (crwdns329890:0crwdne329890:0)""" + SAD: Sound + """crwdns329896:0crwdne329896:0 (crwdns329894:0crwdne329894:0)""" + SLIDE: Sound + """crwdns329900:0crwdne329900:0 (crwdns329898:0crwdne329898:0)""" + SOARING: Sound + """crwdns329904:0crwdne329904:0 (crwdns329902:0crwdne329902:0)""" + SPRING: Sound + """crwdns329908:0crwdne329908:0 (crwdns329906:0crwdne329906:0)""" + TWINKLE: Sound + """crwdns329912:0crwdne329912:0 (crwdns329910:0crwdne329910:0)""" + YAWN: Sound + """crwdns329916:0crwdne329916:0 (crwdns329914:0crwdne329914:0)""" \ No newline at end of file diff --git a/lang/lol/typeshed/stdlib/microbit/accelerometer.pyi b/lang/lol/typeshed/stdlib/microbit/accelerometer.pyi new file mode 100644 index 0000000..23c0aee --- /dev/null +++ b/lang/lol/typeshed/stdlib/microbit/accelerometer.pyi @@ -0,0 +1,103 @@ +"""crwdns329920:0crwdne329920:0 (crwdns329918:0crwdne329918:0)""" +from typing import Tuple + +def get_x() -> int: + """crwdns329924:0``x``crwdne329924:0 (crwdns329922:0crwdne329922:0) + +Example: ``accelerometer.get_x()`` + +:return: A positive or negative integer depending on direction in the range +/- 2000mg.""" + ... + +def get_y() -> int: + """crwdns329928:0``y``crwdne329928:0 (crwdns329926:0crwdne329926:0) + +Example: ``accelerometer.get_y()`` + +:return: A positive or negative integer depending on direction in the range +/- 2000mg.""" + ... + +def get_z() -> int: + """crwdns329932:0``z``crwdne329932:0 (crwdns329930:0crwdne329930:0) + +Example: ``accelerometer.get_z()`` + +:return: A positive or negative integer depending on direction in the range +/- 2000mg.""" + ... + +def get_values() -> Tuple[int, int, int]: + """crwdns329936:0crwdne329936:0 (crwdns329934:0crwdne329934:0) + +Example: ``x, y, z = accelerometer.get_values()`` + +: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""" + ... + +def get_strength() -> int: + """crwdns335824:0crwdne335824:0 (crwdns335822:0crwdne335822:0) + +Example: ``accelerometer.get_strength()`` + +:return: The combined acceleration strength of all the axes, in milli-g.""" + ... + +def current_gesture() -> str: + """crwdns329940:0crwdne329940:0 (crwdns329938:0crwdne329938:0) + +Example: ``accelerometer.current_gesture()`` + +MicroPython understands the following gesture names: ``"up"``, ``"down"``, +``"left"``, ``"right"``, ``"face up"``, ``"face down"``, ``"freefall"``, +``"3g"``, ``"6g"``, ``"8g"``, ``"shake"``. Gestures are always +represented as strings. + +:return: The current gesture""" + ... + +def is_gesture(name: str) -> bool: + """crwdns329944:0crwdne329944:0 (crwdns329942:0crwdne329942:0) + +Example: ``accelerometer.is_gesture('shake')`` + +MicroPython understands the following gesture names: ``"up"``, ``"down"``, +``"left"``, ``"right"``, ``"face up"``, ``"face down"``, ``"freefall"``, +``"3g"``, ``"6g"``, ``"8g"``, ``"shake"``. Gestures are always +represented as strings. + +:param name: (crwdns329946:0crwdne329946:0) crwdns329948:0crwdne329948:0 +:return: ``True`` if the gesture is active, ``False`` otherwise.""" + ... + +def was_gesture(name: str) -> bool: + """crwdns329952:0crwdne329952:0 (crwdns329950:0crwdne329950:0) + +Example: ``accelerometer.was_gesture('shake')`` + +MicroPython understands the following gesture names: ``"up"``, ``"down"``, +``"left"``, ``"right"``, ``"face up"``, ``"face down"``, ``"freefall"``, +``"3g"``, ``"6g"``, ``"8g"``, ``"shake"``. Gestures are always +represented as strings. + +:param name: (crwdns329954:0crwdne329954:0) crwdns329956:0crwdne329956:0 +:return: ``True`` if the gesture was active since the last call, ``False`` otherwise.""" + +def get_gestures() -> Tuple[str, ...]: + """crwdns329960:0crwdne329960:0 (crwdns329958:0crwdne329958:0) + +Example: ``accelerometer.get_gestures()`` + +Clears the gesture history before returning. + +Gestures are not updated in the background so there needs to be constant +calls to some accelerometer method to do the gesture detection. Usually +gestures can be detected using a loop with a small :func:`microbit.sleep` delay. + +:return: The history as a tuple, most recent last.""" + ... + +def set_range(value: int) -> None: + """crwdns335828:0``2``crwdnd335828:0``4``crwdnd335828:0``8``crwdne335828:0 (crwdns335826:0crwdne335826:0) + +Example: ``accelerometer.set_range(8)`` + +:param value: (crwdns335830:0crwdne335830:0) crwdns335832:0``g``crwdne335832:0""" \ No newline at end of file diff --git a/lang/lol/typeshed/stdlib/microbit/audio.pyi b/lang/lol/typeshed/stdlib/microbit/audio.pyi new file mode 100644 index 0000000..8cbcbf8 --- /dev/null +++ b/lang/lol/typeshed/stdlib/microbit/audio.pyi @@ -0,0 +1,123 @@ +"""crwdns329964:0``audio``crwdne329964:0 (crwdns329962:0crwdne329962:0)""" +from ..microbit import MicroBitDigitalPin, Sound, pin0 +from typing import ClassVar, Iterable, Union + +def play(source: Union[Iterable[AudioFrame], Sound, SoundEffect], wait: bool=True, pin: MicroBitDigitalPin=pin0, return_pin: Union[MicroBitDigitalPin, None]=None) -> None: + """crwdns335834:0crwdne335834:0 (crwdns329966:0crwdne329966:0) + +Example: ``audio.play(Sound.GIGGLE)`` + +:param source: (crwdns329978:0crwdne329978:0) crwdns335836:0``Sound``crwdnd335836:0``Sound.GIGGLE``crwdnd335836:0``SoundEffect``crwdnd335836:0``AudioFrame``crwdne335836:0 +:param wait: (crwdns329982:0crwdne329982:0) crwdns329984:0``wait``crwdnd329984:0``True``crwdne329984:0 +:param pin: (crwdns329970:0crwdne329970:0) crwdns329972:0``pin0``crwdne329972:0 +:param return_pin: (crwdns329974:0crwdne329974:0) crwdns329976:0crwdne329976:0""" + +def is_playing() -> bool: + """crwdns329988:0crwdne329988:0 (crwdns329986:0crwdne329986:0) + +Example: ``audio.is_playing()`` + +:return: ``True`` if audio is playing, otherwise ``False``.""" + ... + +def stop() -> None: + """crwdns329992:0crwdne329992:0 (crwdns329990:0crwdne329990:0) + +Example: ``audio.stop()``""" + ... + +class SoundEffect: + """crwdns335840:0crwdne335840:0 (crwdns335838:0crwdne335838:0)""" + WAVEFORM_SINE: ClassVar[int] + """crwdns335844:0``waveform``crwdne335844:0 (crwdns335842:0crwdne335842:0)""" + WAVEFORM_SAWTOOTH: ClassVar[int] + """crwdns335848:0``waveform``crwdne335848:0 (crwdns335846:0crwdne335846:0)""" + WAVEFORM_TRIANGLE: ClassVar[int] + """crwdns335852:0``waveform``crwdne335852:0 (crwdns335850:0crwdne335850:0)""" + WAVEFORM_SQUARE: ClassVar[int] + """crwdns335856:0``waveform``crwdne335856:0 (crwdns335854:0crwdne335854:0)""" + WAVEFORM_NOISE: ClassVar[int] + """crwdns335860:0``waveform``crwdne335860:0 (crwdns335858:0crwdne335858:0)""" + SHAPE_LINEAR: ClassVar[int] + """crwdns335864:0``shape``crwdne335864:0 (crwdns335862:0crwdne335862:0)""" + SHAPE_CURVE: ClassVar[int] + """crwdns335868:0``shape``crwdne335868:0 (crwdns335866:0crwdne335866:0)""" + SHAPE_LOG: ClassVar[int] + """crwdns335872:0``shape``crwdne335872:0 (crwdns335870:0crwdne335870:0)""" + FX_NONE: ClassVar[int] + """crwdns335876:0``fx``crwdne335876:0 (crwdns335874:0crwdne335874:0)""" + FX_TREMOLO: ClassVar[int] + """crwdns335880:0``fx``crwdne335880:0 (crwdns335878:0crwdne335878:0)""" + FX_VIBRATO: ClassVar[int] + """crwdns335884:0``fx``crwdne335884:0 (crwdns335882:0crwdne335882:0)""" + FX_WARBLE: ClassVar[int] + """crwdns335888:0``fx``crwdne335888:0 (crwdns335886:0crwdne335886:0)""" + freq_start: int + """crwdns335892:0``0``crwdnd335892:0``9999``crwdne335892:0 (crwdns335890:0crwdne335890:0)""" + freq_end: int + """crwdns335896:0``0``crwdnd335896:0``9999``crwdne335896:0 (crwdns335894:0crwdne335894:0)""" + duration: int + """crwdns335900:0``0``crwdnd335900:0``9999``crwdne335900:0 (crwdns335898:0crwdne335898:0)""" + vol_start: int + """crwdns335904:0``0``crwdnd335904:0``255``crwdne335904:0 (crwdns335902:0crwdne335902:0)""" + vol_end: int + """crwdns335908:0``0``crwdnd335908:0``255``crwdne335908:0 (crwdns335906:0crwdne335906:0)""" + waveform: int + """crwdns335912:0``WAVEFORM_SINE``crwdnd335912:0``WAVEFORM_SAWTOOTH``crwdnd335912:0``WAVEFORM_TRIANGLE``crwdnd335912:0``WAVEFORM_SQUARE``crwdnd335912:0``WAVEFORM_NOISE``crwdne335912:0 (crwdns335910:0crwdne335910:0)""" + fx: int + """crwdns335916:0``FX_TREMOLO``crwdnd335916:0``FX_VIBRATO``crwdnd335916:0``FX_WARBLE``crwdnd335916:0``FX_NONE``crwdne335916:0 (crwdns335914:0crwdne335914:0)""" + shape: int + """crwdns335920:0``SHAPE_LINEAR``crwdnd335920:0``SHAPE_CURVE``crwdnd335920:0``SHAPE_LOG``crwdne335920:0 (crwdns335918:0crwdne335918:0)""" + + 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): + """crwdns335924:0crwdne335924:0 (crwdns335922:0crwdne335922:0) + +Example: ``my_effect = SoundEffect(duration=1000)`` + +All the parameters are optional, with default values as shown above, and +they can all be modified via attributes of the same name. For example, we +can first create an effect ``my_effect = SoundEffect(duration=1000)``, +and then change its attributes ``my_effect.duration = 500``. + +:param freq_start: (crwdns335934:0crwdne335934:0) crwdns335936:0``0``crwdnd335936:0``9999``crwdne335936:0 +:param freq_end: (crwdns335930:0crwdne335930:0) crwdns335932:0``0``crwdnd335932:0``9999``crwdne335932:0 +:param duration: (crwdns335926:0crwdne335926:0) crwdns335928:0``0``crwdnd335928:0``9999``crwdne335928:0 +:param vol_start: (crwdns335950:0crwdne335950:0) crwdns335952:0``0``crwdnd335952:0``255``crwdne335952:0 +:param vol_end: (crwdns335946:0crwdne335946:0) crwdns335948:0``0``crwdnd335948:0``255``crwdne335948:0 +:param waveform: (crwdns335954:0crwdne335954:0) crwdns335956:0``WAVEFORM_SINE``crwdnd335956:0``WAVEFORM_SAWTOOTH``crwdnd335956:0``WAVEFORM_TRIANGLE``crwdnd335956:0``WAVEFORM_SQUARE``crwdnd335956:0``WAVEFORM_NOISE``crwdne335956:0 +:param fx: (crwdns335938:0crwdne335938:0) crwdns335940:0``FX_TREMOLO``crwdnd335940:0``FX_VIBRATO``crwdnd335940:0``FX_WARBLE``crwdnd335940:0``FX_NONE``crwdne335940:0 +:param shape: (crwdns335942:0crwdne335942:0) crwdns335944:0``SHAPE_LINEAR``crwdnd335944:0``SHAPE_CURVE``crwdnd335944:0``SHAPE_LOG``crwdne335944:0""" + + def copy(self) -> SoundEffect: + """crwdns335960:0``SoundEffect``crwdne335960:0 (crwdns335958:0crwdne335958:0) + +Example: ``sound_2 = sound_1.copy()`` + +:return: A copy of the SoundEffect.""" + +class AudioFrame: + """crwdns329996:0``AudioFrame``crwdne329996:0 (crwdns329994:0crwdne329994:0) + +It takes just over 4 ms to play a single frame. + +Example:: + + frame = AudioFrame() + for i in range(len(frame)): + frame[i] = 252 - i * 8""" + + def copyfrom(self, other: AudioFrame) -> None: + """crwdns335964:0``AudioFrame``crwdnd335964:0``AudioFrame``crwdne335964:0 (crwdns335962:0crwdne335962:0) + +Example: ``my_frame.copyfrom(source_frame)`` + +:param other: (crwdns335966:0crwdne335966:0) crwdns335968:0``AudioFrame``crwdne335968:0""" + + def __len__(self) -> int: + ... + + def __setitem__(self, key: int, value: int) -> None: + ... + + def __getitem__(self, key: int) -> int: + ... \ No newline at end of file diff --git a/lang/lol/typeshed/stdlib/microbit/compass.pyi b/lang/lol/typeshed/stdlib/microbit/compass.pyi new file mode 100644 index 0000000..38bf5a4 --- /dev/null +++ b/lang/lol/typeshed/stdlib/microbit/compass.pyi @@ -0,0 +1,70 @@ +"""crwdns330004:0crwdne330004:0 (crwdns330002:0crwdne330002:0)""" + +def calibrate() -> None: + """crwdns330008:0crwdne330008:0 (crwdns330006:0crwdne330006:0) + +Example: ``compass.calibrate()`` + +An instructive message will be scrolled to the user after which they will need +to rotate the device in order to draw a circle on the LED display.""" + ... + +def is_calibrated() -> bool: + """crwdns330012:0crwdne330012:0 (crwdns330010:0crwdne330010:0) + +Example: ``compass.is_calibrated()`` + +:return: ``True`` if the compass has been successfully calibrated, ``False`` otherwise.""" + ... + +def clear_calibration() -> None: + """crwdns330016:0crwdne330016:0 (crwdns330014:0crwdne330014:0) + +Example: ``compass.clear_calibration()``""" + ... + +def get_x() -> int: + """crwdns330020:0``x``crwdne330020:0 (crwdns330018:0crwdne330018:0) + +Example: ``compass.get_x()`` + +Call ``calibrate`` first or the results will be inaccurate. + +:return: A positive or negative integer in nano tesla representing the magnitude and direction of the field.""" + ... + +def get_y() -> int: + """crwdns330024:0``y``crwdne330024:0 (crwdns330022:0crwdne330022:0) + +Example: ``compass.get_y()`` + +Call ``calibrate`` first or the results will be inaccurate. + +:return: A positive or negative integer in nano tesla representing the magnitude and direction of the field.""" + ... + +def get_z() -> int: + """crwdns330028:0``z``crwdne330028:0 (crwdns330026:0crwdne330026:0) + +Example: ``compass.get_z()`` + +Call ``calibrate`` first or the results will be inaccurate. + +:return: A positive or negative integer in nano tesla representing the magnitude and direction of the field.""" + ... + +def heading() -> int: + """crwdns330032:0crwdne330032:0 (crwdns330030:0crwdne330030:0) + +Example: ``compass.heading()`` + +:return: An integer in the range from 0 to 360, representing the angle in degrees, clockwise, with north as 0.""" + ... + +def get_field_strength() -> int: + """crwdns330036:0crwdne330036:0 (crwdns330034:0crwdne330034:0) + +Example: ``compass.get_field_strength()`` + +:return: An integer indication of the magnitude of the magnetic field in nano tesla.""" + ... \ No newline at end of file diff --git a/lang/lol/typeshed/stdlib/microbit/display.pyi b/lang/lol/typeshed/stdlib/microbit/display.pyi new file mode 100644 index 0000000..cf2dd2e --- /dev/null +++ b/lang/lol/typeshed/stdlib/microbit/display.pyi @@ -0,0 +1,92 @@ +"""crwdns330040:0crwdne330040:0 (crwdns330038:0crwdne330038:0)""" +from ..microbit import Image +from typing import Union, overload, Iterable + +def get_pixel(x: int, y: int) -> int: + """crwdns330044:0``x``crwdnd330044:0``y``crwdne330044:0 (crwdns330042:0crwdne330042:0) + +Example: ``display.get_pixel(0, 0)`` + +:param x: (crwdns330046:0crwdne330046:0) crwdns330048:0crwdne330048:0 +:param y: (crwdns330050:0crwdne330050:0) crwdns330052:0crwdne330052:0 +:return: A number between 0 (off) and 9 (bright)""" + ... + +def set_pixel(x: int, y: int, value: int) -> None: + """crwdns330056:0``x``crwdnd330056:0``y``crwdne330056:0 (crwdns330054:0crwdne330054:0) + +Example: ``display.set_pixel(0, 0, 9)`` + +:param x: (crwdns330062:0crwdne330062:0) crwdns330064:0crwdne330064:0 +:param y: (crwdns330066:0crwdne330066:0) crwdns330068:0crwdne330068:0 +:param value: (crwdns330058:0crwdne330058:0) crwdns330060:0crwdne330060:0""" + ... + +def clear() -> None: + """crwdns330072:0crwdne330072:0 (crwdns330070:0crwdne330070:0) + +Example: ``display.clear()``""" + ... + +def show(image: Union[str, float, int, Image, Iterable[Image]], delay: int=400, wait: bool=True, loop: bool=False, clear: bool=False) -> None: + """crwdns330076:0crwdne330076:0 (crwdns330074:0crwdne330074:0) + +Example: ``display.show(Image.HEART)`` + +When ``image`` is an image or a list of images then each image is displayed in turn. +If ``image`` is a string or number, each letter or digit is displayed in turn. + +:param image: (crwdns330086:0crwdne330086:0) crwdns330088:0crwdne330088:0 +:param delay: (crwdns330082:0crwdne330082:0) crwdns330084:0``delay``crwdne330084:0 +:param wait: (crwdns330094:0crwdne330094:0) crwdns330096:0``wait``crwdnd330096:0``True``crwdne330096:0 +:param loop: (crwdns330090:0crwdne330090:0) crwdns330092:0``loop``crwdnd330092:0``True``crwdne330092:0 +:param clear: (crwdns330078:0crwdne330078:0) crwdns330080:0``clear``crwdnd330080:0``True``crwdne330080:0 + +The ``wait``, ``loop`` and ``clear`` arguments must be specified using their keyword.""" + ... + +def scroll(text: Union[str, float, int], delay: int=150, wait: bool=True, loop: bool=False, monospace: bool=False) -> None: + """crwdns330100:0crwdne330100:0 (crwdns330098:0crwdne330098:0) + +Example: ``display.scroll('micro:bit')`` + +:param text: (crwdns330114:0crwdne330114:0) crwdns330116:0``text``crwdnd330116:0``str()``crwdne330116:0 +:param delay: (crwdns330102:0crwdne330102:0) crwdns330104:0``delay``crwdne330104:0 +:param wait: (crwdns330118:0crwdne330118:0) crwdns330120:0``wait``crwdnd330120:0``True``crwdne330120:0 +:param loop: (crwdns330106:0crwdne330106:0) crwdns330108:0``loop``crwdnd330108:0``True``crwdne330108:0 +:param monospace: (crwdns330110:0crwdne330110:0) crwdns330112:0``monospace``crwdnd330112:0``True``crwdne330112:0 + +The ``wait``, ``loop`` and ``monospace`` arguments must be specified +using their keyword.""" + ... + +def on() -> None: + """crwdns330124:0crwdne330124:0 (crwdns330122:0crwdne330122:0) + +Example: ``display.on()``""" + ... + +def off() -> None: + """crwdns330128:0crwdne330128:0 (crwdns330126:0crwdne330126:0) + +Example: ``display.off()``""" + ... + +def is_on() -> bool: + """crwdns330132:0crwdne330132:0 (crwdns330130:0crwdne330130:0) + +Example: ``display.is_on()`` + +:return: ``True`` if the display is on, otherwise returns ``False``.""" + ... + +def read_light_level() -> int: + """crwdns330136:0crwdne330136:0 (crwdns330134:0crwdne330134:0) + +Example: ``display.read_light_level()`` + +Uses the display's LEDs in reverse-bias mode to sense the amount of light +falling on the display. + +:return: An integer between 0 and 255 representing the light level, with larger meaning more light.""" + ... \ No newline at end of file diff --git a/lang/lol/typeshed/stdlib/microbit/i2c.pyi b/lang/lol/typeshed/stdlib/microbit/i2c.pyi new file mode 100644 index 0000000..c126204 --- /dev/null +++ b/lang/lol/typeshed/stdlib/microbit/i2c.pyi @@ -0,0 +1,49 @@ +"""crwdns330140:0crwdne330140:0 (crwdns330138:0crwdne330138:0)""" +from _typeshed import ReadableBuffer +from ..microbit import MicroBitDigitalPin, pin19, pin20 +from typing import List + +def init(freq: int=100000, sda: MicroBitDigitalPin=pin20, scl: MicroBitDigitalPin=pin19) -> None: + """crwdns330144:0crwdne330144:0 (crwdns330142:0crwdne330142:0) + +Example: ``i2c.init()`` + +:param freq: (crwdns330146:0crwdne330146:0) crwdns330148:0crwdne330148:0 +:param sda: (crwdns330154:0crwdne330154:0) crwdns330156:0``sda``crwdne330156:0 +:param scl: (crwdns330150:0crwdne330150:0) crwdns330152:0``scl``crwdne330152:0 + +On a micro:bit V1 board, changing the I²C pins from defaults will make +the accelerometer and compass stop working, as they are connected +internally to those pins. This warning does not apply to the **V2** +revision of the micro:bit as this has `separate I²C lines `_ +for the motion sensors and the edge connector.""" + ... + +def scan() -> List[int]: + """crwdns330160:0crwdne330160:0 (crwdns330158:0crwdne330158:0) + +Example: ``i2c.scan()`` + +:return: A list of 7-bit addresses corresponding to those devices that responded to the scan.""" + ... + +def read(addr: int, n: int, repeat: bool=False) -> bytes: + """crwdns330164:0crwdne330164:0 (crwdns330162:0crwdne330162:0) + +Example: ``i2c.read(0x50, 64)`` + +:param addr: (crwdns330166:0crwdne330166:0) crwdns330168:0crwdne330168:0 +:param n: (crwdns330170:0crwdne330170:0) crwdns330172:0crwdne330172:0 +:param repeat: (crwdns330174:0crwdne330174:0) crwdns330176:0``True``crwdne330176:0 +:return: The bytes read""" + ... + +def write(addr: int, buf: ReadableBuffer, repeat: bool=False) -> None: + """crwdns330180:0crwdne330180:0 (crwdns330178:0crwdne330178:0) + +Example: ``i2c.write(0x50, bytes([1, 2, 3]))`` + +:param addr: (crwdns330182:0crwdne330182:0) crwdns330184:0crwdne330184:0 +:param buf: (crwdns330186:0crwdne330186:0) crwdns330188:0crwdne330188:0 +:param repeat: (crwdns330190:0crwdne330190:0) crwdns330192:0``True``crwdne330192:0""" + ... \ No newline at end of file diff --git a/lang/lol/typeshed/stdlib/microbit/microphone.pyi b/lang/lol/typeshed/stdlib/microbit/microphone.pyi new file mode 100644 index 0000000..bc5d3a3 --- /dev/null +++ b/lang/lol/typeshed/stdlib/microbit/microphone.pyi @@ -0,0 +1,62 @@ +"""crwdns330196:0crwdne330196:0 (crwdns330194:0crwdne330194:0)""" +from typing import Optional, Tuple +from ..microbit import SoundEvent + +def current_event() -> Optional[SoundEvent]: + """crwdns330200:0crwdne330200:0 (crwdns330198:0crwdne330198:0) + +Example: ``microphone.current_event()`` + +:return: The event, ``SoundEvent('loud')`` or ``SoundEvent('quiet')``.""" + ... + +def was_event(event: SoundEvent) -> bool: + """crwdns330204:0crwdne330204:0 (crwdns330202:0crwdne330202:0) + +Example: ``microphone.was_event(SoundEvent.LOUD)`` + +This call clears the sound history before returning. + +:param event: (crwdns330206:0crwdne330206:0) crwdns330208:0``SoundEvent.LOUD``crwdnd330208:0``SoundEvent.QUIET``crwdne330208:0 +:return: ``True`` if sound was heard at least once since the last call, otherwise ``False``.""" + ... + +def is_event(event: SoundEvent) -> bool: + """crwdns330212:0crwdne330212:0 (crwdns330210:0crwdne330210:0) + +Example: ``microphone.is_event(SoundEvent.LOUD)`` + +This call does not clear the sound event history. + +:param event: (crwdns330214:0crwdne330214:0) crwdns330216:0``SoundEvent.LOUD``crwdnd330216:0``SoundEvent.QUIET``crwdne330216:0 +:return: ``True`` if sound was the most recent heard, ``False`` otherwise.""" + ... + +def get_events() -> Tuple[SoundEvent, ...]: + """crwdns330220:0crwdne330220:0 (crwdns330218:0crwdne330218:0) + +Example: ``microphone.get_events()`` + +This call clears the sound history before returning. + +:return: A tuple of the event history with the most recent event last.""" + ... + +def set_threshold(event: SoundEvent, value: int) -> None: + """crwdns330224:0crwdne330224:0 (crwdns330222:0crwdne330222:0) + +Example: ``microphone.set_threshold(SoundEvent.LOUD, 250)`` + +A high threshold means the event will only trigger if the sound is very loud (>= 250 in the example). + +:param event: (crwdns330226:0crwdne330226:0) crwdns330228:0``SoundEvent.LOUD``crwdnd330228:0``SoundEvent.QUIET``crwdne330228:0 +:param value: (crwdns330230:0crwdne330230:0) crwdns330232:0crwdne330232:0""" + ... + +def sound_level() -> int: + """crwdns330236:0crwdne330236:0 (crwdns330234:0crwdne330234:0) + +Example: ``microphone.sound_level()`` + +:return: A representation of the sound pressure level in the range 0 to 255.""" + ... \ No newline at end of file diff --git a/lang/lol/typeshed/stdlib/microbit/speaker.pyi b/lang/lol/typeshed/stdlib/microbit/speaker.pyi new file mode 100644 index 0000000..b5c339e --- /dev/null +++ b/lang/lol/typeshed/stdlib/microbit/speaker.pyi @@ -0,0 +1,15 @@ +"""crwdns330240:0crwdne330240:0 (crwdns330238:0crwdne330238:0)""" + +def off() -> None: + """crwdns330244:0crwdne330244:0 (crwdns330242:0crwdne330242:0) + +Example: ``speaker.off()`` + +This does not disable sound output to an edge connector pin.""" + ... + +def on() -> None: + """crwdns330248:0crwdne330248:0 (crwdns330246:0crwdne330246:0) + +Example: ``speaker.on()``""" + ... \ No newline at end of file diff --git a/lang/lol/typeshed/stdlib/microbit/spi.pyi b/lang/lol/typeshed/stdlib/microbit/spi.pyi new file mode 100644 index 0000000..d68ba4f --- /dev/null +++ b/lang/lol/typeshed/stdlib/microbit/spi.pyi @@ -0,0 +1,47 @@ +"""crwdns330252:0crwdne330252:0 (crwdns330250:0crwdne330250:0)""" +from _typeshed import ReadableBuffer, WriteableBuffer +from ..microbit import pin13, pin14, pin15, MicroBitDigitalPin + +def init(baudrate: int=1000000, bits: int=8, mode: int=0, sclk: MicroBitDigitalPin=pin13, mosi: MicroBitDigitalPin=pin15, miso: MicroBitDigitalPin=pin14) -> None: + """crwdns330256:0crwdne330256:0 (crwdns330254:0crwdne330254:0) + +Example: ``spi.init()`` + +For correct communication, the parameters have to be the same on both communicating devices. + +:param baudrate: (crwdns330258:0crwdne330258:0) crwdns330260:0crwdne330260:0 +:param bits: (crwdns330262:0crwdne330262:0) crwdns334412:0crwdne334412:0 +:param mode: (crwdns330270:0crwdne330270:0) crwdns330272:0crwdne330272:0 +:param sclk: (crwdns330278:0crwdne330278:0) crwdns330280:0crwdne330280:0 +:param mosi: (crwdns330274:0crwdne330274:0) crwdns330276:0crwdne330276:0 +:param miso: (crwdns330266:0crwdne330266:0) crwdns330268:0crwdne330268:0""" + ... + +def read(nbytes: int, out: int=0) -> bytes: + """crwdns330284:0``nbytes``crwdnd330284:0``out``crwdne330284:0 (crwdns330282:0crwdne330282:0) + +Example: ``spi.read(64)`` + +:param nbytes: (crwdns330286:0crwdne330286:0) crwdns330288:0crwdne330288:0 +:param out: (crwdns360362:0crwdne360362:0) crwdns360364:0crwdne360364:0 +:return: The bytes read.""" + ... + +def write(buffer: ReadableBuffer) -> None: + """crwdns330292:0crwdne330292:0 (crwdns330290:0crwdne330290:0) + +Example: ``spi.write(bytes([1, 2, 3]))`` + +:param buffer: (crwdns330294:0crwdne330294:0) crwdns330296:0crwdne330296:0""" + ... + +def write_readinto(out: WriteableBuffer, in_: ReadableBuffer) -> None: + """crwdns330300:0``out``crwdnd330300:0``in_``crwdne330300:0 (crwdns330298:0crwdne330298:0) + +Example: ``spi.write_readinto(out_buffer, in_buffer)`` + +The length of the buffers should be the same. The buffers can be the same object. + +:param out: (crwdns330306:0crwdne330306:0) crwdns330308:0crwdne330308:0 +:param in_: (crwdns330302:0crwdne330302:0) crwdns330304:0crwdne330304:0""" + ... \ No newline at end of file diff --git a/lang/lol/typeshed/stdlib/microbit/uart.pyi b/lang/lol/typeshed/stdlib/microbit/uart.pyi new file mode 100644 index 0000000..3f791aa --- /dev/null +++ b/lang/lol/typeshed/stdlib/microbit/uart.pyi @@ -0,0 +1,79 @@ +"""crwdns330312:0crwdne330312:0 (crwdns330310:0crwdne330310:0)""" +from _typeshed import WriteableBuffer +from ..microbit import MicroBitDigitalPin +from typing import Optional, Union +ODD: int +"""crwdns330316:0crwdne330316:0 (crwdns330314:0crwdne330314:0)""" +EVEN: int +"""crwdns330320:0crwdne330320:0 (crwdns330318:0crwdne330318:0)""" + +def init(baudrate: int=9600, bits: int=8, parity: Optional[int]=None, stop: int=1, tx: Optional[MicroBitDigitalPin]=None, rx: Optional[MicroBitDigitalPin]=None) -> None: + """crwdns330324:0crwdne330324:0 (crwdns330322:0crwdne330322:0) + +Example: ``uart.init(115200, tx=pin0, rx=pin1)`` + +:param baudrate: (crwdns330326:0crwdne330326:0) crwdns330328:0crwdne330328:0 +:param bits: (crwdns330330:0crwdne330330:0) crwdns330332:0crwdne330332:0 +:param parity: (crwdns330334:0crwdne330334:0) crwdns330336:0``None``crwdnd330336:0``uart.ODD``crwdnd330336:0``uart.EVEN``crwdne330336:0 +:param stop: (crwdns330342:0crwdne330342:0) crwdns330344:0crwdne330344:0 +:param tx: (crwdns330346:0crwdne330346:0) crwdns330348:0crwdne330348:0 +:param rx: (crwdns330338:0crwdne330338:0) crwdns330340:0crwdne330340:0 + +Initializing the UART on external pins will cause the Python console on +USB to become unaccessible, as it uses the same hardware. To bring the +console back you must reinitialize the UART without passing anything for +``tx`` or ``rx`` (or passing ``None`` to these arguments). This means +that calling ``uart.init(115200)`` is enough to restore the Python console. + +For more details see `the online documentation `_.""" + ... + +def any() -> bool: + """crwdns334688:0crwdne334688:0 (crwdns330350:0crwdne330350:0) + +Example: ``uart.any()`` + +:return: ``True`` if any data is waiting, else ``False``.""" + ... + +def read(nbytes: Optional[int]=None) -> Optional[bytes]: + """crwdns330356:0crwdne330356:0 (crwdns330354:0crwdne330354:0) + +Example: ``uart.read()`` + +:param nbytes: (crwdns330358:0crwdne330358:0) crwdns330360:0``nbytes``crwdne330360:0 +:return: A bytes object or ``None`` on timeout""" + ... + +def readinto(buf: WriteableBuffer, nbytes: Optional[int]=None) -> Optional[int]: + """crwdns330364:0``buf``crwdne330364:0 (crwdns330362:0crwdne330362:0) + +Example: ``uart.readinto(input_buffer)`` + +:param buf: (crwdns330366:0crwdne330366:0) crwdns330368:0crwdne330368:0 +:param nbytes: (crwdns330370:0crwdne330370:0) crwdns330372:0``nbytes``crwdnd330372:0``len(buf)``crwdne330372:0 +:return: number of bytes read and stored into ``buf`` or ``None`` on timeout.""" + ... + +def readline() -> Optional[bytes]: + """crwdns330376:0crwdne330376:0 (crwdns330374:0crwdne330374:0) + +Example: ``uart.readline()`` + +:return: The line read or ``None`` on timeout. The newline character is included in the returned bytes.""" + ... + +def write(buf: Union[bytes, str]) -> Optional[int]: + """crwdns330380:0crwdne330380:0 (crwdns330378:0crwdne330378:0) + +Example: ``uart.write('hello world')`` + +:param buf: (crwdns330382:0crwdne330382:0) crwdns330384:0crwdne330384:0 +:return: The number of bytes written, or ``None`` on timeout. + +Examples:: + + uart.write('hello world') + uart.write(b'hello world') + uart.write(bytes([1, 2, 3]))""" + ... \ No newline at end of file diff --git a/lang/lol/typeshed/stdlib/micropython.pyi b/lang/lol/typeshed/stdlib/micropython.pyi new file mode 100644 index 0000000..014befe --- /dev/null +++ b/lang/lol/typeshed/stdlib/micropython.pyi @@ -0,0 +1,131 @@ +"""crwdns330388:0crwdne330388:0 (crwdns330386:0crwdne330386:0)""" +from typing import Any, TypeVar, overload +_T = TypeVar('_T') + +def const(expr: _T) -> _T: + """crwdns330392:0crwdne330392:0 (crwdns330390:0crwdne330390:0) + +The use of this function should be as follows:: + + from micropython import const + CONST_X = const(123) + CONST_Y = const(2 * CONST_X + 1) + +Constants declared this way are still accessible as global variables from +outside the module they are declared in. On the other hand, if a constant +begins with an underscore then it is hidden, it is not available as a +global variable, and does not take up any memory during execution. + +:param expr: (crwdns330394:0crwdne330394:0) crwdns330396:0crwdne330396:0""" + ... + +@overload +def opt_level() -> int: + """crwdns330400:0crwdne330400:0 (crwdns330398:0crwdne330398:0) + +Example: ``micropython.opt_level()`` + +The optimisation level controls the following compilation features: + +- Assertions: at level 0 assertion statements are enabled and compiled + into the bytecode; at levels 1 and higher assertions are not compiled. + +- Built-in ``__debug__`` variable: at level 0 this variable expands to + True; at levels 1 and higher it expands to False. + +- Source-code line numbers: at levels 0, 1 and 2 source-code line number + are stored along with the bytecode so that exceptions can report the + line number they occurred at; at levels 3 and higher line numbers are + not stored. + +:return: An integer representing the current level.""" + ... + +@overload +def opt_level(level: int) -> None: + """crwdns330404:0crwdne330404:0 (crwdns330402:0crwdne330402:0) + +Example: ``micropython.opt_level(1)`` + +The optimisation level controls the following compilation features: + +- Assertions: at level 0 assertion statements are enabled and compiled + into the bytecode; at levels 1 and higher assertions are not compiled. + +- Built-in ``__debug__`` variable: at level 0 this variable expands to + True; at levels 1 and higher it expands to False. + +- Source-code line numbers: at levels 0, 1 and 2 source-code line number + are stored along with the bytecode so that exceptions can report the + line number they occurred at; at levels 3 and higher line numbers are + not stored. + +The default optimisation level is usually level 0. + +:param level: (crwdns330406:0crwdne330406:0) crwdns330408:0crwdne330408:0""" + ... + +def mem_info(verbose: Any=None) -> None: + """crwdns330412:0crwdne330412:0 (crwdns330410:0crwdne330410:0) + +Example: ``micropython.mem_info()`` + +:param verbose: (crwdns330414:0crwdne330414:0) crwdns330416:0``verbose``crwdne330416:0""" + ... + +def qstr_info(verbose: Any=None) -> None: + """crwdns330420:0crwdne330420:0 (crwdns330418:0crwdne330418:0) + +Example: ``micropython.qstr_info()`` + +:param verbose: (crwdns330422:0crwdne330422:0) crwdns330424:0``verbose``crwdne330424:0 + +The information that is printed is implementation dependent, but currently +includes the number of interned strings and the amount of RAM they use. In +verbose mode it prints out the names of all RAM-interned strings.""" + ... + +def stack_use() -> int: + """crwdns330428:0crwdne330428:0 (crwdns330426:0crwdne330426:0) + +Example: ``micropython.stack_use()`` + +The absolute value of this is not particularly useful, rather it +should be used to compute differences in stack usage at different points. + +:return: An integer representing current stack use.""" + ... + +def heap_lock() -> None: + """crwdns330432:0crwdne330432:0 (crwdns330430:0crwdne330430:0) + +Example: ``micropython.heap_lock()`` + +When locked no memory allocation can occur and a ``MemoryError`` will be +raised if any heap allocation is attempted.""" + ... + +def heap_unlock() -> None: + """crwdns330436:0crwdne330436:0 (crwdns330434:0crwdne330434:0) + +Example: ``micropython.heap_unlock()`` + +When locked no memory allocation can occur and a ``MemoryError`` will be +raised if any heap allocation is attempted.""" + ... + +def kbd_intr(chr: int) -> None: + """crwdns330440:0``KeyboardInterrupt``crwdne330440:0 (crwdns330438:0crwdne330438:0) + +Example: ``micropython.kbd_intr(-1)`` + +:param chr: (crwdns330442:0crwdne330442:0) crwdns330444:0crwdne330444:0 + +By default this is set to 3 during script execution, corresponding to Ctrl-C. +Passing -1 to this function will disable capture of Ctrl-C, and passing 3 +will restore it. + +This function can be used to prevent the capturing of Ctrl-C on the +incoming stream of characters that is usually used for the REPL, in case +that stream is used for other purposes.""" + ... \ No newline at end of file diff --git a/lang/lol/typeshed/stdlib/music.pyi b/lang/lol/typeshed/stdlib/music.pyi new file mode 100644 index 0000000..e432421 --- /dev/null +++ b/lang/lol/typeshed/stdlib/music.pyi @@ -0,0 +1,128 @@ +"""crwdns330448:0crwdne330448:0 (crwdns330446:0crwdne330446:0)""" +from typing import Optional, Tuple, Union, List +from .microbit import MicroBitDigitalPin, pin0 +DADADADUM: Tuple[str, ...] +"""crwdns330452:0crwdne330452:0 (crwdns330450:0crwdne330450:0)""" +ENTERTAINER: Tuple[str, ...] +"""crwdns330456:0crwdne330456:0 (crwdns330454:0crwdne330454:0)""" +PRELUDE: Tuple[str, ...] +"""crwdns330460:0crwdne330460:0 (crwdns330458:0crwdne330458:0)""" +ODE: Tuple[str, ...] +"""crwdns330464:0crwdne330464:0 (crwdns330462:0crwdne330462:0)""" +NYAN: Tuple[str, ...] +"""crwdns330468:0crwdne330468:0 (crwdns330466:0crwdne330466:0) + +The composer is unknown. This is fair use for educational porpoises (as they say in New York).""" +RINGTONE: Tuple[str, ...] +"""crwdns330472:0crwdne330472:0 (crwdns330470:0crwdne330470:0) + +To be used to indicate an incoming message. +""" +FUNK: Tuple[str, ...] +"""crwdns330476:0crwdne330476:0 (crwdns330474:0crwdne330474:0)""" +BLUES: Tuple[str, ...] +"""crwdns330480:0crwdne330480:0 (crwdns330478:0crwdne330478:0)""" +BIRTHDAY: Tuple[str, ...] +"""crwdns330484:0crwdne330484:0 (crwdns330482:0crwdne330482:0) + +For copyright status see: http://www.bbc.co.uk/news/world-us-canada-34332853 +""" +WEDDING: Tuple[str, ...] +"""crwdns330488:0crwdne330488:0 (crwdns330486:0crwdne330486:0)""" +FUNERAL: Tuple[str, ...] +"""crwdns330492:0crwdne330492:0 (crwdns330490:0crwdne330490:0)""" +PUNCHLINE: Tuple[str, ...] +"""crwdns330496:0crwdne330496:0 (crwdns330494:0crwdne330494:0)""" +PYTHON: Tuple[str, ...] +"""crwdns330500:0crwdne330500:0 (crwdns330498:0crwdne330498:0)""" +BADDY: Tuple[str, ...] +"""crwdns330504:0crwdne330504:0 (crwdns330502:0crwdne330502:0)""" +CHASE: Tuple[str, ...] +"""crwdns330508:0crwdne330508:0 (crwdns330506:0crwdne330506:0)""" +BA_DING: Tuple[str, ...] +"""crwdns330512:0crwdne330512:0 (crwdns330510:0crwdne330510:0)""" +WAWAWAWAA: Tuple[str, ...] +"""crwdns330516:0crwdne330516:0 (crwdns330514:0crwdne330514:0)""" +JUMP_UP: Tuple[str, ...] +"""crwdns330520:0crwdne330520:0 (crwdns330518:0crwdne330518:0)""" +JUMP_DOWN: Tuple[str, ...] +"""crwdns330524:0crwdne330524:0 (crwdns330522:0crwdne330522:0)""" +POWER_UP: Tuple[str, ...] +"""crwdns330528:0crwdne330528:0 (crwdns330526:0crwdne330526:0)""" +POWER_DOWN: Tuple[str, ...] +"""crwdns330532:0crwdne330532:0 (crwdns330530:0crwdne330530:0)""" + +def set_tempo(ticks: int=4, bpm: int=120) -> None: + """crwdns330536:0crwdne330536:0 (crwdns330534:0crwdne330534:0) + +Example: ``music.set_tempo(bpm=120)`` + +:param ticks: (crwdns330542:0crwdne330542:0) crwdns330544:0crwdne330544:0 +:param bpm: (crwdns330538:0crwdne330538:0) crwdns330540:0crwdne330540:0 + +Suggested default values allow the following useful behaviour: + +- music.set_tempo() – reset the tempo to default of ticks = 4, bpm = 120 +- music.set_tempo(ticks=8) – change the “definition” of a beat +- music.set_tempo(bpm=180) – just change the tempo + +To work out the length of a tick in milliseconds is very simple arithmetic: +60000/bpm/ticks_per_beat. For the default values that’s +60000/120/4 = 125 milliseconds or 1 beat = 500 milliseconds.""" + ... + +def get_tempo() -> Tuple[int, int]: + """crwdns330548:0``(ticks, bpm)``crwdne330548:0 (crwdns330546:0crwdne330546:0) + +Example: ``ticks, beats = music.get_tempo()`` + +:return: The temp as a tuple with two integer values, the ticks then the beats per minute.""" + ... + +def play(music: Union[str, List[str], Tuple[str, ...]], pin: Optional[MicroBitDigitalPin]=pin0, wait: bool=True, loop: bool=False) -> None: + """crwdns330552:0crwdne330552:0 (crwdns330550:0crwdne330550:0) + +Example: ``music.play(music.NYAN)`` + +:param music: (crwdns330558:0crwdne330558:0) crwdns330560:0crwdne330560:0 +:param pin: (crwdns330562:0crwdne330562:0) crwdns330564:0``pin0``crwdnd330564:0``None``crwdne330564:0 +:param wait: (crwdns330566:0crwdne330566:0) crwdns330568:0``wait``crwdnd330568:0``True``crwdne330568:0 +:param loop: (crwdns330554:0crwdne330554:0) crwdns330556:0``loop``crwdnd330556:0``True``crwdnd330556:0``stop``crwdne330556:0 + +Many built-in melodies are defined in this module.""" + ... + +def pitch(frequency: int, duration: int=-1, pin: Optional[MicroBitDigitalPin]=pin0, wait: bool=True) -> None: + """crwdns330572:0crwdne330572:0 (crwdns330570:0crwdne330570:0) + +Example: ``music.pitch(185, 1000)`` + +:param frequency: (crwdns330578:0crwdne330578:0) crwdns330580:0crwdne330580:0 +:param duration: (crwdns330574:0crwdne330574:0) crwdns330576:0``stop``crwdne330576:0 +:param pin: (crwdns330582:0crwdne330582:0) crwdns330584:0``pin0``crwdne330584:0 +:param wait: (crwdns330586:0crwdne330586:0) crwdns330588:0``wait``crwdnd330588:0``True``crwdne330588:0 + +For example, if the frequency is set to 440 and the length to +1000 then we hear a standard concert A for one second. + +You can only play one pitch on one pin at any one time.""" + ... + +def stop(pin: Optional[MicroBitDigitalPin]=pin0) -> None: + """crwdns330592:0crwdne330592:0 (crwdns330590:0crwdne330590:0) + +Example: ``music.stop()`` + +:param pin: (crwdns330594:0crwdne330594:0) crwdns330596:0``music.stop(pin1)``crwdne330596:0""" + +def reset() -> None: + """crwdns330600:0crwdne330600:0 (crwdns330598:0crwdne330598:0) + +Example: ``music.reset()`` + +Values: +- ``ticks = 4`` +- ``bpm = 120`` +- ``duration = 4`` +- ``octave = 4``""" + ... \ No newline at end of file diff --git a/lang/lol/typeshed/stdlib/neopixel.pyi b/lang/lol/typeshed/stdlib/neopixel.pyi new file mode 100644 index 0000000..5ef04a8 --- /dev/null +++ b/lang/lol/typeshed/stdlib/neopixel.pyi @@ -0,0 +1,81 @@ +"""crwdns330604:0crwdne330604:0 (crwdns330602:0crwdne330602:0)""" +from .microbit import MicroBitDigitalPin +from typing import Tuple + +class NeoPixel: + + def __init__(self, pin: MicroBitDigitalPin, n: int, bpp: int=3) -> None: + """crwdns330608:0crwdne330608:0 (crwdns330606:0crwdne330606:0) + +Example: ``np = neopixel.NeoPixel(pin0, 8)`` + +To support RGBW neopixels, a third argument can be passed to +``NeoPixel`` to indicate the number of bytes per pixel (``bpp``). +For RGBW, this is is 4 rather than the default of 3 for RGB and GRB. + +Each pixel is addressed by a position (starting from 0). Neopixels are +given RGB (red, green, blue) / RGBW (red, green, blue, white) values +between 0-255 as a tuple. For example, in RGB, ``(255,255,255)`` is +white. In RGBW, ``(255,255,255,0)`` or ``(0,0,0,255)`` is white. + +See `the online docs `_ for warnings and other advice. + +:param pin: (crwdns330618:0crwdne330618:0) crwdns330620:0crwdne330620:0 +:param n: (crwdns330614:0crwdne330614:0) crwdns330616:0crwdne330616:0 +:param bpp: (crwdns330610:0crwdne330610:0) crwdns355240:0crwdne355240:0""" + ... + + def clear(self) -> None: + """crwdns330624:0crwdne330624:0 (crwdns330622:0crwdne330622:0) + +Example: ``np.clear()``""" + ... + + def show(self) -> None: + """crwdns330628:0crwdne330628:0 (crwdns330626:0crwdne330626:0) + +Example: ``np.show()`` + +Must be called for any updates to become visible.""" + ... + + def write(self) -> None: + """crwdns330632:0crwdne330632:0 (crwdns330630:0crwdne330630:0) + +Example: ``np.write()`` + +Must be called for any updates to become visible. + +Equivalent to ``show``.""" + ... + + def fill(self, colour: Tuple[int, ...]) -> None: + """crwdns330636:0crwdne330636:0 (crwdns330634:0crwdne330634:0) + +Example: ``np.fill((0, 0, 255))`` + +:param colour: (crwdns330638:0crwdne330638:0) crwdns330640:0crwdne330640:0 + +Use in conjunction with ``show()`` to update the neopixels.""" + ... + + def __setitem__(self, key: int, value: Tuple[int, ...]) -> None: + """crwdns330644:0crwdne330644:0 (crwdns330642:0crwdne330642:0) + +Example: ``np[0] = (255, 0, 0)`` + +:param key: (crwdns330646:0crwdne330646:0) crwdns330648:0crwdne330648:0 +:param value: (crwdns330650:0crwdne330650:0) crwdns330652:0crwdne330652:0""" + + def __getitem__(self, key: int) -> Tuple[int, ...]: + """crwdns330656:0crwdne330656:0 (crwdns330654:0crwdne330654:0) + +Example: ``r, g, b = np[0]`` + +:param key: (crwdns330658:0crwdne330658:0) crwdns330660:0crwdne330660:0 +:return: The colour tuple.""" + + def __len__(self) -> int: + """crwdns330664:0crwdne330664:0 (crwdns330662:0crwdne330662:0) + +Example: ``len(np)``""" \ No newline at end of file diff --git a/lang/lol/typeshed/stdlib/os.pyi b/lang/lol/typeshed/stdlib/os.pyi new file mode 100644 index 0000000..24170cf --- /dev/null +++ b/lang/lol/typeshed/stdlib/os.pyi @@ -0,0 +1,63 @@ +"""crwdns330668:0crwdne330668:0 (crwdns330666:0crwdne330666:0)""" +from typing import Tuple +from typing import List + +def listdir() -> List[str]: + """crwdns330672:0crwdne330672:0 (crwdns330670:0crwdne330670:0) + +Example: ``os.listdir()`` + +:return: A list of the names of all the files contained within the local +persistent on-device file system.""" + ... + +def remove(filename: str) -> None: + """crwdns330676:0crwdne330676:0 (crwdns330674:0crwdne330674:0) + +Example: ``os.remove('data.txt')`` + +:param filename: (crwdns330678:0crwdne330678:0) crwdns330680:0crwdne330680:0 + +If the file does not exist an ``OSError`` exception will occur.""" + ... + +def size(filename: str) -> int: + """crwdns330684:0crwdne330684:0 (crwdns330682:0crwdne330682:0) + +Example: ``os.size('data.txt')`` + +:param filename: (crwdns330686:0crwdne330686:0) crwdns330688:0crwdne330688:0 +:return: The size in bytes. + +If the file does not exist an ``OSError`` exception will occur.""" + +class uname_result(Tuple[str, str, str, str, str]): + """crwdns330692:0``os.uname()``crwdne330692:0 (crwdns330690:0crwdne330690:0)""" + sysname: str + """crwdns330696:0crwdne330696:0 (crwdns330694:0crwdne330694:0)""" + nodename: str + """crwdns330700:0crwdne330700:0 (crwdns330698:0crwdne330698:0)""" + release: str + """crwdns330704:0crwdne330704:0 (crwdns330702:0crwdne330702:0)""" + version: str + """crwdns330708:0crwdne330708:0 (crwdns330706:0crwdne330706:0)""" + machine: str + """crwdns330712:0crwdne330712:0 (crwdns330710:0crwdne330710:0)""" + +def uname() -> uname_result: + """crwdns330716:0crwdne330716:0 (crwdns330714:0crwdne330714:0) + +Example: ``os.uname()`` + +The return value is an object with five attributes: + +- ``sysname`` - operating system name +- ``nodename`` - name of machine on network (implementation-defined) +- ``release`` - operating system release +- ``version`` - operating system version +- ``machine`` - hardware identifier + +There is no underlying operating system in MicroPython. As a result the +information returned by the ``uname`` function is mostly useful for +versioning details.""" + ... \ No newline at end of file diff --git a/lang/lol/typeshed/stdlib/power.pyi b/lang/lol/typeshed/stdlib/power.pyi new file mode 100644 index 0000000..2be8b27 --- /dev/null +++ b/lang/lol/typeshed/stdlib/power.pyi @@ -0,0 +1,53 @@ +"""Manage the power modes of the micro:bit (V2 only). +""" + +from microbit import MicroBitDigitalPin, Button +from typing import Optional, Tuple, Union + +def off() -> None: + """Power down the board to the lowest possible power mode. + + Example: ``power.off()`` + + This is the equivalent to pressing the reset button for a few seconds, + to set the board in "Off mode". + + The micro:bit will only wake up if the reset button is pressed or, + if on battery power, when a USB cable is connected. + + When the board wakes up it will start for a reset state, so your program + will start running from the beginning. + """ + ... + +def deep_sleep( + ms: Optional[int] = None, + wake_on: Optional[ + Union[MicroBitDigitalPin, Button] | Tuple[MicroBitDigitalPin | Button, ...] + ] = None, + run_every: bool = True, +) -> None: + """Set the micro:bit into a low power mode where it can wake up and continue operation. + + Example: ``power.deep_sleep(wake_on=(button_a, button_b))`` + + The program state is preserved and when it wakes up it will resume + operation where it left off. + + Deep Sleep mode will consume more battery power than Off mode. + + The wake up sources are configured via arguments. + + The board will always wake up when receiving UART data, when the reset + button is pressed (which resets the board) or, in battery power, + when the USB cable is inserted. + + When the ``run_every`` parameter is set to ``True`` (the default), any + function scheduled with ``run_every`` will momentarily wake up the board + to run and when it finishes it will go back to sleep. + + :param ms: A time in milliseconds to wait before it wakes up. + :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))``. + :param run_every: A boolean to configure if the functions scheduled with ``microbit.run_every`` will continue to run while it sleeps. + """ + ... diff --git a/lang/lol/typeshed/stdlib/radio.pyi b/lang/lol/typeshed/stdlib/radio.pyi new file mode 100644 index 0000000..079f747 --- /dev/null +++ b/lang/lol/typeshed/stdlib/radio.pyi @@ -0,0 +1,123 @@ +"""crwdns330720:0crwdne330720:0 (crwdns330718:0crwdne330718:0)""" +from _typeshed import WriteableBuffer +from typing import Optional, Tuple +RATE_1MBIT: int +"""crwdns330724:0crwdne330724:0 (crwdns330722:0crwdne330722:0)""" +RATE_2MBIT: int +"""crwdns330728:0crwdne330728:0 (crwdns330726:0crwdne330726:0)""" + +def on() -> None: + """crwdns330732:0crwdne330732:0 (crwdns330730:0crwdne330730:0) + +Example: ``radio.on()`` + +This needs to be explicitly called since the radio draws power and takes +up memory that you may otherwise need.""" + ... + +def off() -> None: + """crwdns330736:0crwdne330736:0 (crwdns330734:0crwdne330734:0) + +Example: ``radio.off()``""" + ... + +def 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: + """crwdns330740:0crwdne330740:0 (crwdns330738:0crwdne330738:0) + +Example: ``radio.config(group=42)`` + +The default configuration is suitable for most use. + +:param length: (crwdns330758:0crwdne330758:0) crwdns330760:0crwdne330760:0 +:param queue: (crwdns330766:0crwdne330766:0) crwdns330768:0crwdne330768:0 +:param channel: (crwdns330746:0crwdne330746:0) crwdns330748:0crwdne330748:0 +:param power: (crwdns330762:0crwdne330762:0) crwdns330764:0crwdne330764:0 +:param address: (crwdns330742:0crwdne330742:0) crwdns330744:0crwdne330744:0 +:param group: (crwdns330754:0crwdne330754:0) crwdns330756:0``address``crwdne330756:0 +:param data_rate: (crwdns330750:0crwdne330750:0) crwdns330752:0``radio.RATE_1MBIT``crwdnd330752:0``radio``crwdnd330752:0``RATE_250KBIT``crwdnd330752:0``RATE_1MBIT``crwdnd330752:0``RATE_2MBIT``crwdne330752:0 + +If ``config`` is not called then the defaults described above are assumed.""" + ... + +def reset() -> None: + """crwdns330772:0crwdne330772:0 (crwdns330770:0crwdne330770:0) + +Example: ``radio.reset()`` + +The defaults as as per the ``config`` function above.""" + ... + +def send_bytes(message: bytes) -> None: + """crwdns330776:0crwdne330776:0 (crwdns330774:0crwdne330774:0) + +Example: ``radio.send_bytes(b'hello')`` + +:param message: (crwdns330778:0crwdne330778:0) crwdns330780:0crwdne330780:0""" + ... + +def receive_bytes() -> Optional[bytes]: + """crwdns330784:0crwdne330784:0 (crwdns330782:0crwdne330782:0) + +Example: ``radio.receive_bytes()`` + +:return: The message bytes if any, otherwise ``None``.""" + ... + +def receive_bytes_into(buffer: WriteableBuffer) -> Optional[int]: + """crwdns330788:0crwdne330788:0 (crwdns330786:0crwdne330786:0) + +Example: ``radio.receive_bytes_info(buffer)`` + +:param buffer: (crwdns330790:0crwdne330790:0) crwdns330792:0crwdne330792:0 +: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).""" + ... + +def send(message: str) -> None: + """crwdns330796:0crwdne330796:0 (crwdns330794:0crwdne330794:0) + +Example: ``radio.send('hello')`` + +This is the equivalent of ``radio.send_bytes(bytes(message, 'utf8'))`` but with ``b'\x01\x00\x01'`` +prepended to the front (to make it compatible with other platforms that target the micro:bit). + +:param message: (crwdns330798:0crwdne330798:0) crwdns330800:0crwdne330800:0""" + ... + +def receive() -> Optional[str]: + """crwdns330804:0``receive_bytes``crwdne330804:0 (crwdns330802:0crwdne330802:0) + +Example: ``radio.receive()`` + +Equivalent to ``str(receive_bytes(), 'utf8')`` but with a check that the the first +three bytes are ``b'\x01\x00\x01'`` (to make it compatible with other platforms that +may target the micro:bit). + +:return: The message with the prepended bytes stripped and converted to a string. + +A ``ValueError`` exception is raised if conversion to string fails.""" + ... + +def receive_full() -> Optional[Tuple[bytes, int, int]]: + """crwdns330808:0crwdne330808:0 (crwdns330806:0crwdne330806:0) + +Example: ``radio.receive_full()`` + +If there are no pending messages then ``None`` is returned. + +The three values in the tuple represent: + +- the next incoming message on the message queue as bytes. +- the RSSI (signal strength): a value between 0 (strongest) and -255 (weakest) as measured in dBm. +- a microsecond timestamp: the value returned by ``time.ticks_us()`` when the message was received. + +For example:: + + details = radio.receive_full() + if details: + msg, rssi, timestamp = details + +This function is useful for providing information needed for triangulation +and/or trilateration with other micro:bit devices. + +:return: ``None`` if there is no message, otherwise a tuple of length three with the bytes, strength and timestamp values.""" + ... \ No newline at end of file diff --git a/lang/lol/typeshed/stdlib/random.pyi b/lang/lol/typeshed/stdlib/random.pyi new file mode 100644 index 0000000..319aa4d --- /dev/null +++ b/lang/lol/typeshed/stdlib/random.pyi @@ -0,0 +1,80 @@ +"""crwdns330812:0crwdne330812:0 (crwdns330810:0crwdne330810:0)""" +from typing import TypeVar, Sequence, Union, overload + +def getrandbits(n: int) -> int: + """crwdns330816:0``n``crwdne330816:0 (crwdns330814:0crwdne330814:0) + +Example: ``random.getrandbits(1)`` + +:param n: (crwdns330818:0crwdne330818:0) crwdns330820:0crwdne330820:0""" + ... + +def seed(n: int) -> None: + """crwdns330824:0crwdne330824:0 (crwdns330822:0crwdne330822:0) + +Example: ``random.seed(0)`` + +:param n: (crwdns330826:0crwdne330826:0) crwdns330828:0crwdne330828:0 + +This will give you reproducibly deterministic randomness from a given starting +state (``n``).""" + ... + +def randint(a: int, b: int) -> int: + """crwdns330832:0``a``crwdnd330832:0``b``crwdne330832:0 (crwdns330830:0crwdne330830:0) + +Example: ``random.randint(0, 9)`` + +:param a: (crwdns330834:0crwdne330834:0) crwdns330836:0crwdne330836:0 +:param b: (crwdns330838:0crwdne330838:0) crwdns330840:0crwdne330840:0 + +Alias for ``randrange(a, b + 1)``.""" + ... + +@overload +def randrange(stop: int) -> int: + """crwdns330844:0``stop``crwdne330844:0 (crwdns330842:0crwdne330842:0) + +Example: ``random.randrange(10)`` + +:param stop: (crwdns330846:0crwdne330846:0) crwdns330848:0crwdne330848:0""" + ... + +@overload +def randrange(start: int, stop: int, step: int=1) -> int: + """crwdns330852:0``range(start, stop, step)``crwdne330852:0 (crwdns330850:0crwdne330850:0) + +Example: ``random.randrange(0, 10)`` + +:param start: (crwdns330854:0crwdne330854:0) crwdns330856:0crwdne330856:0 +:param stop: (crwdns330862:0crwdne330862:0) crwdns330864:0crwdne330864:0 +:param step: (crwdns330858:0crwdne330858:0) crwdns330860:0crwdne330860:0""" + ... +_T = TypeVar('_T') + +def choice(seq: Sequence[_T]) -> _T: + """crwdns330868:0``seq``crwdne330868:0 (crwdns330866:0crwdne330866:0) + +Example: ``random.choice([Image.HAPPY, Image.SAD])`` + +:param seq: (crwdns330870:0crwdne330870:0) crwdns330872:0crwdne330872:0 + +If ``seq`` is empty, raises ``IndexError``.""" + ... + +def random() -> float: + """crwdns330876:0crwdne330876:0 (crwdns330874:0crwdne330874:0) + +Example: ``random.random()`` + +:return: The random floating point number""" + ... + +def uniform(a: float, b: float) -> float: + """crwdns330880:0``a``crwdnd330880:0``b``crwdne330880:0 (crwdns330878:0crwdne330878:0) + +Example: ``random.uniform(0, 9)`` + +:param a: (crwdns330882:0crwdne330882:0) crwdns330884:0crwdne330884:0 +:param b: (crwdns330886:0crwdne330886:0) crwdns330888:0crwdne330888:0""" + ... \ No newline at end of file diff --git a/lang/lol/typeshed/stdlib/speech.pyi b/lang/lol/typeshed/stdlib/speech.pyi new file mode 100644 index 0000000..bbd286f --- /dev/null +++ b/lang/lol/typeshed/stdlib/speech.pyi @@ -0,0 +1,76 @@ +"""crwdns330892:0crwdne330892:0 (crwdns330890:0crwdne330890:0)""" +from typing import Optional +from .microbit import MicroBitDigitalPin, pin0 + +def translate(words: str) -> str: + """crwdns330896:0crwdne330896:0 (crwdns330894:0crwdne330894:0) + +Example: ``speech.translate('hello world')`` + +:param words: (crwdns330898:0crwdne330898:0) crwdns330900:0crwdne330900:0 +:return: A string containing a best guess at the appropriate phonemes to pronounce. +The output is generated from this `text to phoneme translation table `_. + +This function should be used to generate a first approximation of phonemes +that can be further hand-edited to improve accuracy, inflection and +emphasis. + +See `the online documentation `_ for detailed information.""" + ... + +def pronounce(phonemes: str, pitch: int=64, speed: int=72, mouth: int=128, throat: int=128, pin: Optional[MicroBitDigitalPin]=pin0) -> None: + """crwdns330904:0crwdne330904:0 (crwdns330902:0crwdne330902:0) + +Example: ``speech.pronounce(' /HEHLOW WERLD')`` + +:param phonemes: (crwdns330910:0crwdne330910:0) crwdns330912:0crwdne330912:0 +:param pitch: (crwdns330918:0crwdne330918:0) crwdns330920:0crwdne330920:0 +:param speed: (crwdns330922:0crwdne330922:0) crwdns330924:0crwdne330924:0 +:param mouth: (crwdns330906:0crwdne330906:0) crwdns330908:0crwdne330908:0 +:param throat: (crwdns330926:0crwdne330926:0) crwdns330928:0crwdne330928:0 +:param pin: (crwdns330914:0crwdne330914:0) crwdns330916:0``pin0``crwdne330916:0 + +Override the optional pitch, speed, mouth and throat settings to change the +timbre (quality) of the voice. + +See `the online documentation `_ for detailed information.""" + ... + +def say(words: str, pitch: int=64, speed: int=72, mouth: int=128, throat: int=128, pin: MicroBitDigitalPin=pin0) -> None: + """crwdns330932:0crwdne330932:0 (crwdns330930:0crwdne330930:0) + +Example: ``speech.say('hello world')`` + +:param words: (crwdns330954:0crwdne330954:0) crwdns330956:0crwdne330956:0 +:param pitch: (crwdns330942:0crwdne330942:0) crwdns330944:0crwdne330944:0 +:param speed: (crwdns330946:0crwdne330946:0) crwdns330948:0crwdne330948:0 +:param mouth: (crwdns330934:0crwdne330934:0) crwdns330936:0crwdne330936:0 +:param throat: (crwdns330950:0crwdne330950:0) crwdns330952:0crwdne330952:0 +:param pin: (crwdns330938:0crwdne330938:0) crwdns330940:0``pin0``crwdne330940:0 + +The result is semi-accurate for English. Override the optional pitch, speed, +mouth and throat settings to change the timbre (quality) of the voice. + +This is a short-hand equivalent of: +``speech.pronounce(speech.translate(words))`` + +See `the online documentation `_ for detailed information.""" + ... + +def sing(phonemes: str, pitch: int=64, speed: int=72, mouth: int=128, throat: int=128, pin: MicroBitDigitalPin=pin0) -> None: + """crwdns330960:0crwdne330960:0 (crwdns330958:0crwdne330958:0) + +Example: ``speech.sing(' /HEHLOW WERLD')`` + +:param phonemes: (crwdns330966:0crwdne330966:0) crwdns330968:0crwdne330968:0 +:param pitch: (crwdns330974:0crwdne330974:0) crwdns330976:0crwdne330976:0 +:param speed: (crwdns330978:0crwdne330978:0) crwdns330980:0crwdne330980:0 +:param mouth: (crwdns330962:0crwdne330962:0) crwdns330964:0crwdne330964:0 +:param throat: (crwdns330982:0crwdne330982:0) crwdns330984:0crwdne330984:0 +:param pin: (crwdns330970:0crwdne330970:0) crwdns330972:0``pin0``crwdne330972:0 + +Override the optional pitch, speed, mouth and throat settings to change +the timbre (quality) of the voice. + +See `the online documentation `_ for detailed information.""" + ... \ No newline at end of file diff --git a/lang/lol/typeshed/stdlib/struct.pyi b/lang/lol/typeshed/stdlib/struct.pyi new file mode 100644 index 0000000..8725186 --- /dev/null +++ b/lang/lol/typeshed/stdlib/struct.pyi @@ -0,0 +1,56 @@ +"""crwdns330988:0crwdne330988:0 (crwdns330986:0crwdne330986:0)""" +from _typeshed import ReadableBuffer, WriteableBuffer +from typing import Any, Tuple, Union + +def calcsize(fmt: str) -> int: + """crwdns330992:0``fmt``crwdne330992:0 (crwdns330990:0crwdne330990:0) + +Example: ``struct.calcsize('hf')`` + +:param fmt: (crwdns330994:0crwdne330994:0) crwdns330996:0crwdne330996:0 +:return The number of bytes needed to store such a value.""" + ... + +def pack(fmt: str, v1: Any, *vn: Any) -> bytes: + """crwdns331000:0crwdne331000:0 (crwdns330998:0crwdne330998:0) + +Example: ``struct.pack('hf', 1, 3.1415)`` + +:param fmt: (crwdns331006:0crwdne331006:0) crwdns331008:0crwdne331008:0 +:param v1: (crwdns331010:0crwdne331010:0) crwdns331012:0crwdne331012:0 +:param *vn: (crwdns331002:0crwdne331002:0) crwdns331004:0crwdne331004:0 +:return A bytes object encoding the values.""" + ... + +def pack_into(fmt: str, buffer: WriteableBuffer, offset: int, v1: Any, *vn: Any) -> None: + """crwdns331016:0crwdne331016:0 (crwdns331014:0crwdne331014:0) + +Example: ``struct.pack_info('hf', buffer, 1, 3.1415)`` + +:param fmt: (crwdns331026:0crwdne331026:0) crwdns331028:0crwdne331028:0 +:param buffer: (crwdns331022:0crwdne331022:0) crwdns331024:0crwdne331024:0 +:param offset: (crwdns331030:0crwdne331030:0) crwdns331032:0crwdne331032:0 +:param v1: (crwdns331034:0crwdne331034:0) crwdns331036:0crwdne331036:0 +:param *vn: (crwdns331018:0crwdne331018:0) crwdns331020:0crwdne331020:0""" + ... + +def unpack(fmt: str, data: ReadableBuffer) -> Tuple[Any, ...]: + """crwdns331040:0crwdne331040:0 (crwdns331038:0crwdne331038:0) + +Example: ``v1, v2 = struct.unpack('hf', buffer)`` + +:param fmt: (crwdns331046:0crwdne331046:0) crwdns331048:0crwdne331048:0 +:param data: (crwdns331042:0crwdne331042:0) crwdns331044:0crwdne331044:0 +:return: A tuple of the unpacked values.""" + ... + +def unpack_from(fmt: str, buffer: ReadableBuffer, offset: int=0) -> Tuple: + """crwdns331052:0crwdne331052:0 (crwdns331050:0crwdne331050:0) + +Example: ``v1, v2 = struct.unpack_from('hf', buffer)`` + +:param fmt: (crwdns331058:0crwdne331058:0) crwdns331060:0crwdne331060:0 +:param buffer: (crwdns331054:0crwdne331054:0) crwdns331056:0crwdne331056:0 +:param offset: (crwdns331062:0crwdne331062:0) crwdns331064:0crwdne331064:0 +:return: A tuple of the unpacked values.""" + ... \ No newline at end of file diff --git a/lang/lol/typeshed/stdlib/sys.pyi b/lang/lol/typeshed/stdlib/sys.pyi new file mode 100644 index 0000000..9459fb9 --- /dev/null +++ b/lang/lol/typeshed/stdlib/sys.pyi @@ -0,0 +1,93 @@ +"""crwdns331068:0crwdne331068:0 (crwdns331066:0crwdne331066:0)""" +from typing import Any, Dict, List, NoReturn, TextIO, Tuple + +def exit(retval: object=...) -> NoReturn: + """crwdns331072:0crwdne331072:0 (crwdns331070:0crwdne331070:0) + +Example: ``sys.exit(1)`` + +This function raises a ``SystemExit`` exception. If an argument is given, its +value given as an argument to ``SystemExit``. + +:param retval: (crwdns331074:0crwdne331074:0) crwdns331076:0crwdne331076:0""" + ... + +def print_exception(exc: Exception) -> None: + """crwdns331080:0crwdne331080:0 (crwdns331078:0crwdne331078:0) + +Example: ``sys.print_exception(e)`` + +:param exc: (crwdns331082:0crwdne331082:0) crwdns331084:0crwdne331084:0 + +This is simplified version of a function which appears in the +``traceback`` module in CPython.""" +argv: List[str] +"""crwdns331088:0crwdne331088:0 (crwdns331086:0crwdne331086:0)""" +byteorder: str +"""crwdns331092:0``"little"``crwdnd331092:0``"big"``crwdne331092:0 (crwdns331090:0crwdne331090:0)""" + +class _implementation: + name: str + version: Tuple[int, int, int] +implementation: _implementation +"""crwdns331096:0crwdne331096:0 (crwdns331094:0crwdne331094:0) + +For MicroPython, it has following attributes: + +- ``name`` - string "micropython" +- ``version`` - tuple (major, minor, micro), e.g. (1, 7, 0) + +This object is the recommended way to distinguish MicroPython from other +Python implementations (note that it still may not exist in the very +minimal ports). + +CPython mandates more attributes for this object, but the actual useful +bare minimum is implemented in MicroPython. +""" +maxsize: int +""" +crwdns331100:0crwdne331100:0 (crwdns331098:0crwdne331098:0) + +This attribute is useful for detecting "bitness" of a platform (32-bit vs +64-bit, etc.). It's recommended to not compare this attribute to some +value directly, but instead count number of bits in it:: + + bits = 0 + v = sys.maxsize + while v: + bits += 1 + v >>= 1 + if bits > 32: + # 64-bit (or more) platform + ... + else: + # 32-bit (or less) platform + # Note that on 32-bit platform, value of bits may be less than 32 + # (e.g. 31) due to peculiarities described above, so use "> 16", + # "> 32", "> 64" style of comparisons. +""" +modules: Dict[str, Any] +"""crwdns331104:0crwdne331104:0 (crwdns331102:0crwdne331102:0) + +On some ports, it may not include builtin modules.""" +path: List[str] +"""crwdns331108:0crwdne331108:0 (crwdns331106:0crwdne331106:0)""" +platform: str +"""crwdns331112:0crwdne331112:0 (crwdns331110:0crwdne331110:0) + +For OS/RTOS ports, this is usually an identifier of the OS, e.g. ``"linux"``. +For baremetal ports it is an identifier of a board, e.g. ``"pyboard"`` for +the original MicroPython reference board. It thus can be used to +distinguish one board from another. + +If you need to check whether your program runs on MicroPython (vs other +Python implementation), use ``sys.implementation`` instead. +""" +version: str +"""crwdns331116:0crwdne331116:0 (crwdns331114:0crwdne331114:0)""" +version_info: Tuple[int, int, int] +"""crwdns331120:0crwdne331120:0 (crwdns331118:0crwdne331118:0) + +Only the first three version numbers (major, minor, micro) are supported and +they can be referenced only by index, not by name. +""" \ No newline at end of file diff --git a/lang/lol/typeshed/stdlib/this.pyi b/lang/lol/typeshed/stdlib/this.pyi new file mode 100644 index 0000000..faf492b --- /dev/null +++ b/lang/lol/typeshed/stdlib/this.pyi @@ -0,0 +1 @@ +def authors() -> str: ... diff --git a/lang/lol/typeshed/stdlib/time.pyi b/lang/lol/typeshed/stdlib/time.pyi new file mode 100644 index 0000000..f2c472d --- /dev/null +++ b/lang/lol/typeshed/stdlib/time.pyi @@ -0,0 +1,110 @@ +"""crwdns331124:0crwdne331124:0 (crwdns331122:0crwdne331122:0)""" +from typing import Union + +def sleep(seconds: Union[int, float]) -> None: + """crwdns331128:0crwdne331128:0 (crwdns331126:0crwdne331126:0) + +Example: ``time.sleep(1)`` + +:param seconds: (crwdns331130:0crwdne331130:0) crwdns331132:0crwdne331132:0""" + ... + +def sleep_ms(ms: int) -> None: + """crwdns331136:0crwdne331136:0 (crwdns331134:0crwdne331134:0) + +Example: ``time.sleep_ms(1_000_000)`` + +:param ms: (crwdns331138:0crwdne331138:0) crwdns331140:0crwdne331140:0""" + ... + +def sleep_us(us: int) -> None: + """crwdns331144:0crwdne331144:0 (crwdns331142:0crwdne331142:0) + +Example: ``time.sleep_us(1000)`` + +:param us: (crwdns331146:0crwdne331146:0) crwdns331148:0crwdne331148:0""" + ... + +def ticks_ms() -> int: + """crwdns331152:0crwdne331152:0 (crwdns331150:0crwdne331150:0) + +Example: ``time.ticks_ms()`` + +:return: The counter value in milliseconds.""" + ... + +def ticks_us() -> int: + """crwdns331156:0crwdne331156:0 (crwdns331154:0crwdne331154:0) + +Example: ``time.ticks_us()`` + +:return: The counter value in microseconds.""" + ... + +def ticks_add(ticks: int, delta: int) -> int: + """crwdns331160:0crwdne331160:0 (crwdns331158:0crwdne331158:0) + +Example: ``time.ticks_add(time.ticks_ms(), 200)`` + +Given a ticks value, this function allows to calculate ticks +value delta ticks before or after it, following modular-arithmetic +definition of tick values. + +:param ticks: (crwdns331166:0crwdne331166:0) crwdns331168:0crwdne331168:0 +:param delta: (crwdns331162:0crwdne331162:0) crwdns331164:0crwdne331164:0 + +Example:: + + # Find out what ticks value there was 100ms ago + print(ticks_add(time.ticks_ms(), -100)) + + # Calculate deadline for operation and test for it + deadline = ticks_add(time.ticks_ms(), 200) + while ticks_diff(deadline, time.ticks_ms()) > 0: + do_a_little_of_something() + + # Find out TICKS_MAX used by this port + print(ticks_add(0, -1))""" + ... + +def ticks_diff(ticks1: int, ticks2: int) -> int: + """crwdns331172:0``time.ticks_ms()``crwdnd331172:0``ticks_us()``crwdne331172:0 (crwdns331170:0crwdne331170:0) + +Example: ``time.ticks_diff(scheduled_time, now)`` + +:param ticks1: (crwdns331174:0crwdne331174:0) crwdns331176:0crwdne331176:0 +:param ticks2: (crwdns331178:0crwdne331178:0) crwdns331180:0crwdne331180:0 + +The argument order is the same as for subtraction operator, +``ticks_diff(ticks1, ticks2)`` has the same meaning as ``ticks1 - ticks2``. + +``ticks_diff()`` is designed to accommodate various usage +patterns, among them: + +Polling with timeout. In this case, the order of events is known, and you +will deal only with positive results of :func:`time.ticks_diff()`:: + + # Wait for GPIO pin to be asserted, but at most 500us + start = time.ticks_us() + while pin.value() == 0: + if time.ticks_diff(time.ticks_us(), start) > 500: + raise TimeoutError + + +Scheduling events. In this case, :func:`time.ticks_diff()` result may be +negative if an event is overdue:: + + # This code snippet is not optimized + now = time.ticks_ms() + scheduled_time = task.scheduled_time() + if ticks_diff(scheduled_time, now) > 0: + print("Too early, let's nap") + sleep_ms(ticks_diff(scheduled_time, now)) + task.run() + elif ticks_diff(scheduled_time, now) == 0: + print("Right at time!") + task.run() + elif ticks_diff(scheduled_time, now) < 0: + print("Oops, running late, tell task to run faster!") + task.run(run_faster=True)""" + ... \ No newline at end of file diff --git a/lang/lol/typeshed/stdlib/types.pyi b/lang/lol/typeshed/stdlib/types.pyi new file mode 100644 index 0000000..752b2de --- /dev/null +++ b/lang/lol/typeshed/stdlib/types.pyi @@ -0,0 +1,413 @@ +import sys +from typing import ( + Any, + AsyncGenerator, + Awaitable, + Callable, + Generator, + Generic, + ItemsView, + Iterable, + Iterator, + KeysView, + Mapping, + Tuple, + Type, + TypeVar, + ValuesView, + overload, +) +from typing_extensions import Literal, final + +# Note, all classes "defined" here require special handling. + +_T = TypeVar("_T") +_T1 = TypeVar("_T1") +_T2 = TypeVar("_T2") +_T_co = TypeVar("_T_co", covariant=True) +_T_contra = TypeVar("_T_contra", contravariant=True) +_KT = TypeVar("_KT") +_VT_co = TypeVar("_VT_co", covariant=True) +_V_co = TypeVar("_V_co", covariant=True) + +@final +class _Cell: + __hash__: None # type: ignore + cell_contents: Any + +@final +class FunctionType: + __closure__: Tuple[_Cell, ...] | None + __code__: CodeType + __defaults__: Tuple[Any, ...] | None + __dict__: dict[str, Any] + __globals__: dict[str, Any] + __name__: str + __qualname__: str + __annotations__: dict[str, Any] + __kwdefaults__: dict[str, Any] + def __init__( + self, + code: CodeType, + globals: dict[str, Any], + name: str | None = ..., + argdefs: Tuple[object, ...] | None = ..., + closure: Tuple[_Cell, ...] | None = ..., + ) -> None: ... + def __call__(self, *args: Any, **kwargs: Any) -> Any: ... + def __get__(self, obj: object | None, type: type | None) -> MethodType: ... + +LambdaType = FunctionType + +@final +class CodeType: + """Create a code object. Not for the faint of heart.""" + + co_argcount: int + if sys.version_info >= (3, 8): + co_posonlyargcount: int + co_kwonlyargcount: int + co_nlocals: int + co_stacksize: int + co_flags: int + co_code: bytes + co_consts: Tuple[Any, ...] + co_names: Tuple[str, ...] + co_varnames: Tuple[str, ...] + co_filename: str + co_name: str + co_firstlineno: int + co_lnotab: bytes + co_freevars: Tuple[str, ...] + co_cellvars: Tuple[str, ...] + if sys.version_info >= (3, 8): + def __init__( + self, + argcount: int, + posonlyargcount: int, + kwonlyargcount: int, + nlocals: int, + stacksize: int, + flags: int, + codestring: bytes, + constants: Tuple[Any, ...], + names: Tuple[str, ...], + varnames: Tuple[str, ...], + filename: str, + name: str, + firstlineno: int, + lnotab: bytes, + freevars: Tuple[str, ...] = ..., + cellvars: Tuple[str, ...] = ..., + ) -> None: ... + else: + def __init__( + self, + argcount: int, + kwonlyargcount: int, + nlocals: int, + stacksize: int, + flags: int, + codestring: bytes, + constants: Tuple[Any, ...], + names: Tuple[str, ...], + varnames: Tuple[str, ...], + filename: str, + name: str, + firstlineno: int, + lnotab: bytes, + freevars: Tuple[str, ...] = ..., + cellvars: Tuple[str, ...] = ..., + ) -> None: ... + if sys.version_info >= (3, 8): + def replace( + self, + *, + co_argcount: int = ..., + co_posonlyargcount: int = ..., + co_kwonlyargcount: int = ..., + co_nlocals: int = ..., + co_stacksize: int = ..., + co_flags: int = ..., + co_firstlineno: int = ..., + co_code: bytes = ..., + co_consts: Tuple[Any, ...] = ..., + co_names: Tuple[str, ...] = ..., + co_varnames: Tuple[str, ...] = ..., + co_freevars: Tuple[str, ...] = ..., + co_cellvars: Tuple[str, ...] = ..., + co_filename: str = ..., + co_name: str = ..., + co_lnotab: bytes = ..., + ) -> CodeType: ... + +@final +class MappingProxyType(Mapping[_KT, _VT_co], Generic[_KT, _VT_co]): + __hash__: None # type: ignore + def __init__(self, mapping: Mapping[_KT, _VT_co]) -> None: ... + def __getitem__(self, k: _KT) -> _VT_co: ... + def __iter__(self) -> Iterator[_KT]: ... + def __len__(self) -> int: ... + def copy(self) -> dict[_KT, _VT_co]: ... + def keys(self) -> KeysView[_KT]: ... + def values(self) -> ValuesView[_VT_co]: ... + def items(self) -> ItemsView[_KT, _VT_co]: ... + if sys.version_info >= (3, 9): + def __class_getitem__(cls, item: Any) -> GenericAlias: ... + def __reversed__(self) -> Iterator[_KT]: ... + def __or__( + self, __value: Mapping[_T1, _T2] + ) -> dict[_KT | _T1, _VT_co | _T2]: ... + def __ror__( + self, __value: Mapping[_T1, _T2] + ) -> dict[_KT | _T1, _VT_co | _T2]: ... + +class SimpleNamespace: + __hash__: None # type: ignore + def __init__(self, **kwargs: Any) -> None: ... + def __getattribute__(self, name: str) -> Any: ... + def __setattr__(self, name: str, value: Any) -> None: ... + def __delattr__(self, name: str) -> None: ... + +class ModuleType: + __name__: str + __file__: str + __dict__: dict[str, Any] + __package__: str | None + def __init__(self, name: str, doc: str | None = ...) -> None: ... + +@final +class GeneratorType(Generator[_T_co, _T_contra, _V_co]): + gi_code: CodeType + gi_frame: FrameType + gi_running: bool + gi_yieldfrom: GeneratorType[_T_co, _T_contra, Any] | None + def __iter__(self) -> GeneratorType[_T_co, _T_contra, _V_co]: ... + def __next__(self) -> _T_co: ... + def close(self) -> None: ... + def send(self, __arg: _T_contra) -> _T_co: ... + @overload + def throw( + self, + __typ: Type[BaseException], + __val: BaseException | object = ..., + __tb: TracebackType | None = ..., + ) -> _T_co: ... + @overload + def throw( + self, __typ: BaseException, __val: None = ..., __tb: TracebackType | None = ... + ) -> _T_co: ... + +@final +class AsyncGeneratorType(AsyncGenerator[_T_co, _T_contra]): + ag_await: Awaitable[Any] | None + ag_frame: FrameType + ag_running: bool + ag_code: CodeType + def __aiter__(self) -> AsyncGeneratorType[_T_co, _T_contra]: ... + def __anext__(self) -> Awaitable[_T_co]: ... + def asend(self, __val: _T_contra) -> Awaitable[_T_co]: ... + @overload + def athrow( + self, + __typ: Type[BaseException], + __val: BaseException | object = ..., + __tb: TracebackType | None = ..., + ) -> Awaitable[_T_co]: ... + @overload + def athrow( + self, __typ: BaseException, __val: None = ..., __tb: TracebackType | None = ... + ) -> Awaitable[_T_co]: ... + def aclose(self) -> Awaitable[None]: ... + +@final +class CoroutineType: + cr_await: Any | None + cr_code: CodeType + cr_frame: FrameType + cr_running: bool + def close(self) -> None: ... + def send(self, __arg: Any) -> Any: ... + @overload + def throw( + self, + __typ: Type[BaseException], + __val: BaseException | object = ..., + __tb: TracebackType | None = ..., + ) -> Any: ... + @overload + def throw( + self, __typ: BaseException, __val: None = ..., __tb: TracebackType | None = ... + ) -> Any: ... + +class _StaticFunctionType: + """Fictional type to correct the type of MethodType.__func__. + + FunctionType is a descriptor, so mypy follows the descriptor protocol and + converts MethodType.__func__ back to MethodType (the return type of + FunctionType.__get__). But this is actually a special case; MethodType is + implemented in C and its attribute access doesn't go through + __getattribute__. + + By wrapping FunctionType in _StaticFunctionType, we get the right result; + similar to wrapping a function in staticmethod() at runtime to prevent it + being bound as a method. + """ + + def __get__(self, obj: object | None, type: type | None) -> FunctionType: ... + +@final +class MethodType: + __closure__: Tuple[_Cell, ...] | None # inherited from the added function + __defaults__: Tuple[Any, ...] | None # inherited from the added function + __func__: _StaticFunctionType + __self__: object + __name__: str # inherited from the added function + __qualname__: str # inherited from the added function + def __init__(self, func: Callable[..., Any], obj: object) -> None: ... + def __call__(self, *args: Any, **kwargs: Any) -> Any: ... + +@final +class BuiltinFunctionType: + __self__: object | ModuleType + __name__: str + __qualname__: str + def __call__(self, *args: Any, **kwargs: Any) -> Any: ... + +BuiltinMethodType = BuiltinFunctionType + +if sys.version_info >= (3, 7): + @final + class WrapperDescriptorType: + __name__: str + __qualname__: str + __objclass__: type + def __call__(self, *args: Any, **kwargs: Any) -> Any: ... + def __get__(self, obj: Any, type: type = ...) -> Any: ... + @final + class MethodWrapperType: + __self__: object + __name__: str + __qualname__: str + __objclass__: type + def __call__(self, *args: Any, **kwargs: Any) -> Any: ... + def __eq__(self, other: Any) -> bool: ... + def __ne__(self, other: Any) -> bool: ... + @final + class MethodDescriptorType: + __name__: str + __qualname__: str + __objclass__: type + def __call__(self, *args: Any, **kwargs: Any) -> Any: ... + def __get__(self, obj: Any, type: type = ...) -> Any: ... + @final + class ClassMethodDescriptorType: + __name__: str + __qualname__: str + __objclass__: type + def __call__(self, *args: Any, **kwargs: Any) -> Any: ... + def __get__(self, obj: Any, type: type = ...) -> Any: ... + +@final +class TracebackType: + if sys.version_info >= (3, 7): + def __init__( + self, + tb_next: TracebackType | None, + tb_frame: FrameType, + tb_lasti: int, + tb_lineno: int, + ) -> None: ... + tb_next: TracebackType | None + else: + @property + def tb_next(self) -> TracebackType | None: ... + # the rest are read-only even in 3.7 + @property + def tb_frame(self) -> FrameType: ... + @property + def tb_lasti(self) -> int: ... + @property + def tb_lineno(self) -> int: ... + +@final +class FrameType: + f_back: FrameType | None + f_builtins: dict[str, Any] + f_code: CodeType + f_globals: dict[str, Any] + f_lasti: int + f_lineno: int + f_locals: dict[str, Any] + f_trace: Callable[[FrameType, str, Any], Any] | None + if sys.version_info >= (3, 7): + f_trace_lines: bool + f_trace_opcodes: bool + def clear(self) -> None: ... + +@final +class GetSetDescriptorType: + __name__: str + __objclass__: type + def __get__(self, __obj: Any, __type: type = ...) -> Any: ... + def __set__(self, __instance: Any, __value: Any) -> None: ... + def __delete__(self, obj: Any) -> None: ... + +@final +class MemberDescriptorType: + __name__: str + __objclass__: type + def __get__(self, __obj: Any, __type: type = ...) -> Any: ... + def __set__(self, __instance: Any, __value: Any) -> None: ... + def __delete__(self, obj: Any) -> None: ... + +if sys.version_info >= (3, 7): + def new_class( + name: str, + bases: Iterable[object] = ..., + kwds: dict[str, Any] | None = ..., + exec_body: Callable[[dict[str, Any]], None] | None = ..., + ) -> type: ... + def resolve_bases(bases: Iterable[object]) -> Tuple[Any, ...]: ... + +else: + def new_class( + name: str, + bases: Tuple[type, ...] = ..., + kwds: dict[str, Any] | None = ..., + exec_body: Callable[[dict[str, Any]], None] | None = ..., + ) -> type: ... + +def prepare_class( + name: str, bases: Tuple[type, ...] = ..., kwds: dict[str, Any] | None = ... +) -> Tuple[type, dict[str, Any], dict[str, Any]]: ... + +# Actually a different type, but `property` is special and we want that too. +DynamicClassAttribute = property + +def coroutine(func: Callable[..., Any]) -> CoroutineType: ... + +if sys.version_info >= (3, 8): + CellType = _Cell + +if sys.version_info >= (3, 9): + class GenericAlias: + __origin__: type + __args__: Tuple[Any, ...] + __parameters__: Tuple[Any, ...] + def __init__(self, origin: type, args: Any) -> None: ... + def __getattr__(self, name: str) -> Any: ... # incomplete + +if sys.version_info >= (3, 10): + @final + class NoneType: + def __bool__(self) -> Literal[False]: ... + EllipsisType = ellipsis # noqa F811 from builtins + from builtins import _NotImplementedType + + NotImplementedType = _NotImplementedType # noqa F811 from builtins + @final + class UnionType: + __args__: Tuple[Any, ...] + def __or__(self, obj: Any) -> UnionType: ... + def __ror__(self, obj: Any) -> UnionType: ... diff --git a/lang/lol/typeshed/stdlib/typing.pyi b/lang/lol/typeshed/stdlib/typing.pyi new file mode 100644 index 0000000..a494557 --- /dev/null +++ b/lang/lol/typeshed/stdlib/typing.pyi @@ -0,0 +1,716 @@ +import collections # Needed by aliases like DefaultDict, see mypy issue 2986 +import sys +from abc import ABCMeta, abstractmethod +from types import BuiltinFunctionType, CodeType, FrameType, FunctionType, MethodType, ModuleType, TracebackType +from typing_extensions import Literal as _Literal + +if sys.version_info >= (3, 7): + from types import MethodDescriptorType, MethodWrapperType, WrapperDescriptorType + +if sys.version_info >= (3, 9): + from types import GenericAlias + +# Definitions of special type checking related constructs. Their definitions +# are not used, so their value does not matter. + +Any = object() + +class TypeVar: + __name__: str + __bound__: Optional[Type[Any]] + __constraints__: Tuple[Type[Any], ...] + __covariant__: bool + __contravariant__: bool + def __init__( + self, + name: str, + *constraints: Type[Any], + bound: Union[None, Type[Any], str] = ..., + covariant: bool = ..., + contravariant: bool = ..., + ) -> None: ... + +_promote = object() + +class _SpecialForm: + def __getitem__(self, typeargs: Any) -> object: ... + +_F = TypeVar("_F", bound=Callable[..., Any]) + +def overload(func: _F) -> _F: ... + +Union: _SpecialForm = ... +Optional: _SpecialForm = ... +Tuple: _SpecialForm = ... +Generic: _SpecialForm = ... +# Protocol is only present in 3.8 and later, but mypy needs it unconditionally +Protocol: _SpecialForm = ... +Callable: _SpecialForm = ... +Type: _SpecialForm = ... +ClassVar: _SpecialForm = ... +if sys.version_info >= (3, 8): + Final: _SpecialForm = ... + def final(f: _F) -> _F: ... + Literal: _SpecialForm = ... + # TypedDict is a (non-subscriptable) special form. + TypedDict: object + +if sys.version_info < (3, 7): + class GenericMeta(type): ... + +if sys.version_info >= (3, 10): + class ParamSpecArgs: + __origin__: ParamSpec + def __init__(self, origin: ParamSpec) -> None: ... + class ParamSpecKwargs: + __origin__: ParamSpec + def __init__(self, origin: ParamSpec) -> None: ... + class ParamSpec: + __name__: str + __bound__: Optional[Type[Any]] + __covariant__: bool + __contravariant__: bool + def __init__( + self, name: str, *, bound: Union[None, Type[Any], str] = ..., contravariant: bool = ..., covariant: bool = ... + ) -> None: ... + @property + def args(self) -> ParamSpecArgs: ... + @property + def kwargs(self) -> ParamSpecKwargs: ... + Concatenate: _SpecialForm = ... + TypeAlias: _SpecialForm = ... + TypeGuard: _SpecialForm = ... + +# Return type that indicates a function does not return. +# This type is equivalent to the None type, but the no-op Union is necessary to +# distinguish the None type from the None value. +NoReturn = Union[None] + +# These type variables are used by the container types. +_T = TypeVar("_T") +_S = TypeVar("_S") +_KT = TypeVar("_KT") # Key type. +_VT = TypeVar("_VT") # Value type. +_T_co = TypeVar("_T_co", covariant=True) # Any type covariant containers. +_V_co = TypeVar("_V_co", covariant=True) # Any type covariant containers. +_KT_co = TypeVar("_KT_co", covariant=True) # Key type covariant containers. +_VT_co = TypeVar("_VT_co", covariant=True) # Value type covariant containers. +_T_contra = TypeVar("_T_contra", contravariant=True) # Ditto contravariant. +_TC = TypeVar("_TC", bound=Type[object]) + +def no_type_check(arg: _F) -> _F: ... +def no_type_check_decorator(decorator: _F) -> _F: ... + +# Type aliases and type constructors + +class _Alias: + # Class for defining generic aliases for library types. + def __getitem__(self, typeargs: Any) -> Any: ... + +List = _Alias() +Dict = _Alias() +DefaultDict = _Alias() +Set = _Alias() +FrozenSet = _Alias() +Counter = _Alias() +Deque = _Alias() +ChainMap = _Alias() + +if sys.version_info >= (3, 7): + OrderedDict = _Alias() + +if sys.version_info >= (3, 9): + Annotated: _SpecialForm = ... + +# Predefined type variables. +AnyStr = TypeVar("AnyStr", str, bytes) + +# Abstract base classes. + +def runtime_checkable(cls: _TC) -> _TC: ... +@runtime_checkable +class SupportsInt(Protocol, metaclass=ABCMeta): + @abstractmethod + def __int__(self) -> int: ... + +@runtime_checkable +class SupportsFloat(Protocol, metaclass=ABCMeta): + @abstractmethod + def __float__(self) -> float: ... + +@runtime_checkable +class SupportsComplex(Protocol, metaclass=ABCMeta): + @abstractmethod + def __complex__(self) -> complex: ... + +@runtime_checkable +class SupportsBytes(Protocol, metaclass=ABCMeta): + @abstractmethod + def __bytes__(self) -> bytes: ... + +if sys.version_info >= (3, 8): + @runtime_checkable + class SupportsIndex(Protocol, metaclass=ABCMeta): + @abstractmethod + def __index__(self) -> int: ... + +@runtime_checkable +class SupportsAbs(Protocol[_T_co]): + @abstractmethod + def __abs__(self) -> _T_co: ... + +@runtime_checkable +class SupportsRound(Protocol[_T_co]): + @overload + @abstractmethod + def __round__(self) -> int: ... + @overload + @abstractmethod + def __round__(self, ndigits: int) -> _T_co: ... + +@runtime_checkable +class Sized(Protocol, metaclass=ABCMeta): + @abstractmethod + def __len__(self) -> int: ... + +@runtime_checkable +class Hashable(Protocol, metaclass=ABCMeta): + # TODO: This is special, in that a subclass of a hashable class may not be hashable + # (for example, list vs. object). It's not obvious how to represent this. This class + # is currently mostly useless for static checking. + @abstractmethod + def __hash__(self) -> int: ... + +@runtime_checkable +class Iterable(Protocol[_T_co]): + @abstractmethod + def __iter__(self) -> Iterator[_T_co]: ... + +@runtime_checkable +class Iterator(Iterable[_T_co], Protocol[_T_co]): + @abstractmethod + def __next__(self) -> _T_co: ... + def __iter__(self) -> Iterator[_T_co]: ... + +@runtime_checkable +class Reversible(Iterable[_T_co], Protocol[_T_co]): + @abstractmethod + def __reversed__(self) -> Iterator[_T_co]: ... + +class Generator(Iterator[_T_co], Generic[_T_co, _T_contra, _V_co]): + def __next__(self) -> _T_co: ... + @abstractmethod + def send(self, __value: _T_contra) -> _T_co: ... + @overload + @abstractmethod + def throw( + self, __typ: Type[BaseException], __val: Union[BaseException, object] = ..., __tb: Optional[TracebackType] = ... + ) -> _T_co: ... + @overload + @abstractmethod + def throw(self, __typ: BaseException, __val: None = ..., __tb: Optional[TracebackType] = ...) -> _T_co: ... + def close(self) -> None: ... + def __iter__(self) -> Generator[_T_co, _T_contra, _V_co]: ... + @property + def gi_code(self) -> CodeType: ... + @property + def gi_frame(self) -> FrameType: ... + @property + def gi_running(self) -> bool: ... + @property + def gi_yieldfrom(self) -> Optional[Generator[Any, Any, Any]]: ... + +@runtime_checkable +class Awaitable(Protocol[_T_co]): + @abstractmethod + def __await__(self) -> Generator[Any, None, _T_co]: ... + +class Coroutine(Awaitable[_V_co], Generic[_T_co, _T_contra, _V_co]): + __name__: str + __qualname__: str + @property + def cr_await(self) -> Optional[Any]: ... + @property + def cr_code(self) -> CodeType: ... + @property + def cr_frame(self) -> FrameType: ... + @property + def cr_running(self) -> bool: ... + @abstractmethod + def send(self, __value: _T_contra) -> _T_co: ... + @overload + @abstractmethod + def throw( + self, __typ: Type[BaseException], __val: Union[BaseException, object] = ..., __tb: Optional[TracebackType] = ... + ) -> _T_co: ... + @overload + @abstractmethod + def throw(self, __typ: BaseException, __val: None = ..., __tb: Optional[TracebackType] = ...) -> _T_co: ... + @abstractmethod + def close(self) -> None: ... + +# NOTE: This type does not exist in typing.py or PEP 484. +# The parameters correspond to Generator, but the 4th is the original type. +class AwaitableGenerator( + Awaitable[_V_co], Generator[_T_co, _T_contra, _V_co], Generic[_T_co, _T_contra, _V_co, _S], metaclass=ABCMeta +): ... + +@runtime_checkable +class AsyncIterable(Protocol[_T_co]): + @abstractmethod + def __aiter__(self) -> AsyncIterator[_T_co]: ... + +@runtime_checkable +class AsyncIterator(AsyncIterable[_T_co], Protocol[_T_co]): + @abstractmethod + def __anext__(self) -> Awaitable[_T_co]: ... + def __aiter__(self) -> AsyncIterator[_T_co]: ... + +class AsyncGenerator(AsyncIterator[_T_co], Generic[_T_co, _T_contra]): + @abstractmethod + def __anext__(self) -> Awaitable[_T_co]: ... + @abstractmethod + def asend(self, __value: _T_contra) -> Awaitable[_T_co]: ... + @overload + @abstractmethod + def athrow( + self, __typ: Type[BaseException], __val: Union[BaseException, object] = ..., __tb: Optional[TracebackType] = ... + ) -> Awaitable[_T_co]: ... + @overload + @abstractmethod + def athrow(self, __typ: BaseException, __val: None = ..., __tb: Optional[TracebackType] = ...) -> Awaitable[_T_co]: ... + @abstractmethod + def aclose(self) -> Awaitable[None]: ... + @abstractmethod + def __aiter__(self) -> AsyncGenerator[_T_co, _T_contra]: ... + @property + def ag_await(self) -> Any: ... + @property + def ag_code(self) -> CodeType: ... + @property + def ag_frame(self) -> FrameType: ... + @property + def ag_running(self) -> bool: ... + +@runtime_checkable +class Container(Protocol[_T_co]): + @abstractmethod + def __contains__(self, __x: object) -> bool: ... + +@runtime_checkable +class Collection(Iterable[_T_co], Container[_T_co], Protocol[_T_co]): + # Implement Sized (but don't have it as a base class). + @abstractmethod + def __len__(self) -> int: ... + +_Collection = Collection[_T_co] + +class Sequence(_Collection[_T_co], Reversible[_T_co], Generic[_T_co]): + @overload + @abstractmethod + def __getitem__(self, i: int) -> _T_co: ... + @overload + @abstractmethod + def __getitem__(self, s: slice) -> Sequence[_T_co]: ... + # Mixin methods + def index(self, value: Any, start: int = ..., stop: int = ...) -> int: ... + def count(self, value: Any) -> int: ... + def __contains__(self, x: object) -> bool: ... + def __iter__(self) -> Iterator[_T_co]: ... + def __reversed__(self) -> Iterator[_T_co]: ... + +class MutableSequence(Sequence[_T], Generic[_T]): + @abstractmethod + def insert(self, index: int, value: _T) -> None: ... + @overload + @abstractmethod + def __getitem__(self, i: int) -> _T: ... + @overload + @abstractmethod + def __getitem__(self, s: slice) -> MutableSequence[_T]: ... + @overload + @abstractmethod + def __setitem__(self, i: int, o: _T) -> None: ... + @overload + @abstractmethod + def __setitem__(self, s: slice, o: Iterable[_T]) -> None: ... + @overload + @abstractmethod + def __delitem__(self, i: int) -> None: ... + @overload + @abstractmethod + def __delitem__(self, i: slice) -> None: ... + # Mixin methods + def append(self, value: _T) -> None: ... + def clear(self) -> None: ... + def extend(self, values: Iterable[_T]) -> None: ... + def reverse(self) -> None: ... + def pop(self, index: int = ...) -> _T: ... + def remove(self, value: _T) -> None: ... + def __iadd__(self, x: Iterable[_T]) -> MutableSequence[_T]: ... + +class AbstractSet(_Collection[_T_co], Generic[_T_co]): + @abstractmethod + def __contains__(self, x: object) -> bool: ... + # Mixin methods + def __le__(self, s: AbstractSet[Any]) -> bool: ... + def __lt__(self, s: AbstractSet[Any]) -> bool: ... + def __gt__(self, s: AbstractSet[Any]) -> bool: ... + def __ge__(self, s: AbstractSet[Any]) -> bool: ... + def __and__(self, s: AbstractSet[Any]) -> AbstractSet[_T_co]: ... + def __or__(self, s: AbstractSet[_T]) -> AbstractSet[Union[_T_co, _T]]: ... + def __sub__(self, s: AbstractSet[Any]) -> AbstractSet[_T_co]: ... + def __xor__(self, s: AbstractSet[_T]) -> AbstractSet[Union[_T_co, _T]]: ... + def isdisjoint(self, other: Iterable[Any]) -> bool: ... + +class MutableSet(AbstractSet[_T], Generic[_T]): + @abstractmethod + def add(self, value: _T) -> None: ... + @abstractmethod + def discard(self, value: _T) -> None: ... + # Mixin methods + def clear(self) -> None: ... + def pop(self) -> _T: ... + def remove(self, value: _T) -> None: ... + def __ior__(self, s: AbstractSet[_S]) -> MutableSet[Union[_T, _S]]: ... + def __iand__(self, s: AbstractSet[Any]) -> MutableSet[_T]: ... + def __ixor__(self, s: AbstractSet[_S]) -> MutableSet[Union[_T, _S]]: ... + def __isub__(self, s: AbstractSet[Any]) -> MutableSet[_T]: ... + +class MappingView(Sized): + def __init__(self, mapping: Mapping[Any, Any]) -> None: ... # undocumented + def __len__(self) -> int: ... + +class ItemsView(MappingView, AbstractSet[Tuple[_KT_co, _VT_co]], Generic[_KT_co, _VT_co]): + def __init__(self, mapping: Mapping[_KT_co, _VT_co]) -> None: ... # undocumented + def __and__(self, o: Iterable[Any]) -> Set[Tuple[_KT_co, _VT_co]]: ... + def __rand__(self, o: Iterable[_T]) -> Set[_T]: ... + def __contains__(self, o: object) -> bool: ... + def __iter__(self) -> Iterator[Tuple[_KT_co, _VT_co]]: ... + if sys.version_info >= (3, 8): + def __reversed__(self) -> Iterator[Tuple[_KT_co, _VT_co]]: ... + def __or__(self, o: Iterable[_T]) -> Set[Union[Tuple[_KT_co, _VT_co], _T]]: ... + def __ror__(self, o: Iterable[_T]) -> Set[Union[Tuple[_KT_co, _VT_co], _T]]: ... + def __sub__(self, o: Iterable[Any]) -> Set[Tuple[_KT_co, _VT_co]]: ... + def __rsub__(self, o: Iterable[_T]) -> Set[_T]: ... + def __xor__(self, o: Iterable[_T]) -> Set[Union[Tuple[_KT_co, _VT_co], _T]]: ... + def __rxor__(self, o: Iterable[_T]) -> Set[Union[Tuple[_KT_co, _VT_co], _T]]: ... + +class KeysView(MappingView, AbstractSet[_KT_co], Generic[_KT_co]): + def __init__(self, mapping: Mapping[_KT_co, Any]) -> None: ... # undocumented + def __and__(self, o: Iterable[Any]) -> Set[_KT_co]: ... + def __rand__(self, o: Iterable[_T]) -> Set[_T]: ... + def __contains__(self, o: object) -> bool: ... + def __iter__(self) -> Iterator[_KT_co]: ... + if sys.version_info >= (3, 8): + def __reversed__(self) -> Iterator[_KT_co]: ... + def __or__(self, o: Iterable[_T]) -> Set[Union[_KT_co, _T]]: ... + def __ror__(self, o: Iterable[_T]) -> Set[Union[_KT_co, _T]]: ... + def __sub__(self, o: Iterable[Any]) -> Set[_KT_co]: ... + def __rsub__(self, o: Iterable[_T]) -> Set[_T]: ... + def __xor__(self, o: Iterable[_T]) -> Set[Union[_KT_co, _T]]: ... + def __rxor__(self, o: Iterable[_T]) -> Set[Union[_KT_co, _T]]: ... + +class ValuesView(MappingView, Iterable[_VT_co], Generic[_VT_co]): + def __init__(self, mapping: Mapping[Any, _VT_co]) -> None: ... # undocumented + def __contains__(self, o: object) -> bool: ... + def __iter__(self) -> Iterator[_VT_co]: ... + if sys.version_info >= (3, 8): + def __reversed__(self) -> Iterator[_VT_co]: ... + +@runtime_checkable +class ContextManager(Protocol[_T_co]): + def __enter__(self) -> _T_co: ... + def __exit__( + self, + __exc_type: Optional[Type[BaseException]], + __exc_value: Optional[BaseException], + __traceback: Optional[TracebackType], + ) -> Optional[bool]: ... + +@runtime_checkable +class AsyncContextManager(Protocol[_T_co]): + def __aenter__(self) -> Awaitable[_T_co]: ... + def __aexit__( + self, exc_type: Optional[Type[BaseException]], exc_value: Optional[BaseException], traceback: Optional[TracebackType] + ) -> Awaitable[Optional[bool]]: ... + +class Mapping(_Collection[_KT], Generic[_KT, _VT_co]): + # TODO: We wish the key type could also be covariant, but that doesn't work, + # see discussion in https: //github.com/python/typing/pull/273. + @abstractmethod + def __getitem__(self, k: _KT) -> _VT_co: ... + # Mixin methods + @overload + def get(self, key: _KT) -> Optional[_VT_co]: ... + @overload + def get(self, key: _KT, default: Union[_VT_co, _T]) -> Union[_VT_co, _T]: ... + def items(self) -> AbstractSet[Tuple[_KT, _VT_co]]: ... + def keys(self) -> AbstractSet[_KT]: ... + def values(self) -> ValuesView[_VT_co]: ... + def __contains__(self, o: object) -> bool: ... + +class MutableMapping(Mapping[_KT, _VT], Generic[_KT, _VT]): + @abstractmethod + def __setitem__(self, k: _KT, v: _VT) -> None: ... + @abstractmethod + def __delitem__(self, v: _KT) -> None: ... + def clear(self) -> None: ... + @overload + def pop(self, key: _KT) -> _VT: ... + @overload + def pop(self, key: _KT, default: Union[_VT, _T] = ...) -> Union[_VT, _T]: ... + def popitem(self) -> Tuple[_KT, _VT]: ... + def setdefault(self, key: _KT, default: _VT = ...) -> _VT: ... + # 'update' used to take a Union, but using overloading is better. + # The second overloaded type here is a bit too general, because + # Mapping[Tuple[_KT, _VT], W] is a subclass of Iterable[Tuple[_KT, _VT]], + # but will always have the behavior of the first overloaded type + # at runtime, leading to keys of a mix of types _KT and Tuple[_KT, _VT]. + # We don't currently have any way of forcing all Mappings to use + # the first overload, but by using overloading rather than a Union, + # mypy will commit to using the first overload when the argument is + # known to be a Mapping with unknown type parameters, which is closer + # to the behavior we want. See mypy issue #1430. + @overload + def update(self, __m: Mapping[_KT, _VT], **kwargs: _VT) -> None: ... + @overload + def update(self, __m: Iterable[Tuple[_KT, _VT]], **kwargs: _VT) -> None: ... + @overload + def update(self, **kwargs: _VT) -> None: ... + +Text = str + +TYPE_CHECKING = True + +class IO(Iterator[AnyStr], Generic[AnyStr]): + # TODO use abstract properties + @property + def mode(self) -> str: ... + @property + def name(self) -> str: ... + @abstractmethod + def close(self) -> None: ... + @property + def closed(self) -> bool: ... + @abstractmethod + def fileno(self) -> int: ... + @abstractmethod + def flush(self) -> None: ... + @abstractmethod + def isatty(self) -> bool: ... + @abstractmethod + def read(self, n: int = ...) -> AnyStr: ... + @abstractmethod + def readable(self) -> bool: ... + @abstractmethod + def readline(self, limit: int = ...) -> AnyStr: ... + @abstractmethod + def readlines(self, hint: int = ...) -> list[AnyStr]: ... + @abstractmethod + def seek(self, offset: int, whence: int = ...) -> int: ... + @abstractmethod + def seekable(self) -> bool: ... + @abstractmethod + def tell(self) -> int: ... + @abstractmethod + def truncate(self, size: Optional[int] = ...) -> int: ... + @abstractmethod + def writable(self) -> bool: ... + @abstractmethod + def write(self, s: AnyStr) -> int: ... + @abstractmethod + def writelines(self, lines: Iterable[AnyStr]) -> None: ... + @abstractmethod + def __next__(self) -> AnyStr: ... + @abstractmethod + def __iter__(self) -> Iterator[AnyStr]: ... + @abstractmethod + def __enter__(self) -> IO[AnyStr]: ... + @abstractmethod + def __exit__( + self, t: Optional[Type[BaseException]], value: Optional[BaseException], traceback: Optional[TracebackType] + ) -> Optional[bool]: ... + +class BinaryIO(IO[bytes]): + @abstractmethod + def __enter__(self) -> BinaryIO: ... + +class TextIO(IO[str]): + # TODO use abstractproperty + @property + def buffer(self) -> BinaryIO: ... + @property + def encoding(self) -> str: ... + @property + def errors(self) -> Optional[str]: ... + @property + def line_buffering(self) -> int: ... # int on PyPy, bool on CPython + @property + def newlines(self) -> Any: ... # None, str or tuple + @abstractmethod + def __enter__(self) -> TextIO: ... + +class ByteString(Sequence[int], metaclass=ABCMeta): ... + +class Match(Generic[AnyStr]): + pos: int + endpos: int + lastindex: Optional[int] + lastgroup: Optional[AnyStr] + string: AnyStr + + # The regular expression object whose match() or search() method produced + # this match instance. + re: Pattern[AnyStr] + def expand(self, template: AnyStr) -> AnyStr: ... + # group() returns "AnyStr" or "AnyStr | None", depending on the pattern. + @overload + def group(self, __group: _Literal[0] = ...) -> AnyStr: ... + @overload + def group(self, __group: str | int) -> AnyStr | Any: ... + @overload + def group(self, __group1: str | int, __group2: str | int, *groups: str | int) -> Tuple[AnyStr | Any, ...]: ... + # Each item of groups()'s return tuple is either "AnyStr" or + # "AnyStr | None", depending on the pattern. + @overload + def groups(self) -> Tuple[AnyStr | Any, ...]: ... + @overload + def groups(self, default: _T) -> Tuple[AnyStr | _T, ...]: ... + # Each value in groupdict()'s return dict is either "AnyStr" or + # "AnyStr | None", depending on the pattern. + @overload + def groupdict(self) -> dict[str, AnyStr | Any]: ... + @overload + def groupdict(self, default: _T) -> dict[str, AnyStr | _T]: ... + def start(self, __group: Union[int, str] = ...) -> int: ... + def end(self, __group: Union[int, str] = ...) -> int: ... + def span(self, __group: Union[int, str] = ...) -> Tuple[int, int]: ... + @property + def regs(self) -> Tuple[Tuple[int, int], ...]: ... # undocumented + # __getitem__() returns "AnyStr" or "AnyStr | None", depending on the pattern. + @overload + def __getitem__(self, __key: _Literal[0]) -> AnyStr: ... + @overload + def __getitem__(self, __key: int | str) -> AnyStr | Any: ... + if sys.version_info >= (3, 9): + def __class_getitem__(cls, item: Any) -> GenericAlias: ... + +class Pattern(Generic[AnyStr]): + flags: int + groupindex: Mapping[str, int] + groups: int + pattern: AnyStr + def search(self, string: AnyStr, pos: int = ..., endpos: int = ...) -> Optional[Match[AnyStr]]: ... + def match(self, string: AnyStr, pos: int = ..., endpos: int = ...) -> Optional[Match[AnyStr]]: ... + def fullmatch(self, string: AnyStr, pos: int = ..., endpos: int = ...) -> Optional[Match[AnyStr]]: ... + def split(self, string: AnyStr, maxsplit: int = ...) -> list[AnyStr]: ... + def findall(self, string: AnyStr, pos: int = ..., endpos: int = ...) -> list[Any]: ... + def finditer(self, string: AnyStr, pos: int = ..., endpos: int = ...) -> Iterator[Match[AnyStr]]: ... + @overload + def sub(self, repl: AnyStr, string: AnyStr, count: int = ...) -> AnyStr: ... + @overload + def sub(self, repl: Callable[[Match[AnyStr]], AnyStr], string: AnyStr, count: int = ...) -> AnyStr: ... + @overload + def subn(self, repl: AnyStr, string: AnyStr, count: int = ...) -> Tuple[AnyStr, int]: ... + @overload + def subn(self, repl: Callable[[Match[AnyStr]], AnyStr], string: AnyStr, count: int = ...) -> Tuple[AnyStr, int]: ... + if sys.version_info >= (3, 9): + def __class_getitem__(cls, item: Any) -> GenericAlias: ... + +# Functions + +if sys.version_info >= (3, 7): + _get_type_hints_obj_allowed_types = Union[ + object, + Callable[..., Any], + FunctionType, + BuiltinFunctionType, + MethodType, + ModuleType, + WrapperDescriptorType, + MethodWrapperType, + MethodDescriptorType, + ] +else: + _get_type_hints_obj_allowed_types = Union[ + object, Callable[..., Any], FunctionType, BuiltinFunctionType, MethodType, ModuleType, + ] + +if sys.version_info >= (3, 9): + def get_type_hints( + obj: _get_type_hints_obj_allowed_types, + globalns: Optional[Dict[str, Any]] = ..., + localns: Optional[Dict[str, Any]] = ..., + include_extras: bool = ..., + ) -> Dict[str, Any]: ... + +else: + def get_type_hints( + obj: _get_type_hints_obj_allowed_types, globalns: Optional[Dict[str, Any]] = ..., localns: Optional[Dict[str, Any]] = ... + ) -> Dict[str, Any]: ... + +if sys.version_info >= (3, 8): + def get_origin(tp: Any) -> Optional[Any]: ... + def get_args(tp: Any) -> Tuple[Any, ...]: ... + +@overload +def cast(typ: Type[_T], val: Any) -> _T: ... +@overload +def cast(typ: str, val: Any) -> Any: ... +@overload +def cast(typ: object, val: Any) -> Any: ... + +# Type constructors + +# NamedTuple is special-cased in the type checker +class NamedTuple(Tuple[Any, ...]): + _field_types: collections.OrderedDict[str, Type[Any]] + _field_defaults: Dict[str, Any] = ... + _fields: Tuple[str, ...] + _source: str + def __init__(self, typename: str, fields: Iterable[Tuple[str, Any]] = ..., **kwargs: Any) -> None: ... + @classmethod + def _make(cls: Type[_T], iterable: Iterable[Any]) -> _T: ... + if sys.version_info >= (3, 8): + def _asdict(self) -> Dict[str, Any]: ... + else: + def _asdict(self) -> collections.OrderedDict[str, Any]: ... + def _replace(self: _T, **kwargs: Any) -> _T: ... + +# Internal mypy fallback type for all typed dicts (does not exist at runtime) +class _TypedDict(Mapping[str, object], metaclass=ABCMeta): + def copy(self: _T) -> _T: ... + # Using NoReturn so that only calls using mypy plugin hook that specialize the signature + # can go through. + def setdefault(self, k: NoReturn, default: object) -> object: ... + # Mypy plugin hook for 'pop' expects that 'default' has a type variable type. + def pop(self, k: NoReturn, default: _T = ...) -> object: ... # type: ignore + def update(self: _T, __m: _T) -> None: ... + def __delitem__(self, k: NoReturn) -> None: ... + def items(self) -> ItemsView[str, object]: ... + def keys(self) -> KeysView[str]: ... + def values(self) -> ValuesView[object]: ... + def __or__(self: _T, __value: _T) -> _T: ... + def __ior__(self: _T, __value: _T) -> _T: ... + +def NewType(name: str, tp: Type[_T]) -> Type[_T]: ... + +# This itself is only available during type checking +def type_check_only(func_or_cls: _F) -> _F: ... + +if sys.version_info >= (3, 7): + class ForwardRef: + __forward_arg__: str + __forward_code__: CodeType + __forward_evaluated__: bool + __forward_value__: Optional[Any] + __forward_is_argument__: bool + def __init__(self, arg: str, is_argument: bool = ...) -> None: ... + def _evaluate(self, globalns: Optional[Dict[str, Any]], localns: Optional[Dict[str, Any]]) -> Optional[Any]: ... + def __eq__(self, other: Any) -> bool: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + +if sys.version_info >= (3, 10): + def is_typeddict(tp: Any) -> bool: ... diff --git a/lang/lol/typeshed/stdlib/typing_extensions.pyi b/lang/lol/typeshed/stdlib/typing_extensions.pyi new file mode 100644 index 0000000..59fe3df --- /dev/null +++ b/lang/lol/typeshed/stdlib/typing_extensions.pyi @@ -0,0 +1,115 @@ +import abc +import sys +from typing import ( + TYPE_CHECKING as TYPE_CHECKING, + Any, + AsyncContextManager as AsyncContextManager, + AsyncGenerator as AsyncGenerator, + AsyncIterable as AsyncIterable, + AsyncIterator as AsyncIterator, + Awaitable as Awaitable, + Callable, + ChainMap as ChainMap, + ClassVar as ClassVar, + ContextManager as ContextManager, + Coroutine as Coroutine, + Counter as Counter, + DefaultDict as DefaultDict, + Deque as Deque, + ItemsView, + KeysView, + Mapping, + NewType as NewType, + NoReturn as NoReturn, + Text as Text, + Tuple, + Type as Type, + TypeVar, + ValuesView, + _Alias, + overload as overload, +) + +_T = TypeVar("_T") +_F = TypeVar("_F", bound=Callable[..., Any]) +_TC = TypeVar("_TC", bound=Type[object]) + +class _SpecialForm: + def __getitem__(self, typeargs: Any) -> Any: ... + +def runtime_checkable(cls: _TC) -> _TC: ... + +# This alias for above is kept here for backwards compatibility. +runtime = runtime_checkable +Protocol: _SpecialForm = ... +Final: _SpecialForm = ... + +def final(f: _F) -> _F: ... + +Literal: _SpecialForm = ... + +def IntVar(name: str) -> Any: ... # returns a new TypeVar + +# Internal mypy fallback type for all typed dicts (does not exist at runtime) +class _TypedDict(Mapping[str, object], metaclass=abc.ABCMeta): + def copy(self: _T) -> _T: ... + # Using NoReturn so that only calls using mypy plugin hook that specialize the signature + # can go through. + def setdefault(self, k: NoReturn, default: object) -> object: ... + # Mypy plugin hook for 'pop' expects that 'default' has a type variable type. + def pop(self, k: NoReturn, default: _T = ...) -> object: ... # type: ignore + def update(self: _T, __m: _T) -> None: ... + def items(self) -> ItemsView[str, object]: ... + def keys(self) -> KeysView[str]: ... + def values(self) -> ValuesView[object]: ... + def __delitem__(self, k: NoReturn) -> None: ... + +# TypedDict is a (non-subscriptable) special form. +TypedDict: object = ... + +OrderedDict = _Alias() + +def get_type_hints( + obj: Callable[..., Any], + globalns: dict[str, Any] | None = ..., + localns: dict[str, Any] | None = ..., + include_extras: bool = ..., +) -> dict[str, Any]: ... + +if sys.version_info >= (3, 7): + def get_args(tp: Any) -> Tuple[Any, ...]: ... + def get_origin(tp: Any) -> Any | None: ... + +Annotated: _SpecialForm = ... +_AnnotatedAlias: Any = ... # undocumented + +@runtime_checkable +class SupportsIndex(Protocol, metaclass=abc.ABCMeta): + @abc.abstractmethod + def __index__(self) -> int: ... + +# PEP 612 support for Python < 3.9 +if sys.version_info >= (3, 10): + from typing import Concatenate as Concatenate, ParamSpec as ParamSpec, TypeAlias as TypeAlias, TypeGuard as TypeGuard +else: + class ParamSpecArgs: + __origin__: ParamSpec + def __init__(self, origin: ParamSpec) -> None: ... + class ParamSpecKwargs: + __origin__: ParamSpec + def __init__(self, origin: ParamSpec) -> None: ... + class ParamSpec: + __name__: str + __bound__: Type[Any] | None + __covariant__: bool + __contravariant__: bool + def __init__( + self, name: str, *, bound: None | Type[Any] | str = ..., contravariant: bool = ..., covariant: bool = ... + ) -> None: ... + @property + def args(self) -> ParamSpecArgs: ... + @property + def kwargs(self) -> ParamSpecKwargs: ... + Concatenate: _SpecialForm = ... + TypeAlias: _SpecialForm = ... + TypeGuard: _SpecialForm = ... diff --git a/lang/lol/typeshed/stdlib/uarray.pyi b/lang/lol/typeshed/stdlib/uarray.pyi new file mode 100644 index 0000000..d1ba4d9 --- /dev/null +++ b/lang/lol/typeshed/stdlib/uarray.pyi @@ -0,0 +1 @@ +from array import * diff --git a/lang/lol/typeshed/stdlib/ucollections.pyi b/lang/lol/typeshed/stdlib/ucollections.pyi new file mode 100644 index 0000000..9400561 --- /dev/null +++ b/lang/lol/typeshed/stdlib/ucollections.pyi @@ -0,0 +1 @@ +from collections import * diff --git a/lang/lol/typeshed/stdlib/uerrno.pyi b/lang/lol/typeshed/stdlib/uerrno.pyi new file mode 100644 index 0000000..5ecb44d --- /dev/null +++ b/lang/lol/typeshed/stdlib/uerrno.pyi @@ -0,0 +1 @@ +from errno import * diff --git a/lang/lol/typeshed/stdlib/urandom.pyi b/lang/lol/typeshed/stdlib/urandom.pyi new file mode 100644 index 0000000..1c31bde --- /dev/null +++ b/lang/lol/typeshed/stdlib/urandom.pyi @@ -0,0 +1 @@ +from random import * diff --git a/lang/lol/typeshed/stdlib/ustruct.pyi b/lang/lol/typeshed/stdlib/ustruct.pyi new file mode 100644 index 0000000..ee3a9fc --- /dev/null +++ b/lang/lol/typeshed/stdlib/ustruct.pyi @@ -0,0 +1 @@ +from struct import * diff --git a/lang/lol/typeshed/stdlib/usys.pyi b/lang/lol/typeshed/stdlib/usys.pyi new file mode 100644 index 0000000..104052c --- /dev/null +++ b/lang/lol/typeshed/stdlib/usys.pyi @@ -0,0 +1 @@ +from sys import * diff --git a/lang/lol/typeshed/stdlib/utime.pyi b/lang/lol/typeshed/stdlib/utime.pyi new file mode 100644 index 0000000..72705db --- /dev/null +++ b/lang/lol/typeshed/stdlib/utime.pyi @@ -0,0 +1 @@ +from time import * diff --git a/lang/nl/typeshed/stdlib/microbit/spi.pyi b/lang/nl/typeshed/stdlib/microbit/spi.pyi index 202c17a..064ddbf 100644 --- a/lang/nl/typeshed/stdlib/microbit/spi.pyi +++ b/lang/nl/typeshed/stdlib/microbit/spi.pyi @@ -17,12 +17,13 @@ For correct communication, the parameters have to be the same on both communicat :param miso: miso pin (standaard 14)""" ... -def read(nbytes: int) -> bytes: +def read(nbytes: int, out: int=0) -> bytes: """Lees bytes. (lezen) Example: ``spi.read(64)`` :param nbytes: Maximum aantal te lezen bytes. +:param out: (uit) The byte value to write (default 0). :return: The bytes read.""" ... diff --git a/lang/pl/typeshed/stdlib/VERSIONS b/lang/pl/typeshed/stdlib/VERSIONS new file mode 100644 index 0000000..67b710f --- /dev/null +++ b/lang/pl/typeshed/stdlib/VERSIONS @@ -0,0 +1,50 @@ +# The structure of this file is as follows: +# - Blank lines and comments starting with `#` are ignored. +# - Lines contain the name of a module, followed by a colon, +# a space, and a version range (for example: `symbol: 2.7-3.9`). +# +# Version ranges may be of the form "X.Y-A.B" or "X.Y-". The +# first form means that a module was introduced in version X.Y and last +# available in version A.B. The second form means that the module was +# introduced in version X.Y and is still available in the latest +# version of Python. +# +# If a submodule is not listed separately, it has the same lifetime as +# its parent module. +# +# Python versions before 2.7 are ignored, so any module that was already +# present in 2.7 will have "2.7" as its minimum version. Version ranges +# for unsupported versions of Python 3 (currently 3.5 and lower) are +# generally accurate but we do not guarantee their correctness. + +antigravity: 3.0- +array: 3.0- +audio: 3.0- +builtins: 3.0- +errno: 3.0- +gc: 3.0- +love: 3.0- +machine: 3.0- +math: 3.0- +microbit: 3.0- +micropython: 3.0- +music: 3.0- +neopixel: 3.0- +os: 3.0- +radio: 3.0- +random: 3.0- +speech: 3.0- +struct: 3.0- +sys: 3.0- +this: 3.0- +time: 3.0- +typing_extensions: 3.0- +typing: 3.0- +uarray: 3.0- +ucollections: 3.0- +uerrno: 3.0- +uos: 3.0- +urandom: 3.0- +ustruct: 3.0- +usys: 3.0- +utime: 3.0- \ No newline at end of file diff --git a/lang/pl/typeshed/stdlib/_typeshed/__init__.pyi b/lang/pl/typeshed/stdlib/_typeshed/__init__.pyi new file mode 100644 index 0000000..7bf6e72 --- /dev/null +++ b/lang/pl/typeshed/stdlib/_typeshed/__init__.pyi @@ -0,0 +1,168 @@ +# Utility types for typeshed +# +# See the README.md file in this directory for more information. + +import array +import sys +from os import PathLike +from typing import AbstractSet, Any, Container, Iterable, Protocol, Tuple, TypeVar, Union +from typing_extensions import Literal, final + +_KT = TypeVar("_KT") +_KT_co = TypeVar("_KT_co", covariant=True) +_KT_contra = TypeVar("_KT_contra", contravariant=True) +_VT = TypeVar("_VT") +_VT_co = TypeVar("_VT_co", covariant=True) +_T = TypeVar("_T") +_T_co = TypeVar("_T_co", covariant=True) +_T_contra = TypeVar("_T_contra", contravariant=True) + +# Use for "self" annotations: +# def __enter__(self: Self) -> Self: ... +Self = TypeVar("Self") # noqa Y001 + +# stable +class IdentityFunction(Protocol): + def __call__(self, __x: _T) -> _T: ... + +class SupportsLessThan(Protocol): + def __lt__(self, __other: Any) -> bool: ... + +SupportsLessThanT = TypeVar("SupportsLessThanT", bound=SupportsLessThan) # noqa: Y001 + +class SupportsDivMod(Protocol[_T_contra, _T_co]): + def __divmod__(self, __other: _T_contra) -> _T_co: ... + +class SupportsRDivMod(Protocol[_T_contra, _T_co]): + def __rdivmod__(self, __other: _T_contra) -> _T_co: ... + +class SupportsLenAndGetItem(Protocol[_T_co]): + def __len__(self) -> int: ... + def __getitem__(self, __k: int) -> _T_co: ... + +# Mapping-like protocols + +# stable +class SupportsItems(Protocol[_KT_co, _VT_co]): + def items(self) -> AbstractSet[Tuple[_KT_co, _VT_co]]: ... + +# stable +class SupportsKeysAndGetItem(Protocol[_KT, _VT_co]): + def keys(self) -> Iterable[_KT]: ... + def __getitem__(self, __k: _KT) -> _VT_co: ... + +# stable +class SupportsGetItem(Container[_KT_contra], Protocol[_KT_contra, _VT_co]): + def __getitem__(self, __k: _KT_contra) -> _VT_co: ... + +# stable +class SupportsItemAccess(SupportsGetItem[_KT_contra, _VT], Protocol[_KT_contra, _VT]): + def __setitem__(self, __k: _KT_contra, __v: _VT) -> None: ... + def __delitem__(self, __v: _KT_contra) -> None: ... + +# These aliases are simple strings in Python 2. +StrPath = Union[str, PathLike[str]] # stable +BytesPath = Union[bytes, PathLike[bytes]] # stable +StrOrBytesPath = Union[str, bytes, PathLike[str], PathLike[bytes]] # stable + +OpenTextModeUpdating = Literal[ + "r+", + "+r", + "rt+", + "r+t", + "+rt", + "tr+", + "t+r", + "+tr", + "w+", + "+w", + "wt+", + "w+t", + "+wt", + "tw+", + "t+w", + "+tw", + "a+", + "+a", + "at+", + "a+t", + "+at", + "ta+", + "t+a", + "+ta", + "x+", + "+x", + "xt+", + "x+t", + "+xt", + "tx+", + "t+x", + "+tx", +] +OpenTextModeWriting = Literal["w", "wt", "tw", "a", "at", "ta", "x", "xt", "tx"] +OpenTextModeReading = Literal["r", "rt", "tr", "U", "rU", "Ur", "rtU", "rUt", "Urt", "trU", "tUr", "Utr"] +OpenTextMode = Union[OpenTextModeUpdating, OpenTextModeWriting, OpenTextModeReading] +OpenBinaryModeUpdating = Literal[ + "rb+", + "r+b", + "+rb", + "br+", + "b+r", + "+br", + "wb+", + "w+b", + "+wb", + "bw+", + "b+w", + "+bw", + "ab+", + "a+b", + "+ab", + "ba+", + "b+a", + "+ba", + "xb+", + "x+b", + "+xb", + "bx+", + "b+x", + "+bx", +] +OpenBinaryModeWriting = Literal["wb", "bw", "ab", "ba", "xb", "bx"] +OpenBinaryModeReading = Literal["rb", "br", "rbU", "rUb", "Urb", "brU", "bUr", "Ubr"] +OpenBinaryMode = Union[OpenBinaryModeUpdating, OpenBinaryModeReading, OpenBinaryModeWriting] + +# stable +class HasFileno(Protocol): + def fileno(self) -> int: ... + +FileDescriptor = int # stable +FileDescriptorLike = Union[int, HasFileno] # stable + +# stable +class SupportsRead(Protocol[_T_co]): + def read(self, __length: int = ...) -> _T_co: ... + +# stable +class SupportsReadline(Protocol[_T_co]): + def readline(self, __length: int = ...) -> _T_co: ... + +# stable +class SupportsNoArgReadline(Protocol[_T_co]): + def readline(self) -> _T_co: ... + +# stable +class SupportsWrite(Protocol[_T_contra]): + def write(self, __s: _T_contra) -> Any: ... + +ReadableBuffer = Union[bytes, bytearray, memoryview, array.array[Any]] # stable +WriteableBuffer = Union[bytearray, memoryview, array.array[Any]] # stable + +# stable +if sys.version_info >= (3, 10): + from types import NoneType as NoneType +else: + # Used by type checkers for checks involving None (does not exist at runtime) + @final + class NoneType: + def __bool__(self) -> Literal[False]: ... diff --git a/lang/pl/typeshed/stdlib/abc.pyi b/lang/pl/typeshed/stdlib/abc.pyi new file mode 100644 index 0000000..18bb090 --- /dev/null +++ b/lang/pl/typeshed/stdlib/abc.pyi @@ -0,0 +1,28 @@ +from _typeshed import SupportsWrite +from typing import Any, Callable, Tuple, Type, TypeVar + +_T = TypeVar("_T") +_FuncT = TypeVar("_FuncT", bound=Callable[..., Any]) + +# These definitions have special processing in mypy +class ABCMeta(type): + __abstractmethods__: frozenset[str] + def __init__( + self, name: str, bases: Tuple[type, ...], namespace: dict[str, Any] + ) -> None: ... + def __instancecheck__(cls: ABCMeta, instance: Any) -> Any: ... + def __subclasscheck__(cls: ABCMeta, subclass: Any) -> Any: ... + def _dump_registry(cls: ABCMeta, file: SupportsWrite[str] | None = ...) -> None: ... + def register(cls: ABCMeta, subclass: Type[_T]) -> Type[_T]: ... + +def abstractmethod(funcobj: _FuncT) -> _FuncT: ... + +class abstractproperty(property): ... + +# These two are deprecated and not supported by mypy +def abstractstaticmethod(callable: _FuncT) -> _FuncT: ... +def abstractclassmethod(callable: _FuncT) -> _FuncT: ... + +class ABC(metaclass=ABCMeta): ... + +def get_cache_token() -> object: ... diff --git a/lang/pl/typeshed/stdlib/antigravity.pyi b/lang/pl/typeshed/stdlib/antigravity.pyi new file mode 100644 index 0000000..e69de29 diff --git a/lang/pl/typeshed/stdlib/array.pyi b/lang/pl/typeshed/stdlib/array.pyi new file mode 100644 index 0000000..1e4e630 --- /dev/null +++ b/lang/pl/typeshed/stdlib/array.pyi @@ -0,0 +1,42 @@ +from typing import Generic, Iterable, MutableSequence, TypeVar, Union, overload +from typing_extensions import Literal + +_IntTypeCode = Literal["b", "B", "h", "H", "i", "I", "l", "L", "q", "Q"] +_FloatTypeCode = Literal["f", "d"] +_TypeCode = Union[_IntTypeCode, _FloatTypeCode] + +_T = TypeVar("_T", int, float) + +class array(MutableSequence[_T], Generic[_T]): + @overload + def __init__( + self: array[int], + typecode: _IntTypeCode, + __initializer: Union[bytes, Iterable[_T]] = ..., + ) -> None: ... + @overload + def __init__( + self: array[float], + typecode: _FloatTypeCode, + __initializer: Union[bytes, Iterable[_T]] = ..., + ) -> None: ... + @overload + def __init__( + self, typecode: str, __initializer: Union[bytes, Iterable[_T]] = ... + ) -> None: ... + def append(self, __v: _T) -> None: ... + def decode(self) -> str: ... + def extend(self, __bb: Iterable[_T]) -> None: ... + def __len__(self) -> int: ... + @overload + def __getitem__(self, i: int) -> _T: ... + @overload + def __getitem__(self, s: slice) -> array[_T]: ... + @overload # type: ignore # Overrides MutableSequence + def __setitem__(self, i: int, o: _T) -> None: ... + @overload + def __setitem__(self, s: slice, o: array[_T]) -> None: ... + def __add__(self, x: array[_T]) -> array[_T]: ... + def __iadd__(self, x: array[_T]) -> array[_T]: ... # type: ignore # Overrides MutableSequence + +ArrayType = array diff --git a/lang/pl/typeshed/stdlib/audio.pyi b/lang/pl/typeshed/stdlib/audio.pyi new file mode 100644 index 0000000..b1d39c7 --- /dev/null +++ b/lang/pl/typeshed/stdlib/audio.pyi @@ -0,0 +1,11 @@ +"""Play sounds using the micro:bit (import ``audio`` for V1 compatibility). +""" + +# Re-export for V1 compatibility. +from .microbit.audio import ( + is_playing as is_playing, + play as play, + stop as stop, + AudioFrame as AudioFrame, + SoundEffect as SoundEffect, +) diff --git a/lang/pl/typeshed/stdlib/builtins.pyi b/lang/pl/typeshed/stdlib/builtins.pyi new file mode 100644 index 0000000..8b7dfb9 --- /dev/null +++ b/lang/pl/typeshed/stdlib/builtins.pyi @@ -0,0 +1,1334 @@ +import sys +import types +from _typeshed import ( + OpenBinaryMode, + OpenTextMode, + ReadableBuffer, + Self, + StrOrBytesPath, + SupportsDivMod, + SupportsKeysAndGetItem, + SupportsLenAndGetItem, + SupportsLessThan, + SupportsLessThanT, + SupportsRDivMod, + SupportsWrite, +) +from types import CodeType, TracebackType +from typing import ( + IO, + AbstractSet, + Any, + AsyncIterable, + AsyncIterator, + BinaryIO, + ByteString, + Callable, + FrozenSet, + Generic, + ItemsView, + Iterable, + Iterator, + KeysView, + Mapping, + MutableMapping, + MutableSequence, + MutableSet, + NoReturn, + Protocol, + Reversible, + Sequence, + Set, + Sized, + SupportsAbs, + SupportsBytes, + SupportsComplex, + SupportsFloat, + SupportsInt, + SupportsRound, + TextIO, + Tuple, + Type, + TypeVar, + Union, + ValuesView, + overload, +) +from typing_extensions import Literal, SupportsIndex, final + +if sys.version_info >= (3, 9): + from types import GenericAlias + +class _SupportsTrunc(Protocol): + def __trunc__(self) -> int: ... + +_T = TypeVar("_T") +_T_co = TypeVar("_T_co", covariant=True) +_T_contra = TypeVar("_T_contra", contravariant=True) +_KT = TypeVar("_KT") +_VT = TypeVar("_VT") +_S = TypeVar("_S") +_T1 = TypeVar("_T1") +_T2 = TypeVar("_T2") +_T3 = TypeVar("_T3") +_T4 = TypeVar("_T4") +_T5 = TypeVar("_T5") +_TT = TypeVar("_TT", bound="type") +_TBE = TypeVar("_TBE", bound="BaseException") + +class object: + __doc__: str | None + __dict__: dict[str, Any] + __slots__: str | Iterable[str] + __module__: str + __annotations__: dict[str, Any] + @property + def __class__(self: _T) -> Type[_T]: ... + # Ignore errors about type mismatch between property getter and setter + @__class__.setter + def __class__(self, __type: Type[object]) -> None: ... # type: ignore # noqa: F811 + def __init__(self) -> None: ... + def __new__(cls: Type[_T]) -> _T: ... + def __setattr__(self, name: str, value: Any) -> None: ... + def __eq__(self, o: object) -> bool: ... + def __ne__(self, o: object) -> bool: ... + def __str__(self) -> str: ... + def __repr__(self) -> str: ... + def __hash__(self) -> int: ... + def __format__(self, format_spec: str) -> str: ... + def __getattribute__(self, name: str) -> Any: ... + def __delattr__(self, name: str) -> None: ... + def __sizeof__(self) -> int: ... + def __reduce__(self) -> str | Tuple[Any, ...]: ... + if sys.version_info >= (3, 8): + def __reduce_ex__(self, protocol: SupportsIndex) -> str | Tuple[Any, ...]: ... + else: + def __reduce_ex__(self, protocol: int) -> str | Tuple[Any, ...]: ... + def __dir__(self) -> Iterable[str]: ... + def __init_subclass__(cls) -> None: ... + +class staticmethod(object): # Special, only valid as a decorator. + __func__: Callable[..., Any] + __isabstractmethod__: bool + def __init__(self, f: Callable[..., Any]) -> None: ... + def __new__(cls: Type[_T], *args: Any, **kwargs: Any) -> _T: ... + def __get__(self, obj: _T, type: Type[_T] | None = ...) -> Callable[..., Any]: ... + +class classmethod(object): # Special, only valid as a decorator. + __func__: Callable[..., Any] + __isabstractmethod__: bool + def __init__(self, f: Callable[..., Any]) -> None: ... + def __new__(cls: Type[_T], *args: Any, **kwargs: Any) -> _T: ... + def __get__(self, obj: _T, type: Type[_T] | None = ...) -> Callable[..., Any]: ... + +class type(object): + __base__: type + __bases__: Tuple[type, ...] + __basicsize__: int + __dict__: dict[str, Any] + __dictoffset__: int + __flags__: int + __itemsize__: int + __module__: str + __name__: str + __qualname__: str + __text_signature__: str | None + __weakrefoffset__: int + @overload + def __init__(self, o: object) -> None: ... + @overload + def __init__( + self, name: str, bases: Tuple[type, ...], dict: dict[str, Any], **kwds: Any + ) -> None: ... + @overload + def __new__(cls, o: object) -> type: ... + @overload + def __new__( + cls: Type[_TT], + name: str, + bases: Tuple[type, ...], + namespace: dict[str, Any], + **kwds: Any, + ) -> _TT: ... + def __call__(self, *args: Any, **kwds: Any) -> Any: ... + def __subclasses__(self: _TT) -> list[_TT]: ... + def __instancecheck__(self, instance: Any) -> bool: ... + def __subclasscheck__(self, subclass: type) -> bool: ... + @classmethod + def __prepare__( + metacls, __name: str, __bases: Tuple[type, ...], **kwds: Any + ) -> Mapping[str, Any]: ... + if sys.version_info >= (3, 10): + def __or__(self, t: Any) -> types.UnionType: ... + def __ror__(self, t: Any) -> types.UnionType: ... + +class super(object): + @overload + def __init__(self, t: Any, obj: Any) -> None: ... + @overload + def __init__(self, t: Any) -> None: ... + @overload + def __init__(self) -> None: ... + +class int: + @overload + def __new__( + cls: Type[_T], + x: str | bytes | SupportsInt | SupportsIndex | _SupportsTrunc = ..., + ) -> _T: ... + @overload + def __new__( + cls: Type[_T], x: str | bytes | bytearray, base: SupportsIndex + ) -> _T: ... + def to_bytes( + self, + length: SupportsIndex, + byteorder: Literal["little", "big"], + *, + signed: bool = ..., + ) -> bytes: ... + @classmethod + def from_bytes( + cls, + bytes: Iterable[SupportsIndex] | SupportsBytes, + byteorder: Literal["little", "big"], + *, + signed: bool = ..., + ) -> int: ... # TODO buffer object argument + def __add__(self, x: int) -> int: ... + def __sub__(self, x: int) -> int: ... + def __mul__(self, x: int) -> int: ... + def __floordiv__(self, x: int) -> int: ... + def __truediv__(self, x: int) -> float: ... + def __mod__(self, x: int) -> int: ... + def __divmod__(self, x: int) -> Tuple[int, int]: ... + def __radd__(self, x: int) -> int: ... + def __rsub__(self, x: int) -> int: ... + def __rmul__(self, x: int) -> int: ... + def __rfloordiv__(self, x: int) -> int: ... + def __rtruediv__(self, x: int) -> float: ... + def __rmod__(self, x: int) -> int: ... + def __rdivmod__(self, x: int) -> Tuple[int, int]: ... + @overload + def __pow__(self, __x: Literal[2], __modulo: int | None = ...) -> int: ... + @overload + def __pow__( + self, __x: int, __modulo: int | None = ... + ) -> Any: ... # Return type can be int or float, depending on x. + def __rpow__(self, x: int, mod: int | None = ...) -> Any: ... + def __and__(self, n: int) -> int: ... + def __or__(self, n: int) -> int: ... + def __xor__(self, n: int) -> int: ... + def __lshift__(self, n: int) -> int: ... + def __rshift__(self, n: int) -> int: ... + def __rand__(self, n: int) -> int: ... + def __ror__(self, n: int) -> int: ... + def __rxor__(self, n: int) -> int: ... + def __rlshift__(self, n: int) -> int: ... + def __rrshift__(self, n: int) -> int: ... + def __neg__(self) -> int: ... + def __pos__(self) -> int: ... + def __invert__(self) -> int: ... + def __trunc__(self) -> int: ... + def __ceil__(self) -> int: ... + def __floor__(self) -> int: ... + def __round__(self, ndigits: SupportsIndex = ...) -> int: ... + def __getnewargs__(self) -> Tuple[int]: ... + def __eq__(self, x: object) -> bool: ... + def __ne__(self, x: object) -> bool: ... + def __lt__(self, x: int) -> bool: ... + def __le__(self, x: int) -> bool: ... + def __gt__(self, x: int) -> bool: ... + def __ge__(self, x: int) -> bool: ... + def __str__(self) -> str: ... + def __float__(self) -> float: ... + def __int__(self) -> int: ... + def __abs__(self) -> int: ... + def __hash__(self) -> int: ... + def __bool__(self) -> bool: ... + def __index__(self) -> int: ... + +class float: + def __new__( + cls: Type[_T], x: SupportsFloat | SupportsIndex | str | bytes | bytearray = ... + ) -> _T: ... + def __add__(self, x: float) -> float: ... + def __sub__(self, x: float) -> float: ... + def __mul__(self, x: float) -> float: ... + def __floordiv__(self, x: float) -> float: ... + def __truediv__(self, x: float) -> float: ... + def __mod__(self, x: float) -> float: ... + def __divmod__(self, x: float) -> Tuple[float, float]: ... + def __pow__( + self, x: float, mod: None = ... + ) -> float: ... # In Python 3, returns complex if self is negative and x is not whole + def __radd__(self, x: float) -> float: ... + def __rsub__(self, x: float) -> float: ... + def __rmul__(self, x: float) -> float: ... + def __rfloordiv__(self, x: float) -> float: ... + def __rtruediv__(self, x: float) -> float: ... + def __rmod__(self, x: float) -> float: ... + def __rdivmod__(self, x: float) -> Tuple[float, float]: ... + def __rpow__(self, x: float, mod: None = ...) -> float: ... + def __getnewargs__(self) -> Tuple[float]: ... + def __trunc__(self) -> int: ... + if sys.version_info >= (3, 9): + def __ceil__(self) -> int: ... + def __floor__(self) -> int: ... + @overload + def __round__(self, ndigits: None = ...) -> int: ... + @overload + def __round__(self, ndigits: SupportsIndex) -> float: ... + def __eq__(self, x: object) -> bool: ... + def __ne__(self, x: object) -> bool: ... + def __lt__(self, x: float) -> bool: ... + def __le__(self, x: float) -> bool: ... + def __gt__(self, x: float) -> bool: ... + def __ge__(self, x: float) -> bool: ... + def __neg__(self) -> float: ... + def __pos__(self) -> float: ... + def __str__(self) -> str: ... + def __int__(self) -> int: ... + def __float__(self) -> float: ... + def __abs__(self) -> float: ... + def __hash__(self) -> int: ... + def __bool__(self) -> bool: ... + +class complex: + @overload + def __new__(cls: Type[_T], real: float = ..., imag: float = ...) -> _T: ... + @overload + def __new__( + cls: Type[_T], real: str | SupportsComplex | SupportsIndex | complex + ) -> _T: ... + @property + def real(self) -> float: ... + @property + def imag(self) -> float: ... + def __add__(self, x: complex) -> complex: ... + def __sub__(self, x: complex) -> complex: ... + def __mul__(self, x: complex) -> complex: ... + def __pow__(self, x: complex, mod: None = ...) -> complex: ... + def __truediv__(self, x: complex) -> complex: ... + def __radd__(self, x: complex) -> complex: ... + def __rsub__(self, x: complex) -> complex: ... + def __rmul__(self, x: complex) -> complex: ... + def __rpow__(self, x: complex, mod: None = ...) -> complex: ... + def __rtruediv__(self, x: complex) -> complex: ... + def __eq__(self, x: object) -> bool: ... + def __ne__(self, x: object) -> bool: ... + def __neg__(self) -> complex: ... + def __pos__(self) -> complex: ... + def __str__(self) -> str: ... + def __abs__(self) -> float: ... + def __hash__(self) -> int: ... + def __bool__(self) -> bool: ... + +class str(Sequence[str]): + @overload + def __new__(cls: Type[_T], o: object = ...) -> _T: ... + @overload + def __new__( + cls: Type[_T], o: bytes, encoding: str = ..., errors: str = ... + ) -> _T: ... + def count( + self, + x: str, + __start: SupportsIndex | None = ..., + __end: SupportsIndex | None = ..., + ) -> int: ... + def encode(self, encoding: str = ..., errors: str = ...) -> bytes: ... + def endswith( + self, + __suffix: str | Tuple[str, ...], + __start: SupportsIndex | None = ..., + __end: SupportsIndex | None = ..., + ) -> bool: ... + def find( + self, + __sub: str, + __start: SupportsIndex | None = ..., + __end: SupportsIndex | None = ..., + ) -> int: ... + def format(self, *args: object, **kwargs: object) -> str: ... + def index( + self, + __sub: str, + __start: SupportsIndex | None = ..., + __end: SupportsIndex | None = ..., + ) -> int: ... + def isalpha(self) -> bool: ... + def isdigit(self) -> bool: ... + def islower(self) -> bool: ... + def isspace(self) -> bool: ... + def isupper(self) -> bool: ... + def join(self, __iterable: Iterable[str]) -> str: ... + def lower(self) -> str: ... + def lstrip(self, __chars: str | None = ...) -> str: ... + def replace(self, __old: str, __new: str, __count: SupportsIndex = ...) -> str: ... + def rfind( + self, + __sub: str, + __start: SupportsIndex | None = ..., + __end: SupportsIndex | None = ..., + ) -> int: ... + def rindex( + self, + __sub: str, + __start: SupportsIndex | None = ..., + __end: SupportsIndex | None = ..., + ) -> int: ... + def rsplit( + self, sep: str | None = ..., maxsplit: SupportsIndex = ... + ) -> list[str]: ... + def rstrip(self, __chars: str | None = ...) -> str: ... + def split( + self, sep: str | None = ..., maxsplit: SupportsIndex = ... + ) -> list[str]: ... + def startswith( + self, + __prefix: str | Tuple[str, ...], + __start: SupportsIndex | None = ..., + __end: SupportsIndex | None = ..., + ) -> bool: ... + def strip(self, __chars: str | None = ...) -> str: ... + def upper(self) -> str: ... + def __add__(self, s: str) -> str: ... + # Incompatible with Sequence.__contains__ + def __contains__(self, o: str) -> bool: ... # type: ignore + def __eq__(self, x: object) -> bool: ... + def __ge__(self, x: str) -> bool: ... + def __getitem__(self, i: int | slice) -> str: ... + def __gt__(self, x: str) -> bool: ... + def __hash__(self) -> int: ... + def __iter__(self) -> Iterator[str]: ... + def __le__(self, x: str) -> bool: ... + def __len__(self) -> int: ... + def __lt__(self, x: str) -> bool: ... + def __mod__(self, x: Any) -> str: ... + def __mul__(self, n: SupportsIndex) -> str: ... + def __ne__(self, x: object) -> bool: ... + def __repr__(self) -> str: ... + def __rmul__(self, n: SupportsIndex) -> str: ... + def __str__(self) -> str: ... + def __getnewargs__(self) -> Tuple[str]: ... + +class bytes(ByteString): + @overload + def __new__(cls: Type[_T], ints: Iterable[SupportsIndex]) -> _T: ... + @overload + def __new__(cls: Type[_T], string: str, encoding: str, errors: str = ...) -> _T: ... + @overload + def __new__(cls: Type[_T], length: SupportsIndex) -> _T: ... + @overload + def __new__(cls: Type[_T]) -> _T: ... + @overload + def __new__(cls: Type[_T], o: SupportsBytes) -> _T: ... + def count( + self, + __sub: bytes | SupportsIndex, + __start: SupportsIndex | None = ..., + __end: SupportsIndex | None = ..., + ) -> int: ... + def decode(self, encoding: str = ..., errors: str = ...) -> str: ... + def endswith( + self, + __suffix: bytes | Tuple[bytes, ...], + __start: SupportsIndex | None = ..., + __end: SupportsIndex | None = ..., + ) -> bool: ... + def find( + self, + __sub: bytes | SupportsIndex, + __start: SupportsIndex | None = ..., + __end: SupportsIndex | None = ..., + ) -> int: ... + def index( + self, + __sub: bytes | SupportsIndex, + __start: SupportsIndex | None = ..., + __end: SupportsIndex | None = ..., + ) -> int: ... + def isalpha(self) -> bool: ... + def isdigit(self) -> bool: ... + def islower(self) -> bool: ... + def isspace(self) -> bool: ... + def isupper(self) -> bool: ... + def join(self, __iterable_of_bytes: Iterable[ByteString | memoryview]) -> bytes: ... + def lower(self) -> bytes: ... + def lstrip(self, __bytes: bytes | None = ...) -> bytes: ... + def replace( + self, __old: bytes, __new: bytes, __count: SupportsIndex = ... + ) -> bytes: ... + def rfind( + self, + __sub: bytes | SupportsIndex, + __start: SupportsIndex | None = ..., + __end: SupportsIndex | None = ..., + ) -> int: ... + def rindex( + self, + __sub: bytes | SupportsIndex, + __start: SupportsIndex | None = ..., + __end: SupportsIndex | None = ..., + ) -> int: ... + def rsplit( + self, sep: bytes | None = ..., maxsplit: SupportsIndex = ... + ) -> list[bytes]: ... + def rstrip(self, __bytes: bytes | None = ...) -> bytes: ... + def split( + self, sep: bytes | None = ..., maxsplit: SupportsIndex = ... + ) -> list[bytes]: ... + def startswith( + self, + __prefix: bytes | Tuple[bytes, ...], + __start: SupportsIndex | None = ..., + __end: SupportsIndex | None = ..., + ) -> bool: ... + def strip(self, __bytes: bytes | None = ...) -> bytes: ... + def upper(self) -> bytes: ... + def __len__(self) -> int: ... + def __iter__(self) -> Iterator[int]: ... + def __str__(self) -> str: ... + def __repr__(self) -> str: ... + def __hash__(self) -> int: ... + @overload + def __getitem__(self, i: SupportsIndex) -> int: ... + @overload + def __getitem__(self, s: slice) -> bytes: ... + def __add__(self, s: bytes) -> bytes: ... + def __mul__(self, n: SupportsIndex) -> bytes: ... + def __rmul__(self, n: SupportsIndex) -> bytes: ... + def __mod__(self, value: Any) -> bytes: ... + # Incompatible with Sequence.__contains__ + def __contains__(self, o: SupportsIndex | bytes) -> bool: ... # type: ignore + def __eq__(self, x: object) -> bool: ... + def __ne__(self, x: object) -> bool: ... + def __lt__(self, x: bytes) -> bool: ... + def __le__(self, x: bytes) -> bool: ... + def __gt__(self, x: bytes) -> bool: ... + def __ge__(self, x: bytes) -> bool: ... + def __getnewargs__(self) -> Tuple[bytes]: ... + +class bytearray: + @overload + def __init__(self) -> None: ... + @overload + def __init__(self, ints: Iterable[SupportsIndex]) -> None: ... + @overload + def __init__(self, string: str, encoding: str, errors: str = ...) -> None: ... + @overload + def __init__(self, length: SupportsIndex) -> None: ... + def append(self, __item: SupportsIndex) -> None: ... + def decode(self, encoding: str = ..., errors: str = ...) -> str: ... + def extend(self, __iterable_of_ints: Iterable[SupportsIndex]) -> None: ... + def __len__(self) -> int: ... + def __iter__(self) -> Iterator[int]: ... + def __str__(self) -> str: ... + def __repr__(self) -> str: ... + __hash__: None # type: ignore + @overload + def __getitem__(self, i: SupportsIndex) -> int: ... + @overload + def __getitem__(self, s: slice) -> bytearray: ... + @overload + def __setitem__(self, i: SupportsIndex, x: SupportsIndex) -> None: ... + @overload + def __setitem__(self, s: slice, x: Iterable[SupportsIndex] | bytes) -> None: ... + def __delitem__(self, i: SupportsIndex | slice) -> None: ... + def __add__(self, s: bytes) -> bytearray: ... + def __iadd__(self, s: Iterable[int]) -> bytearray: ... + def __mul__(self, n: SupportsIndex) -> bytearray: ... + def __rmul__(self, n: SupportsIndex) -> bytearray: ... + def __imul__(self, n: SupportsIndex) -> bytearray: ... + def __mod__(self, value: Any) -> bytes: ... + # Incompatible with Sequence.__contains__ + def __contains__(self, o: SupportsIndex | bytes) -> bool: ... # type: ignore + def __eq__(self, x: object) -> bool: ... + def __ne__(self, x: object) -> bool: ... + def __lt__(self, x: bytes) -> bool: ... + def __le__(self, x: bytes) -> bool: ... + def __gt__(self, x: bytes) -> bool: ... + def __ge__(self, x: bytes) -> bool: ... + +class memoryview(Sized, Sequence[int]): + def __init__(self, obj: ReadableBuffer) -> None: ... + @overload + def __getitem__(self, i: SupportsIndex) -> int: ... + @overload + def __getitem__(self, s: slice) -> memoryview: ... + def __contains__(self, x: object) -> bool: ... + def __iter__(self) -> Iterator[int]: ... + def __len__(self) -> int: ... + @overload + def __setitem__(self, s: slice, o: bytes) -> None: ... + @overload + def __setitem__(self, i: SupportsIndex, o: SupportsIndex) -> None: ... + +@final +class bool(int): + def __new__(cls: Type[_T], __o: object = ...) -> _T: ... + @overload + def __and__(self, x: bool) -> bool: ... + @overload + def __and__(self, x: int) -> int: ... + @overload + def __or__(self, x: bool) -> bool: ... + @overload + def __or__(self, x: int) -> int: ... + @overload + def __xor__(self, x: bool) -> bool: ... + @overload + def __xor__(self, x: int) -> int: ... + @overload + def __rand__(self, x: bool) -> bool: ... + @overload + def __rand__(self, x: int) -> int: ... + @overload + def __ror__(self, x: bool) -> bool: ... + @overload + def __ror__(self, x: int) -> int: ... + @overload + def __rxor__(self, x: bool) -> bool: ... + @overload + def __rxor__(self, x: int) -> int: ... + def __getnewargs__(self) -> Tuple[int]: ... + +class slice(object): + start: Any + step: Any + stop: Any + __hash__: None # type: ignore + def indices(self, len: SupportsIndex) -> Tuple[int, int, int]: ... + +class tuple(Sequence[_T_co], Generic[_T_co]): + def __new__(cls: Type[_T], iterable: Iterable[_T_co] = ...) -> _T: ... + def __len__(self) -> int: ... + def __contains__(self, x: object) -> bool: ... + @overload + def __getitem__(self, x: int) -> _T_co: ... + @overload + def __getitem__(self, x: slice) -> Tuple[_T_co, ...]: ... + def __iter__(self) -> Iterator[_T_co]: ... + def __lt__(self, x: Tuple[_T_co, ...]) -> bool: ... + def __le__(self, x: Tuple[_T_co, ...]) -> bool: ... + def __gt__(self, x: Tuple[_T_co, ...]) -> bool: ... + def __ge__(self, x: Tuple[_T_co, ...]) -> bool: ... + @overload + def __add__(self, x: Tuple[_T_co, ...]) -> Tuple[_T_co, ...]: ... + @overload + def __add__(self, x: Tuple[_T, ...]) -> Tuple[_T_co | _T, ...]: ... + def __mul__(self, n: SupportsIndex) -> Tuple[_T_co, ...]: ... + def __rmul__(self, n: SupportsIndex) -> Tuple[_T_co, ...]: ... + def count(self, __value: Any) -> int: ... + def index( + self, __value: Any, __start: SupportsIndex = ..., __stop: SupportsIndex = ... + ) -> int: ... + +# Can we remove this? +class function: + # TODO not defined in builtins! + __name__: str + __module__: str + __code__: CodeType + __qualname__: str + __annotations__: dict[str, Any] + +class frozenset(AbstractSet[_T_co], Generic[_T_co]): + @overload + def __new__(cls: type[Self]) -> Self: ... + @overload + def __new__(cls: type[Self], __iterable: Iterable[_T_co]) -> Self: ... + def copy(self) -> FrozenSet[_T_co]: ... + def difference(self, *s: Iterable[object]) -> FrozenSet[_T_co]: ... + def intersection(self, *s: Iterable[object]) -> FrozenSet[_T_co]: ... + def isdisjoint(self, s: Iterable[_T_co]) -> bool: ... + def issubset(self, s: Iterable[object]) -> bool: ... + def issuperset(self, s: Iterable[object]) -> bool: ... + def symmetric_difference(self, s: Iterable[_T_co]) -> FrozenSet[_T_co]: ... + def union(self, *s: Iterable[_T_co]) -> FrozenSet[_T_co]: ... + def __len__(self) -> int: ... + def __contains__(self, o: object) -> bool: ... + def __iter__(self) -> Iterator[_T_co]: ... + def __str__(self) -> str: ... + def __and__(self, s: AbstractSet[_T_co]) -> FrozenSet[_T_co]: ... + def __or__(self, s: AbstractSet[_S]) -> FrozenSet[_T_co | _S]: ... + def __sub__(self, s: AbstractSet[_T_co]) -> FrozenSet[_T_co]: ... + def __xor__(self, s: AbstractSet[_S]) -> FrozenSet[_T_co | _S]: ... + def __le__(self, s: AbstractSet[object]) -> bool: ... + def __lt__(self, s: AbstractSet[object]) -> bool: ... + def __ge__(self, s: AbstractSet[object]) -> bool: ... + def __gt__(self, s: AbstractSet[object]) -> bool: ... + if sys.version_info >= (3, 9): + def __class_getitem__(cls, item: Any) -> GenericAlias: ... + +class list(MutableSequence[_T], Generic[_T]): + @overload + def __init__(self) -> None: ... + @overload + def __init__(self, iterable: Iterable[_T]) -> None: ... + def clear(self) -> None: ... + def copy(self) -> list[_T]: ... + def append(self, __object: _T) -> None: ... + def extend(self, __iterable: Iterable[_T]) -> None: ... + def pop(self, __index: SupportsIndex = ...) -> _T: ... + def index( + self, __value: _T, __start: SupportsIndex = ..., __stop: SupportsIndex = ... + ) -> int: ... + def count(self, __value: _T) -> int: ... + def insert(self, __index: SupportsIndex, __object: _T) -> None: ... + def remove(self, __value: _T) -> None: ... + def reverse(self) -> None: ... + @overload + def sort( + self: list[SupportsLessThanT], *, key: None = ..., reverse: bool = ... + ) -> None: ... + @overload + def sort( + self, *, key: Callable[[_T], SupportsLessThan], reverse: bool = ... + ) -> None: ... + def __len__(self) -> int: ... + def __iter__(self) -> Iterator[_T]: ... + def __str__(self) -> str: ... + __hash__: None # type: ignore + @overload + def __getitem__(self, i: SupportsIndex) -> _T: ... + @overload + def __getitem__(self, s: slice) -> list[_T]: ... + @overload + def __setitem__(self, i: SupportsIndex, o: _T) -> None: ... + @overload + def __setitem__(self, s: slice, o: Iterable[_T]) -> None: ... + def __delitem__(self, i: SupportsIndex | slice) -> None: ... + def __add__(self, x: list[_T]) -> list[_T]: ... + def __iadd__(self: _S, x: Iterable[_T]) -> _S: ... + def __mul__(self, n: SupportsIndex) -> list[_T]: ... + def __rmul__(self, n: SupportsIndex) -> list[_T]: ... + def __imul__(self: _S, n: SupportsIndex) -> _S: ... + def __contains__(self, o: object) -> bool: ... + def __reversed__(self) -> Iterator[_T]: ... + def __gt__(self, x: list[_T]) -> bool: ... + def __ge__(self, x: list[_T]) -> bool: ... + def __lt__(self, x: list[_T]) -> bool: ... + def __le__(self, x: list[_T]) -> bool: ... + if sys.version_info >= (3, 9): + def __class_getitem__(cls, item: Any) -> GenericAlias: ... + +class dict(MutableMapping[_KT, _VT], Generic[_KT, _VT]): + @overload + def __init__(self: dict[_KT, _VT]) -> None: ... + @overload + def __init__(self: dict[str, _VT], **kwargs: _VT) -> None: ... + @overload + def __init__( + self, map: SupportsKeysAndGetItem[_KT, _VT], **kwargs: _VT + ) -> None: ... + @overload + def __init__(self, iterable: Iterable[Tuple[_KT, _VT]], **kwargs: _VT) -> None: ... + def __new__(cls: Type[_T1], *args: Any, **kwargs: Any) -> _T1: ... + def clear(self) -> None: ... + def copy(self) -> dict[_KT, _VT]: ... + def popitem(self) -> Tuple[_KT, _VT]: ... + def setdefault(self, __key: _KT, __default: _VT = ...) -> _VT: ... + @overload + def update(self, __m: Mapping[_KT, _VT], **kwargs: _VT) -> None: ... + @overload + def update(self, __m: Iterable[Tuple[_KT, _VT]], **kwargs: _VT) -> None: ... + @overload + def update(self, **kwargs: _VT) -> None: ... + def keys(self) -> KeysView[_KT]: ... + def values(self) -> ValuesView[_VT]: ... + def items(self) -> ItemsView[_KT, _VT]: ... + @classmethod + @overload + def fromkeys( + cls, __iterable: Iterable[_T], __value: None = ... + ) -> dict[_T, Any | None]: ... + @classmethod + @overload + def fromkeys(cls, __iterable: Iterable[_T], __value: _S) -> dict[_T, _S]: ... + def __len__(self) -> int: ... + def __getitem__(self, k: _KT) -> _VT: ... + def __setitem__(self, k: _KT, v: _VT) -> None: ... + def __delitem__(self, v: _KT) -> None: ... + def __iter__(self) -> Iterator[_KT]: ... + if sys.version_info >= (3, 8): + def __reversed__(self) -> Iterator[_KT]: ... + def __str__(self) -> str: ... + __hash__: None # type: ignore + if sys.version_info >= (3, 9): + def __class_getitem__(cls, item: Any) -> GenericAlias: ... + def __or__(self, __value: Mapping[_T1, _T2]) -> dict[_KT | _T1, _VT | _T2]: ... + def __ror__(self, __value: Mapping[_T1, _T2]) -> dict[_KT | _T1, _VT | _T2]: ... + def __ior__(self, __value: Mapping[_KT, _VT]) -> dict[_KT, _VT]: ... # type: ignore + +class set(MutableSet[_T], Generic[_T]): + def __init__(self, iterable: Iterable[_T] = ...) -> None: ... + def add(self, element: _T) -> None: ... + def clear(self) -> None: ... + def copy(self) -> Set[_T]: ... + def difference(self, *s: Iterable[Any]) -> Set[_T]: ... + def difference_update(self, *s: Iterable[Any]) -> None: ... + def discard(self, element: _T) -> None: ... + def intersection(self, *s: Iterable[Any]) -> Set[_T]: ... + def intersection_update(self, *s: Iterable[Any]) -> None: ... + def isdisjoint(self, s: Iterable[Any]) -> bool: ... + def issubset(self, s: Iterable[Any]) -> bool: ... + def issuperset(self, s: Iterable[Any]) -> bool: ... + def pop(self) -> _T: ... + def remove(self, element: _T) -> None: ... + def symmetric_difference(self, s: Iterable[_T]) -> Set[_T]: ... + def symmetric_difference_update(self, s: Iterable[_T]) -> None: ... + def union(self, *s: Iterable[_T]) -> Set[_T]: ... + def update(self, *s: Iterable[_T]) -> None: ... + def __len__(self) -> int: ... + def __contains__(self, o: object) -> bool: ... + def __iter__(self) -> Iterator[_T]: ... + def __str__(self) -> str: ... + def __and__(self, s: AbstractSet[object]) -> Set[_T]: ... + def __iand__(self, s: AbstractSet[object]) -> Set[_T]: ... + def __or__(self, s: AbstractSet[_S]) -> Set[_T | _S]: ... + def __ior__(self, s: AbstractSet[_S]) -> Set[_T | _S]: ... + def __sub__(self, s: AbstractSet[_T | None]) -> Set[_T]: ... + def __isub__(self, s: AbstractSet[_T | None]) -> Set[_T]: ... + def __xor__(self, s: AbstractSet[_S]) -> Set[_T | _S]: ... + def __ixor__(self, s: AbstractSet[_S]) -> Set[_T | _S]: ... + def __le__(self, s: AbstractSet[object]) -> bool: ... + def __lt__(self, s: AbstractSet[object]) -> bool: ... + def __ge__(self, s: AbstractSet[object]) -> bool: ... + def __gt__(self, s: AbstractSet[object]) -> bool: ... + __hash__: None # type: ignore + if sys.version_info >= (3, 9): + def __class_getitem__(cls, item: Any) -> GenericAlias: ... + +class enumerate(Iterator[Tuple[int, _T]], Generic[_T]): + def __init__(self, iterable: Iterable[_T], start: int = ...) -> None: ... + def __iter__(self) -> Iterator[Tuple[int, _T]]: ... + def __next__(self) -> Tuple[int, _T]: ... + if sys.version_info >= (3, 9): + def __class_getitem__(cls, item: Any) -> GenericAlias: ... + +class range(Sequence[int]): + start: int + stop: int + step: int + @overload + def __init__(self, stop: SupportsIndex) -> None: ... + @overload + def __init__( + self, start: SupportsIndex, stop: SupportsIndex, step: SupportsIndex = ... + ) -> None: ... + def __len__(self) -> int: ... + def __contains__(self, o: object) -> bool: ... + def __iter__(self) -> Iterator[int]: ... + @overload + def __getitem__(self, i: SupportsIndex) -> int: ... + @overload + def __getitem__(self, s: slice) -> range: ... + def __repr__(self) -> str: ... + def __reversed__(self) -> Iterator[int]: ... + +class property(object): + fget: Callable[[Any], Any] | None + fset: Callable[[Any, Any], None] | None + fdel: Callable[[Any], None] | None + def __init__( + self, + fget: Callable[[Any], Any] | None = ..., + fset: Callable[[Any, Any], None] | None = ..., + fdel: Callable[[Any], None] | None = ..., + doc: str | None = ..., + ) -> None: ... + def getter(self, fget: Callable[[Any], Any]) -> property: ... + def setter(self, fset: Callable[[Any, Any], None]) -> property: ... + def deleter(self, fdel: Callable[[Any], None]) -> property: ... + def __get__(self, obj: Any, type: type | None = ...) -> Any: ... + def __set__(self, obj: Any, value: Any) -> None: ... + def __delete__(self, obj: Any) -> None: ... + +class _NotImplementedType(Any): # type: ignore + # A little weird, but typing the __call__ as NotImplemented makes the error message + # for NotImplemented() much better + __call__: NotImplemented # type: ignore + +NotImplemented: _NotImplementedType + +def abs(__x: SupportsAbs[_T]) -> _T: ... +def all(__iterable: Iterable[object]) -> bool: ... +def any(__iterable: Iterable[object]) -> bool: ... +def bin(__number: int | SupportsIndex) -> str: ... + +if sys.version_info >= (3, 7): + def breakpoint(*args: Any, **kws: Any) -> None: ... + +def callable(__obj: object) -> bool: ... +def chr(__i: int) -> str: ... + +# We define this here instead of using os.PathLike to avoid import cycle issues. +# See https://github.com/python/typeshed/pull/991#issuecomment-288160993 +_AnyStr_co = TypeVar("_AnyStr_co", str, bytes, covariant=True) + +class _PathLike(Protocol[_AnyStr_co]): + def __fspath__(self) -> _AnyStr_co: ... + +if sys.version_info >= (3, 10): + def aiter(__iterable: AsyncIterable[_T]) -> AsyncIterator[_T]: ... + @overload + async def anext(__i: AsyncIterator[_T]) -> _T: ... + @overload + async def anext(__i: AsyncIterator[_T], default: _VT) -> _T | _VT: ... + +def delattr(__obj: Any, __name: str) -> None: ... +def dir(__o: object = ...) -> list[str]: ... +@overload +def divmod(__x: SupportsDivMod[_T_contra, _T_co], __y: _T_contra) -> _T_co: ... +@overload +def divmod(__x: _T_contra, __y: SupportsRDivMod[_T_contra, _T_co]) -> _T_co: ... +def eval( + __source: str | bytes | CodeType, + __globals: dict[str, Any] | None = ..., + __locals: Mapping[str, Any] | None = ..., +) -> Any: ... +def exec( + __source: str | bytes | CodeType, + __globals: dict[str, Any] | None = ..., + __locals: Mapping[str, Any] | None = ..., +) -> Any: ... + +class filter(Iterator[_T], Generic[_T]): + @overload + def __init__(self, __function: None, __iterable: Iterable[_T | None]) -> None: ... + @overload + def __init__( + self, __function: Callable[[_T], Any], __iterable: Iterable[_T] + ) -> None: ... + def __iter__(self) -> Iterator[_T]: ... + def __next__(self) -> _T: ... + +@overload +def getattr(__o: object, name: str) -> Any: ... + +# While technically covered by the last overload, spelling out the types for None and bool +# help mypy out in some tricky situations involving type context (aka bidirectional inference) +@overload +def getattr(__o: object, name: str, __default: None) -> Any | None: ... +@overload +def getattr(__o: object, name: str, __default: bool) -> Any | bool: ... +@overload +def getattr(__o: object, name: str, __default: _T) -> Any | _T: ... +def globals() -> dict[str, Any]: ... +def hasattr(__obj: object, __name: str) -> bool: ... +def hash(__obj: object) -> int: ... +def help(*args: Any, **kwds: Any) -> None: ... +def hex(__number: int | SupportsIndex) -> str: ... +def id(__obj: object) -> int: ... +def input(__prompt: Any = ...) -> str: ... +@overload +def iter(__iterable: Iterable[_T]) -> Iterator[_T]: ... +@overload +def iter(__function: Callable[[], _T | None], __sentinel: None) -> Iterator[_T]: ... +@overload +def iter(__function: Callable[[], _T], __sentinel: Any) -> Iterator[_T]: ... + +if sys.version_info >= (3, 10): + def isinstance( + __obj: object, + __class_or_tuple: type + | types.UnionType + | Tuple[type | types.UnionType | Tuple[Any, ...], ...], + ) -> bool: ... + def issubclass( + __cls: type, + __class_or_tuple: type + | types.UnionType + | Tuple[type | types.UnionType | Tuple[Any, ...], ...], + ) -> bool: ... + +else: + def isinstance( + __obj: object, __class_or_tuple: type | Tuple[type | Tuple[Any, ...], ...] + ) -> bool: ... + def issubclass( + __cls: type, __class_or_tuple: type | Tuple[type | Tuple[Any, ...], ...] + ) -> bool: ... + +def len(__obj: Sized) -> int: ... +def locals() -> dict[str, Any]: ... + +class map(Iterator[_S], Generic[_S]): + @overload + def __init__(self, __func: Callable[[_T1], _S], __iter1: Iterable[_T1]) -> None: ... + @overload + def __init__( + self, + __func: Callable[[_T1, _T2], _S], + __iter1: Iterable[_T1], + __iter2: Iterable[_T2], + ) -> None: ... + @overload + def __init__( + self, + __func: Callable[[_T1, _T2, _T3], _S], + __iter1: Iterable[_T1], + __iter2: Iterable[_T2], + __iter3: Iterable[_T3], + ) -> None: ... + @overload + def __init__( + self, + __func: Callable[[_T1, _T2, _T3, _T4], _S], + __iter1: Iterable[_T1], + __iter2: Iterable[_T2], + __iter3: Iterable[_T3], + __iter4: Iterable[_T4], + ) -> None: ... + @overload + def __init__( + self, + __func: Callable[[_T1, _T2, _T3, _T4, _T5], _S], + __iter1: Iterable[_T1], + __iter2: Iterable[_T2], + __iter3: Iterable[_T3], + __iter4: Iterable[_T4], + __iter5: Iterable[_T5], + ) -> None: ... + @overload + def __init__( + self, + __func: Callable[..., _S], + __iter1: Iterable[Any], + __iter2: Iterable[Any], + __iter3: Iterable[Any], + __iter4: Iterable[Any], + __iter5: Iterable[Any], + __iter6: Iterable[Any], + *iterables: Iterable[Any], + ) -> None: ... + def __iter__(self) -> Iterator[_S]: ... + def __next__(self) -> _S: ... + +@overload +def max( + __arg1: SupportsLessThanT, + __arg2: SupportsLessThanT, + *_args: SupportsLessThanT, + key: None = ..., +) -> SupportsLessThanT: ... +@overload +def max( + __arg1: _T, __arg2: _T, *_args: _T, key: Callable[[_T], SupportsLessThan] +) -> _T: ... +@overload +def max( + __iterable: Iterable[SupportsLessThanT], *, key: None = ... +) -> SupportsLessThanT: ... +@overload +def max(__iterable: Iterable[_T], *, key: Callable[[_T], SupportsLessThan]) -> _T: ... +@overload +def max( + __iterable: Iterable[SupportsLessThanT], *, key: None = ..., default: _T +) -> SupportsLessThanT | _T: ... +@overload +def max( + __iterable: Iterable[_T1], *, key: Callable[[_T1], SupportsLessThan], default: _T2 +) -> _T1 | _T2: ... +@overload +def min( + __arg1: SupportsLessThanT, + __arg2: SupportsLessThanT, + *_args: SupportsLessThanT, + key: None = ..., +) -> SupportsLessThanT: ... +@overload +def min( + __arg1: _T, __arg2: _T, *_args: _T, key: Callable[[_T], SupportsLessThan] +) -> _T: ... +@overload +def min( + __iterable: Iterable[SupportsLessThanT], *, key: None = ... +) -> SupportsLessThanT: ... +@overload +def min(__iterable: Iterable[_T], *, key: Callable[[_T], SupportsLessThan]) -> _T: ... +@overload +def min( + __iterable: Iterable[SupportsLessThanT], *, key: None = ..., default: _T +) -> SupportsLessThanT | _T: ... +@overload +def min( + __iterable: Iterable[_T1], *, key: Callable[[_T1], SupportsLessThan], default: _T2 +) -> _T1 | _T2: ... +@overload +def next(__i: Iterator[_T]) -> _T: ... +@overload +def next(__i: Iterator[_T], default: _VT) -> _T | _VT: ... +def oct(__number: int | SupportsIndex) -> str: ... + +_OpenFile = Union[StrOrBytesPath, int] +_Opener = Callable[[str, int], int] + +# Text mode: always returns a TextIOWrapper +@overload +def open( + file: _OpenFile, + mode: OpenTextMode = ..., + buffering: int = ..., + encoding: str | None = ..., + errors: str | None = ..., + newline: str | None = ..., + closefd: bool = ..., + opener: _Opener | None = ..., +) -> TextIO: ... + +# Unbuffered binary mode: returns a FileIO +@overload +def open( + file: _OpenFile, + mode: OpenBinaryMode, + buffering: int = ..., + encoding: None = ..., + errors: None = ..., + newline: None = ..., + closefd: bool = ..., + opener: _Opener | None = ..., +) -> BinaryIO: ... + +# Fallback if mode is not specified +@overload +def open( + file: _OpenFile, + mode: str, + buffering: int = ..., + encoding: str | None = ..., + errors: str | None = ..., + newline: str | None = ..., + closefd: bool = ..., + opener: _Opener | None = ..., +) -> IO[Any]: ... +def ord(__c: str | bytes) -> int: ... +def print( + *values: object, + sep: str | None = ..., + end: str | None = ..., + file: SupportsWrite[str] | None = ..., + flush: bool = ..., +) -> None: ... + +_E = TypeVar("_E", contravariant=True) +_M = TypeVar("_M", contravariant=True) + +class _SupportsPow2(Protocol[_E, _T_co]): + def __pow__(self, __other: _E) -> _T_co: ... + +class _SupportsPow3(Protocol[_E, _M, _T_co]): + def __pow__(self, __other: _E, __modulo: _M) -> _T_co: ... + +if sys.version_info >= (3, 8): + @overload + def pow( + base: int, exp: int, mod: None = ... + ) -> Any: ... # returns int or float depending on whether exp is non-negative + @overload + def pow(base: int, exp: int, mod: int) -> int: ... + @overload + def pow(base: float, exp: float, mod: None = ...) -> float: ... + @overload + def pow(base: _SupportsPow2[_E, _T_co], exp: _E) -> _T_co: ... + @overload + def pow(base: _SupportsPow3[_E, _M, _T_co], exp: _E, mod: _M) -> _T_co: ... + +else: + @overload + def pow( + __base: int, __exp: int, __mod: None = ... + ) -> Any: ... # returns int or float depending on whether exp is non-negative + @overload + def pow(__base: int, __exp: int, __mod: int) -> int: ... + @overload + def pow(__base: float, __exp: float, __mod: None = ...) -> float: ... + @overload + def pow(__base: _SupportsPow2[_E, _T_co], __exp: _E) -> _T_co: ... + @overload + def pow(__base: _SupportsPow3[_E, _M, _T_co], __exp: _E, __mod: _M) -> _T_co: ... + +class reversed(Iterator[_T], Generic[_T]): + @overload + def __init__(self, __sequence: Reversible[_T]) -> None: ... + @overload + def __init__(self, __sequence: SupportsLenAndGetItem[_T]) -> None: ... + def __iter__(self) -> Iterator[_T]: ... + def __next__(self) -> _T: ... + +def repr(__obj: object) -> str: ... +@overload +def round(number: SupportsRound[Any]) -> int: ... +@overload +def round(number: SupportsRound[Any], ndigits: None) -> int: ... +@overload +def round(number: SupportsRound[_T], ndigits: SupportsIndex) -> _T: ... +def setattr(__obj: object, __name: str, __value: Any) -> None: ... +@overload +def sorted( + __iterable: Iterable[SupportsLessThanT], *, key: None = ..., reverse: bool = ... +) -> list[SupportsLessThanT]: ... +@overload +def sorted( + __iterable: Iterable[_T], + *, + key: Callable[[_T], SupportsLessThan], + reverse: bool = ..., +) -> list[_T]: ... + +if sys.version_info >= (3, 8): + @overload + def sum(__iterable: Iterable[_T]) -> _T | int: ... + @overload + def sum(__iterable: Iterable[_T], start: _S) -> _T | _S: ... + +else: + @overload + def sum(__iterable: Iterable[_T]) -> _T | int: ... + @overload + def sum(__iterable: Iterable[_T], __start: _S) -> _T | _S: ... + +class zip(Iterator[_T_co], Generic[_T_co]): + @overload + def __new__(cls, __iter1: Iterable[_T1]) -> zip[Tuple[_T1]]: ... + @overload + def __new__( + cls, __iter1: Iterable[_T1], __iter2: Iterable[_T2] + ) -> zip[Tuple[_T1, _T2]]: ... + @overload + def __new__( + cls, __iter1: Iterable[_T1], __iter2: Iterable[_T2], __iter3: Iterable[_T3] + ) -> zip[Tuple[_T1, _T2, _T3]]: ... + @overload + def __new__( + cls, + __iter1: Iterable[_T1], + __iter2: Iterable[_T2], + __iter3: Iterable[_T3], + __iter4: Iterable[_T4], + ) -> zip[Tuple[_T1, _T2, _T3, _T4]]: ... + @overload + def __new__( + cls, + __iter1: Iterable[_T1], + __iter2: Iterable[_T2], + __iter3: Iterable[_T3], + __iter4: Iterable[_T4], + __iter5: Iterable[_T5], + ) -> zip[Tuple[_T1, _T2, _T3, _T4, _T5]]: ... + @overload + def __new__( + cls, + __iter1: Iterable[Any], + __iter2: Iterable[Any], + __iter3: Iterable[Any], + __iter4: Iterable[Any], + __iter5: Iterable[Any], + __iter6: Iterable[Any], + *iterables: Iterable[Any], + ) -> zip[Tuple[Any, ...]]: ... + def __iter__(self) -> Iterator[_T_co]: ... + def __next__(self) -> _T_co: ... + +def __import__( + name: str, + globals: Mapping[str, Any] | None = ..., + locals: Mapping[str, Any] | None = ..., + fromlist: Sequence[str] = ..., + level: int = ..., +) -> Any: ... + +# Actually the type of Ellipsis is , but since it's +# not exposed anywhere under that name, we make it private here. +class ellipsis: ... + +Ellipsis: ellipsis + +class BaseException(object): + args: Tuple[Any, ...] + __cause__: BaseException | None + __context__: BaseException | None + __suppress_context__: bool + __traceback__: TracebackType | None + def __init__(self, *args: object) -> None: ... + def __str__(self) -> str: ... + def __repr__(self) -> str: ... + def with_traceback(self: _TBE, tb: TracebackType | None) -> _TBE: ... + +class GeneratorExit(BaseException): ... +class KeyboardInterrupt(BaseException): ... + +class SystemExit(BaseException): + code: int + +class Exception(BaseException): ... + +class StopIteration(Exception): + value: Any + +_StandardError = Exception + +class OSError(Exception): + errno: int + strerror: str + # filename, filename2 are actually str | bytes | None + filename: Any + filename2: Any + if sys.platform == "win32": + winerror: int + +if sys.platform == "win32": + WindowsError = OSError + +class ArithmeticError(_StandardError): ... +class AssertionError(_StandardError): ... + +class AttributeError(_StandardError): + if sys.version_info >= (3, 10): + name: str + obj: object + +class EOFError(_StandardError): ... + +class ImportError(_StandardError): + def __init__( + self, *args: object, name: str | None = ..., path: str | None = ... + ) -> None: ... + name: str | None + path: str | None + msg: str # undocumented + +class LookupError(_StandardError): ... +class MemoryError(_StandardError): ... + +class NameError(_StandardError): + if sys.version_info >= (3, 10): + name: str + +class RuntimeError(_StandardError): ... + +class StopAsyncIteration(Exception): + value: Any + +class SyntaxError(_StandardError): + msg: str + lineno: int | None + offset: int | None + text: str | None + filename: str | None + if sys.version_info >= (3, 10): + end_lineno: int | None + end_offset: int | None + +class TypeError(_StandardError): ... +class ValueError(_StandardError): ... +class FloatingPointError(ArithmeticError): ... +class OverflowError(ArithmeticError): ... +class ZeroDivisionError(ArithmeticError): ... +class IndexError(LookupError): ... +class KeyError(LookupError): ... +class NotImplementedError(RuntimeError): ... +class IndentationError(SyntaxError): ... +class TabError(IndentationError): ... diff --git a/lang/pl/typeshed/stdlib/collections/__init__.pyi b/lang/pl/typeshed/stdlib/collections/__init__.pyi new file mode 100644 index 0000000..8815a4b --- /dev/null +++ b/lang/pl/typeshed/stdlib/collections/__init__.pyi @@ -0,0 +1,60 @@ +import sys +from typing import ( + Any, + Dict, + Generic, + ItemsView, + Iterable, + Iterator, + KeysView, + Optional, + Reversible, + Tuple, + Type, + TypeVar, + Union, + ValuesView, +) + +_S = TypeVar("_S") +_T = TypeVar("_T") +_KT = TypeVar("_KT") +_VT = TypeVar("_VT") + +if sys.version_info >= (3, 7): + def namedtuple( + typename: str, + field_names: Union[str, Iterable[str]], + *, + rename: bool = ..., + module: Optional[str] = ..., + defaults: Optional[Iterable[Any]] = ..., + ) -> Type[Tuple[Any, ...]]: ... + +else: + def namedtuple( + typename: str, + field_names: Union[str, Iterable[str]], + *, + verbose: bool = ..., + rename: bool = ..., + module: Optional[str] = ..., + ) -> Type[Tuple[Any, ...]]: ... + +class _OrderedDictKeysView(KeysView[_KT], Reversible[_KT]): + def __reversed__(self) -> Iterator[_KT]: ... + +class _OrderedDictItemsView(ItemsView[_KT, _VT], Reversible[Tuple[_KT, _VT]]): + def __reversed__(self) -> Iterator[Tuple[_KT, _VT]]: ... + +class _OrderedDictValuesView(ValuesView[_VT], Reversible[_VT]): + def __reversed__(self) -> Iterator[_VT]: ... + +class OrderedDict(Dict[_KT, _VT], Reversible[_KT], Generic[_KT, _VT]): + def popitem(self, last: bool = ...) -> Tuple[_KT, _VT]: ... + def move_to_end(self, key: _KT, last: bool = ...) -> None: ... + def copy(self: _S) -> _S: ... + def __reversed__(self) -> Iterator[_KT]: ... + def keys(self) -> _OrderedDictKeysView[_KT]: ... + def items(self) -> _OrderedDictItemsView[_KT, _VT]: ... + def values(self) -> _OrderedDictValuesView[_VT]: ... diff --git a/lang/pl/typeshed/stdlib/errno.pyi b/lang/pl/typeshed/stdlib/errno.pyi new file mode 100644 index 0000000..6ff1c70 --- /dev/null +++ b/lang/pl/typeshed/stdlib/errno.pyi @@ -0,0 +1,26 @@ +from typing import Mapping + +errorcode: Mapping[int, str] + +EACCES: int +EADDRINUSE: int +EAGAIN: int +EALREADY: int +EBADF: int +ECONNABORTED: int +ECONNREFUSED: int +ECONNRESET: int +EEXIST: int +EHOSTUNREACH: int +EINPROGRESS: int +EINVAL: int +EIO: int +EISDIR: int +ENOBUFS: int +ENODEV: int +ENOENT: int +ENOMEM: int +ENOTCONN: int +EOPNOTSUPP: int +EPERM: int +ETIMEDOUT: int diff --git a/lang/pl/typeshed/stdlib/gc.pyi b/lang/pl/typeshed/stdlib/gc.pyi new file mode 100644 index 0000000..5e50259 --- /dev/null +++ b/lang/pl/typeshed/stdlib/gc.pyi @@ -0,0 +1,68 @@ +"""Steruj zbieraniem sieci""" +from typing import overload + +def enable() -> None: + """Włącz automatyczne zbieranie śmieci.""" + ... + +def disable() -> None: + """Wyłącz automatyczne zbieranie śmieci. + +Heap memory can still be allocated, +and garbage collection can still be initiated manually using ``gc.collect``.""" + +def collect() -> None: + """Uruchom zbieranie śmieci.""" + ... + +def mem_alloc() -> int: + """Znajdź liczbę przydzielonych bajtów sterty pamięci RAM. + +:return: The number of bytes allocated. + +This function is MicroPython extension.""" + ... + +def mem_free() -> int: + """Znajdź liczbę bajtów dostępnej sterty pamięci RAM lub -1, jeśli ta liczba nie jest znana. + +:return: The number of bytes free. + +This function is MicroPython extension.""" + ... + +@overload +def threshold() -> int: + """Zapytanie o dodatkowy próg przydziału GC. + +:return: The GC allocation threshold. + +This function is a MicroPython extension. CPython has a similar +function - ``set_threshold()``, but due to different GC +implementations, its signature and semantics are different.""" + ... + +@overload +def threshold(amount: int) -> None: + """Ustaw próg dodatkowego przydziału GC. + +Normally, a collection is triggered only when a new allocation +cannot be satisfied, i.e. on an out-of-memory (OOM) condition. +If this function is called, in addition to OOM, a collection +will be triggered each time after ``amount`` bytes have been +allocated (in total, since the previous time such an amount of bytes +have been allocated). ``amount`` is usually specified as less than the +full heap size, with the intention to trigger a collection earlier than when the +heap becomes exhausted, and in the hope that an early collection will prevent +excessive memory fragmentation. This is a heuristic measure, the effect +of which will vary from application to application, as well as +the optimal value of the ``amount`` parameter. + +A value of -1 means a disabled allocation threshold. + +This function is a MicroPython extension. CPython has a similar +function - ``set_threshold()``, but due to different GC +implementations, its signature and semantics are different. + +:param amount: Liczba bajtów, po których powinno zostać uruchomione zbieranie śmieci.""" + ... \ No newline at end of file diff --git a/lang/pl/typeshed/stdlib/log.pyi b/lang/pl/typeshed/stdlib/log.pyi new file mode 100644 index 0000000..4aa875f --- /dev/null +++ b/lang/pl/typeshed/stdlib/log.pyi @@ -0,0 +1,89 @@ +"""Zaloguj dane do swojego micro:bita V2.""" +from typing import Literal, Mapping, Optional, Union, overload +MILLISECONDS = 1 +"""Format znacznika czasu w milisekundach.""" +SECONDS = 10 +"""Format znacznika czasu w sekundach.""" +MINUTES = 600 +"""Format znacznika czasu w minutach.""" +HOURS = 36000 +"""Format znacznika czasu w godzinach.""" +DAYS = 864000 +"""Format znacznika czasu w dniach.""" + +def set_labels(*labels: str, timestamp: Optional[Literal[1, 10, 36000, 864000]]=SECONDS) -> None: + """Ustaw nagłówek pliku dziennika. + +Example: ``log.set_labels('X', 'Y', 'Z', timestamp=log.MINUTES)`` + +Ideally this function should be called a single time, before any data is +logged, to configure the data table header once. + +If a log file already exists when the program starts, or if this function +is called multiple times, it will check the labels already defined in the +log file. If this function call contains any new labels not already +present, it will generate a new header row with the additional columns. + +By default the first column contains a timestamp for each row. The time +unit can be selected via the timestamp argument. + +:param *labels: Dowolna liczba argumentów pozycyjnych, każdy odpowiadający wpisowi w nagłówku dziennika. +:param timestamp: Wybierz jednostkę znacznika czasu, która będzie automatycznie dodana jako pierwsza kolumna w każdym wierszu. Wartości znacznika czasu mogą być jedną z ``log.MILLISECONDS``, ``log.SECONDS``, ``log.MINUTES``, ``log.HOURS``, ``log.DAYS`` lub ``None``, aby wyłączyć znacznik czasu. Wartością domyślną jest ``log.SECONDS``.""" + ... + +@overload +def add(data_dictionary: Optional[Mapping[str, Union[str, int, float]]]) -> None: + """Dodaj wiersz danych do dziennika poprzez podanie słownika nagłówków i wartości. + +Example: ``log.add({ 'temp': temperature() })`` + +Each call to this function adds a row to the log. + +New labels not previously specified via the set_labels function, or by a +previous call to this function, will trigger a new header entry to be added +to the log with the extra labels. + +Labels previously specified and not present in a call to this function will +be skipped with an empty value in the log row. + +:param data_dictionary: Dane do logowania jako słownik z kluczem dla każdego nagłówka.""" + ... + +@overload +def add(**kwargs: Union[str, int, float]) -> None: + """Dodaj wiersz danych do dziennika używając argumentów słów kluczowych. (dodaj) + +Example: ``log.add(temp=temperature())`` + +Each call to this function adds a row to the log. + +New labels not previously specified via the set_labels function, or by a +previous call to this function, will trigger a new header entry to be added +to the log with the extra labels. + +Labels previously specified and not present in a call to this function will +be skipped with an empty value in the log row.""" + ... + +def delete(full=False): + """Usuwa zawartość wpisu, w tym nagłówki. + +Example: ``log.delete()`` + +To add the log headers again the ``set_labels`` function should to be called after this function. + +There are two erase modes; “full” completely removes the data from the physical storage, +and “fast” invalidates the data without removing it. + +:param full: ``True`` wybiera usunięcie "pełne" i ``False`` wybiera metodę "szybkiego" usunięcia.""" + ... + +def set_mirroring(serial: bool): + """Skonfiguruj lustrzane odbicie logowania danych do wyjścia szeregowego. + +Example: ``log.set_mirroring(True)`` + +Serial mirroring is disabled by default. When enabled, it will print to serial each row logged into the log file. + +:param serial: ``True`` umożliwia odbicie lustrzane danych na szeregowe wyjście.""" + ... \ No newline at end of file diff --git a/lang/pl/typeshed/stdlib/love.pyi b/lang/pl/typeshed/stdlib/love.pyi new file mode 100644 index 0000000..9018624 --- /dev/null +++ b/lang/pl/typeshed/stdlib/love.pyi @@ -0,0 +1 @@ +def badaboom() -> None: ... diff --git a/lang/pl/typeshed/stdlib/machine.pyi b/lang/pl/typeshed/stdlib/machine.pyi new file mode 100644 index 0000000..70046a9 --- /dev/null +++ b/lang/pl/typeshed/stdlib/machine.pyi @@ -0,0 +1,84 @@ +"""Narzędzia niskiego poziomu.""" +from typing import Any +from .microbit import MicroBitDigitalPin + +def unique_id() -> bytes: + """Pobierz ciąg bajtów z unikatowym identyfikatorem płytki. + +Example: ``machine.unique_id()`` + +:return: An identifier that varies from one board instance to another.""" + ... + +def reset() -> None: + """Zresetuj urządzenie w sposób podobny do naciśnięcia zewnętrznego przycisku RESET. + +Example: ``machine.reset()``""" + ... + +def freq() -> int: + """Uzyskaj częstotliwość procesora w hercach + +Example: ``machine.freq()`` + +:return: The CPU frequency.""" + ... + +def disable_irq() -> Any: + """Wyłącz żądania przerwań. + +Example: ``interrupt_state = machine.disable_irq()`` + +:return: the previous IRQ state which should be considered an opaque value + +The return value should be passed to the ``enable_irq`` function to restore +interrupts to their original state.""" + ... + +def enable_irq(state: Any) -> None: + """Ponownie włącz żądania przerwań. + +Example: ``machine.enable_irq(interrupt_state)`` + +:param state: Wartość, która została zwrócona z ostatniego wywołania funkcji ``disable_irq``.""" + ... + +def time_pulse_us(pin: MicroBitDigitalPin, pulse_level: int, timeout_us: int=1000000) -> int: + """Czas pulsowania na pinie. + +Example: ``time_pulse_us(pin0, 1)`` + +If the current input value of the pin is different to ``pulse_level``, the +function first waits until the pin input becomes equal to +``pulse_level``, then times the duration that the pin is equal to +``pulse_level``. If the pin is already equal to ``pulse_level`` then timing +starts straight away. + +:param pin: Pin do użycia +:param pulse_level: 0 do czasu niskiego pulsu lub 1 do czasu wysokiego pulsu +:param timeout_us: Mikrosekundowy limit czasu +: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""" + ... + +class mem: + """Klasa dla widoków pamięci ``mem8``, ``mem16`` i ``mem32``.""" + + def __getitem__(self, address: int) -> int: + """Uzyskaj dostęp do wartości z pamięci. + +:param address: Adres pamięci. +:return: The value at that address as an integer.""" + ... + + def __setitem__(self, address: int, value: int) -> None: + """Ustaw wartość dla podanego adresu. + +:param address: Adres pamięci. +:param value: Wartość całkowita do ustawiania.""" + ... +mem8: mem +"""8-bitowy widok pamięci.""" +mem16: mem +"""16-bitowy widok pamięci.""" +mem32: mem +"""32-bitowy widok pamięci.""" \ No newline at end of file diff --git a/lang/pl/typeshed/stdlib/math.pyi b/lang/pl/typeshed/stdlib/math.pyi new file mode 100644 index 0000000..e61fbe3 --- /dev/null +++ b/lang/pl/typeshed/stdlib/math.pyi @@ -0,0 +1,246 @@ +"""Funkcje matematyczne.""" +from typing import Tuple + +def acos(x: float) -> float: + """Obliczyć odwrotność cosinusa. + +Example: ``math.acos(1)`` + +:param x: Liczba +:return: The inverse cosine of ``x``""" + ... + +def asin(x: float) -> float: + """Obliczyć odwrotność sinusa. + +Example: ``math.asin(0)`` + +:param x: Liczba +:return: The inverse sine of ``x``""" + ... + +def atan(x: float) -> float: + """Oblicz odwrotność tangensa. + +Example: ``math.atan(0)`` + +:param x: Liczba +:return: The inverse tangent of ``x``""" + ... + +def atan2(y: float, x: float) -> float: + """Oblicz wartość główną odwrotności tangensa ``y/x``. + +Example: ``math.atan2(0, -1)`` + +:param y: Liczba +:param x: Liczba +:return: The principal value of the inverse tangent of ``y/x``""" + ... + +def ceil(x: float) -> float: + """Zaokrąglij liczbę w kierunku dodatniej nieskończoności. + +Example: ``math.ceil(0.1)`` + +:param x: Liczba +:return: ``x`` rounded towards positive infinity.""" + ... + +def copysign(x: float, y: float) -> float: + """Oblicz ``x`` ze znakiem ``y``. + +Example: ``math.copysign(1, -1)`` + +:param x: Liczba +:param y: Źródło znaku dla wartości zwracanej +:return: ``x`` with the sign of ``y``""" + ... + +def cos(x: float) -> float: + """Oblicz cosinus ``x``. + +Example: ``math.cos(0)`` + +:param x: Liczba +:return: The cosine of ``x``""" + ... + +def degrees(x: float) -> float: + """Konwertuj radiany na stopnie. + +Example: ``math.degrees(2 * math.pi)`` + +:param x: Wartość w radianach +:return: The value converted to degrees""" + ... + +def exp(x: float) -> float: + """Oblicz potęgę ``x``. + +Example: ``math.exp(1)`` + +:param x: Liczba +:return: The exponential of ``x``.""" + ... + +def fabs(x: float) -> float: + """Zwróć wartość bezwzględną ``x``. + +Example: ``math.fabs(-0.1)`` + +:param x: Liczba +:return: The absolute value of ``x``""" + ... + +def floor(x: float) -> int: + """Zaokrąglij liczbę w kierunku ujemnej nieskończoności. + +Example: ``math.floor(0.9)`` + +:param x: Liczba +:return: ``x`` rounded towards negative infinity.""" + ... + +def fmod(x: float, y: float) -> float: + """Oblicz resztę z ``x/y``. + +Example: ``math.fmod(10, 3)`` + +:param x: Licznik +:param y: Mianownik""" + ... + +def frexp(x: float) -> Tuple[float, int]: + """Rozkłada liczbę zmiennopozycyjną na mantysę i wykładnik. + +Example: ``mantissa, exponent = math.frexp(2)`` + +The returned value is the tuple ``(m, e)`` such that ``x == m * 2**e`` +exactly. If ``x == 0`` then the function returns ``(0.0, 0)``, otherwise +the relation ``0.5 <= abs(m) < 1`` holds. + +:param x: Liczba zmiennopozycyjna +:return: A tuple of length two containing its mantissa then exponent""" + ... + +def isfinite(x: float) -> bool: + """Sprawdź, czy wartość jest skończona. + +Example: ``math.isfinite(float('inf'))`` + +:param x: Liczba. +:return: ``True`` if ``x`` is finite, ``False`` otherwise.""" + ... + +def isinf(x: float) -> bool: + """Sprawdź, czy wartość jest nieskończona. + +Example: ``math.isinf(float('-inf'))`` + +:param x: Liczba. +:return: ``True`` if ``x`` is infinite, ``False`` otherwise.""" + ... + +def isnan(x: float) -> bool: + """Sprawdź, czy wartość nie jest liczbą (NaN). + +Example: ``math.isnan(float('nan'))`` + +:param x: Liczba +:return: ``True`` if ``x`` is not-a-number (NaN), ``False`` otherwise.""" + ... + +def ldexp(x: float, exp: int) -> float: + """Oblicz ``x * (2**exp)``. + +Example: ``math.ldexp(0.5, 2)`` + +:param x: Liczba +:param exp: Wykładnik całkowity +:return: ``x * (2**exp)``""" + ... + +def log(x: float, base: float=e) -> float: + """Oblicz logarytm z ``x`` przy podanej podstawie (domyślnie loggorytm naturalny). + +Example: ``math.log(math.e)`` + +With one argument, return the natural logarithm of x (to base e). + +With two arguments, return the logarithm of x to the given base, calculated as ``log(x)/log(base)``. + +:param x: Liczba +:param base: Podstawa do użycia +:return: The natural logarithm of ``x``""" + ... + +def modf(x: float) -> Tuple[float, float]: + """Oblicz część ułamkową i całkowitą z ``x``. + +Example: ``fractional, integral = math.modf(1.5)`` + +:param x: Liczba +:return: A tuple of two floats representing the fractional then integral parts of ``x``. + +Both the fractional and integral values have the same sign as ``x``.""" + ... + +def pow(x: float, y: float) -> float: + """Zwraca ``x`` do potęgi ``y``. + +Example: ``math.pow(4, 0.5)`` + +:param x: Liczba +:param y: Wykładnik +:return: ``x`` to the power of ``y``""" + ... + +def radians(x: float) -> float: + """Konwertuj stopnie na radiany. + +Example: ``math.radians(360)`` + +:param x: Wartość w stopniach +:return: The value converted to radians""" + ... + +def sin(x: float) -> float: + """Oblicz sinus ``x``. + +Example: ``math.sin(math.pi/2)`` + +:param x: Liczba +:return: The sine of ``x``""" + ... + +def sqrt(x: float) -> float: + """Oblicz pierwiastek kwadratowy z ``x``. + +Example: ``math.sqrt(4)`` + +:param x: Liczba +:return: The square root of ``x``""" + ... + +def tan(x: float) -> float: + """Oblicz tangens z ``x``. + +Example: ``math.tan(0)`` + +:param x: Liczba +:return: The tangent of ``x``.""" + ... + +def trunc(x: float) -> int: + """Zaokrąglij liczbę w kierunku 0. + +Example: ``math.trunc(-0.9)`` + +:param x: Liczba +:return: ``x`` rounded towards zero.""" + ... +e: float +"""Podstawa logarytmu naturalnego""" +pi: float +"""Stosunek obwodu okręgu do jego średnicy""" \ No newline at end of file diff --git a/lang/pl/typeshed/stdlib/microbit/__init__.pyi b/lang/pl/typeshed/stdlib/microbit/__init__.pyi new file mode 100644 index 0000000..a40d3d6 --- /dev/null +++ b/lang/pl/typeshed/stdlib/microbit/__init__.pyi @@ -0,0 +1,711 @@ +"""Piny, obrazy, dźwięki, temperatura i głośność.""" +from typing import Any, Callable, List, Optional, Tuple, Union, overload +from _typeshed import ReadableBuffer +from . import accelerometer as accelerometer +from . import audio as audio +from . import compass as compass +from . import display as display +from . import i2c as i2c +from . import microphone as microphone +from . import speaker as speaker +from . import spi as spi +from . import uart as uart + +def 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]]: + """Zaplanuj uruchomienie funkcji w przedziale określonym przez argumenty czasu **tylko V2**. + +Example: ``run_every(my_logging, min=5)`` + +``run_every`` can be used in two ways: + +As a Decorator - placed on top of the function to schedule. For example:: + + @run_every(h=1, min=20, s=30, ms=50) + def my_function(): + # Do something here + +As a Function - passing the callback as a positional argument. For example:: + + def my_function(): + # Do something here + run_every(my_function, s=30) + +Each argument corresponds to a different time unit and they are additive. +So ``run_every(min=1, s=30)`` schedules the callback every minute and a half. + +When an exception is thrown inside the callback function it deschedules the +function. To avoid this you can catch exceptions with ``try/except``. + +:param callback: Funkcja wywoływana w podanym przedziale. Pomiń, jeśli używasz jako dekorator. +:param days: Ustawia oznaczenie dnia dla harmonogramu. +:param h: Ustawia znak godziny dla harmonogramu. +:param min: Ustawia znak minuty dla harmonogramu. +:param s: Ustawia znak sekundy dla harmonogramu. +:param ms: Ustawia znak milisekundy dla harmonogramu.""" + +def panic(n: int) -> None: + """Wejdź w tryb paniki. + +Example: ``panic(127)`` + +:param n: Dowolna liczba całkowita <= 255 dla wskazania statusu. + +Requires restart.""" + +def reset() -> None: + """Uruchom ponownie płytkę.""" + +@overload +def scale(value: float, from_: Tuple[float, float], to: Tuple[int, int]) -> int: + """Konwertuje wartość z zakresu do zakresu liczb całkowitych. + +Example: ``volume = scale(accelerometer.get_x(), from_=(-2000, 2000), to=(0, 255))`` + +For example, to convert an accelerometer X value to a speaker volume. + +If one of the numbers in the ``to`` parameter is a floating point +(i.e a decimal number like ``10.0``), this function will return a +floating point number. + + temp_fahrenheit = scale(30, from_=(0.0, 100.0), to=(32.0, 212.0)) + +:param value: Liczba do konwersji. +:param from_: Krotka do zdefiniowania zakresu dla konwersji z. +:param to: Krotka do zdefiniowania zakresu dla konwersji do. +:return: The ``value`` converted to the ``to`` range.""" + +@overload +def scale(value: float, from_: Tuple[float, float], to: Tuple[float, float]) -> float: + """Konwertuje wartość z zakresu do zakresu o zmiennopozycyjnego. + +Example: ``temp_fahrenheit = scale(30, from_=(0.0, 100.0), to=(32.0, 212.0))`` + +For example, to convert temperature from a Celsius scale to Fahrenheit. + +If one of the numbers in the ``to`` parameter is a floating point +(i.e a decimal number like ``10.0``), this function will return a +floating point number. +If they are both integers (i.e ``10``), it will return an integer:: + + returns_int = scale(accelerometer.get_x(), from_=(-2000, 2000), to=(0, 255)) + +:param value: Liczba do konwersji. +:param from_: Krotka do zdefiniowania zakresu dla konwersji z. +:param to: Krotka do zdefiniowania zakresu, na jaki konwertować. +:return: The ``value`` converted to the ``to`` range.""" + +def sleep(n: float) -> None: + """Poczekaj ``n`` milisekund. + +Example: ``sleep(1000)`` + +:param n: Liczba milisekund oczekiwania + +One second is 1000 milliseconds, so:: + + microbit.sleep(1000) + +will pause the execution for one second.""" + +def running_time() -> int: + """Uzyskaj czas pracy płytki. + +:return: The number of milliseconds since the board was switched on or restarted.""" + +def temperature() -> int: + """Uzyskaj temperaturę micro:bita w stopniach Celsjusza.""" + +def set_volume(v: int) -> None: + """Ustawia głośność. + +Example: ``set_volume(127)`` + +:param v: wartość między 0 (niska) a 255 (wysoka). + +Out of range values will be clamped to 0 or 255. + +**V2** only.""" + ... + +class Button: + """Klasa dla przycisków ``button_a`` i ``button_b``.""" + + def is_pressed(self) -> bool: + """Sprawdź, czy przycisk jest naciśnięty. + +:return: ``True`` if the specified button ``button`` is pressed, and ``False`` otherwise.""" + ... + + def was_pressed(self) -> bool: + """Sprawdź, czy przycisk został naciśnięty od momentu uruchomienia urządzenia lub kiedy ta metoda została wywołana. + +Calling this method will clear the press state so +that the button must be pressed again before this method will return +``True`` again. + +:return: ``True`` if the specified button ``button`` was pressed, and ``False`` otherwise""" + ... + + def get_presses(self) -> int: + """Pobierz sumę naciśnięć przycisków i zresetuje tę sumę +do zera przed powrotem. + +:return: The number of presses since the device started or the last time this method was called""" + ... +button_a: Button +"""Lewy przycisk ``Button`` obiekt.""" +button_b: Button +"""Prawy przycisk ``Button`` obiekt.""" + +class MicroBitDigitalPin: + """Cyfrowy pin. + +Some pins support analog and touch features using the ``MicroBitAnalogDigitalPin`` and ``MicroBitTouchPin`` subclasses.""" + NO_PULL: int + PULL_UP: int + PULL_DOWN: int + + def read_digital(self) -> int: + """Uzyskaj cyfrową wartość pinu. + +Example: ``value = pin0.read_digital()`` + +:return: 1 if the pin is high, and 0 if it's low.""" + ... + + def write_digital(self, value: int) -> None: + """Ustaw cyfrową wartość pinu. + +Example: ``pin0.write_digital(1)`` + +:param value: 1, aby ustawić wysoką wartość pinu lub 0, aby ustawić niską wartość pinu""" + ... + + def set_pull(self, value: int) -> None: + """Ustaw stan ciągnięcia na jedną z trzech możliwych wartości: ``PULL_UP``, ``PULL_DOWN`` lub ``NO_PULL``. + +Example: ``pin0.set_pull(pin0.PULL_UP)`` + +:param value: Stan ciągnięcia z odpowiedniego pinu, np. ``pin0.PULL_UP``.""" + ... + + def get_pull(self) -> int: + """Uzyskaj stan cignięcia na pinie. + +Example: ``pin0.get_pull()`` + +:return: ``NO_PULL``, ``PULL_DOWN``, or ``PULL_UP`` + +These are set using the ``set_pull()`` method or automatically configured +when a pin mode requires it.""" + ... + + def get_mode(self) -> str: + """Zwraca tryb pinu. + +Example: ``pin0.get_mode()`` + +When a pin is used for a specific function, like +writing a digital value, or reading an analog value, the pin mode +changes. + +:return: ``"unused"``, ``"analog"``, ``"read_digital"``, ``"write_digital"``, ``"display"``, ``"button"``, ``"music"``, ``"audio"``, ``"touch"``, ``"i2c"``, or ``"spi"``""" + ... + + def write_analog(self, value: int) -> None: + """Wysyłaj sygnał PWM na pin, z cyklem pracy proporcjonalnym do ``value``. + +Example: ``pin0.write_analog(254)`` + +:param value: Liczba całkowita lub liczba zmiennopozycyjna między 0 (0% cyklu pracy) a 1023 (100% cyklu pracy).""" + + def set_analog_period(self, period: int) -> None: + """Ustaw okres wyjścia sygnału PWM na ``period`` w milisekundach. + +Example: ``pin0.set_analog_period(10)`` + +:param period: Okres w milisekundach z minimalną poprawną wartością 1 ms.""" + + def set_analog_period_microseconds(self, period: int) -> None: + """Ustaw okres wyjścia sygnału PWM na ``period`` w mikrosekundach. (ustaw mikrosekundy okresu analogowego) + +Example: ``pin0.set_analog_period_microseconds(512)`` + +:param period: Okres w mikrosekundach z minimalną poprawną wartością 256µs.""" + +class MicroBitAnalogDigitalPin(MicroBitDigitalPin): + """Pin z funkcjami analogowymi i cyfrowymi.""" + + def read_analog(self) -> int: + """Odczytaj napięcie przyłożone do pinu. + +Example: ``pin0.read_analog()`` + +:return: An integer between 0 (meaning 0V) and 1023 (meaning 3.3V).""" + +class MicroBitTouchPin(MicroBitAnalogDigitalPin): + """Pin z funkcjami analogowymi, cyfrowymi i dotykowymi.""" + CAPACITIVE: int + RESISTIVE: int + + def is_touched(self) -> bool: + """Sprawdź, czy pin został dotknięty. + +Example: ``pin0.is_touched()`` + +The default touch mode for the pins on the edge connector is ``resistive``. +The default for the logo pin **V2** is ``capacitive``. + +**Resistive touch** +This test is done by measuring how much resistance there is between the +pin and ground. A low resistance gives a reading of ``True``. To get +a reliable reading using a finger you may need to touch the ground pin +with another part of your body, for example your other hand. + +**Capacitive touch** +This test is done by interacting with the electric field of a capacitor +using a finger as a conductor. `Capacitive touch +`_ +does not require you to make a ground connection as part of a circuit. + +:return: ``True`` if the pin is being touched with a finger, otherwise return ``False``.""" + ... + + def set_touch_mode(self, value: int) -> None: + """Ustaw tryb dotykowy dla pinu. + +Example: ``pin0.set_touch_mode(pin0.CAPACITIVE)`` + +The default touch mode for the pins on the edge connector is +``resistive``. The default for the logo pin **V2** is ``capacitive``. + +:param value: ``CAPACITIVE`` lub ``RESISTIVE`` z odpowiedniego pinu.""" + ... +pin0: MicroBitTouchPin +"""Pin z funkcjami cyfrową, analogową i dotykową.""" +pin1: MicroBitTouchPin +"""Pin z funkcjami cyfrową, analogową i dotykową.""" +pin2: MicroBitTouchPin +"""Pin z funkcjami cyfrową, analogową i dotykową.""" +pin3: MicroBitAnalogDigitalPin +"""Pin z funkcjami cyfrowymi i analogowymi.""" +pin4: MicroBitAnalogDigitalPin +"""Pin z funkcjami cyfrowymi i analogowymi.""" +pin5: MicroBitDigitalPin +"""Pin z funkcjami cyfrowymi.""" +pin6: MicroBitDigitalPin +"""Pin z funkcjami cyfrowymi.""" +pin7: MicroBitDigitalPin +"""Pin z funkcjami cyfrowymi.""" +pin8: MicroBitDigitalPin +"""Pin z funkcjami cyfrowymi.""" +pin9: MicroBitDigitalPin +"""Pin z funkcjami cyfrowymi.""" +pin10: MicroBitAnalogDigitalPin +"""Pin z funkcjami cyfrowymi i analogowymi.""" +pin11: MicroBitDigitalPin +"""Pin z funkcjami cyfrowymi.""" +pin12: MicroBitDigitalPin +"""Pin z funkcjami cyfrowymi.""" +pin13: MicroBitDigitalPin +"""Pin z funkcjami cyfrowymi.""" +pin14: MicroBitDigitalPin +"""Pin z funkcjami cyfrowymi.""" +pin15: MicroBitDigitalPin +"""Pin z funkcjami cyfrowymi.""" +pin16: MicroBitDigitalPin +"""Pin z funkcjami cyfrowymi.""" +pin19: MicroBitDigitalPin +"""Pin z funkcjami cyfrowymi.""" +pin20: MicroBitDigitalPin +"""Pin z funkcjami cyfrowymi.""" +pin_logo: MicroBitTouchPin +"""Wrażliwy na dotyk pin z logo z przodu micro:bita, który domyślnie jest ustawiony na pojemnościowy tryb dotykowy.""" +pin_speaker: MicroBitAnalogDigitalPin +"""Pin adresujący głośnik micro:bita. + +This API is intended only for use in Pulse-Width Modulation pin operations e.g. pin_speaker.write_analog(128). +""" + +class Image: + """Obraz wyświetlany na wyświetlaczu LED micro:bita. + +Given an image object it's possible to display it via the ``display`` API:: + + display.show(Image.HAPPY)""" + HEART: Image + """Obraz serca.""" + HEART_SMALL: Image + """Obraz małego serca.""" + HAPPY: Image + """Obraz szczęśliwej twarzy.""" + SMILE: Image + """Obraz uśmiechniętej twarzy.""" + SAD: Image + """Obraz smutnej twarzy.""" + CONFUSED: Image + """Obraz zmieszanej twarzy.""" + ANGRY: Image + """Obraz złej twarzy.""" + ASLEEP: Image + """Obraz śpiącej twarzy.""" + SURPRISED: Image + """Obraz zaskoczonej twarzy.""" + SILLY: Image + """Obraz głupiej twarzy.""" + FABULOUS: Image + """Obraz twarzy w okularach przeciwsłonecznych.""" + MEH: Image + """Obraz niewzruszonej twarzy.""" + YES: Image + """Haczyk na TAK.""" + NO: Image + """Krzyżyk na NIE.""" + CLOCK12: Image + """Obraz z linią wskazującą na godzinę 12.""" + CLOCK11: Image + """Obraz z linią wskazującą na godzinę 11.""" + CLOCK10: Image + """Obraz z linią wskazującą na godzinę 10.""" + CLOCK9: Image + """Obraz z linią wskazującą na godzinę 9.""" + CLOCK8: Image + """Obraz z linią wskazującą na godzinę 8.""" + CLOCK7: Image + """Obraz z linią wskazującą na godzinę 7.""" + CLOCK6: Image + """Obraz z linią wskazującą na godzinę 6.""" + CLOCK5: Image + """Obraz z linią wskazującą na godzinę 5.""" + CLOCK4: Image + """Obraz z linią wskazującą na godzinę 4.""" + CLOCK3: Image + """Obraz z linią wskazującą na godzinę 3.""" + CLOCK2: Image + """Obraz z linią wskazującą na godzinę 2.""" + CLOCK1: Image + """Obraz z linią wskazującą na godzinę 1.""" + ARROW_N: Image + """Obraz strzałki wskazującej północ.""" + ARROW_NE: Image + """Obraz strzałki wskazującej północny wschód.""" + ARROW_E: Image + """Obraz strzałki wskazującej wschód.""" + ARROW_SE: Image + """Obraz strzałki wskazującej południowy wschód.""" + ARROW_S: Image + """Obraz strzałki wskazującej południe.""" + ARROW_SW: Image + """Obraz strzałki wskazującej południowy zachód.""" + ARROW_W: Image + """Obraz strzałki wskazującej zachód.""" + ARROW_NW: Image + """Obraz strzałki wskazującej północny zachód.""" + TRIANGLE: Image + """Obraz trójkąta skierowanego do góry.""" + TRIANGLE_LEFT: Image + """Obraz trójkąta w lewym rogu.""" + CHESSBOARD: Image + """Diody LED świecą naprzemiennie w układzie szachownicy.""" + DIAMOND: Image + """Obraz diamentu.""" + DIAMOND_SMALL: Image + """Obraz małego diamentu.""" + SQUARE: Image + """Obraz kwadratu.""" + SQUARE_SMALL: Image + """Obraz małego kwadratu.""" + RABBIT: Image + """Obraz królika.""" + COW: Image + """Obraz krowy.""" + MUSIC_CROTCHET: Image + """Obraz ćwierćnuty.""" + MUSIC_QUAVER: Image + """Obraz nuty ósemki.""" + MUSIC_QUAVERS: Image + """Obraz pary nut ósemek.""" + PITCHFORK: Image + """Obraz kamertonu.""" + XMAS: Image + """Obraz choinki.""" + PACMAN: Image + """Obrazek postaci arcade Pac-Man""" + TARGET: Image + """Obraz celu.""" + TSHIRT: Image + """Obraz t-shirt.""" + ROLLERSKATE: Image + """Obraz Rollerskate.""" + DUCK: Image + """Obraz kaczki.""" + HOUSE: Image + """Obraz domu.""" + TORTOISE: Image + """Obraz żółwia.""" + BUTTERFLY: Image + """Obraz motyla.""" + STICKFIGURE: Image + """Obraz przyklejonej figury.""" + GHOST: Image + """Obraz ducha.""" + SWORD: Image + """Obraz miecza.""" + GIRAFFE: Image + """Obraz żyrafy.""" + SKULL: Image + """Obraz czaszki.""" + UMBRELLA: Image + """Obraz parasola.""" + SNAKE: Image + """Obraz węża.""" + SCISSORS: Image + """Obraz nożyczek.""" + ALL_CLOCKS: List[Image] + """Lista zawierająca wszystkie obrazy CLOCK_ po kolei.""" + ALL_ARROWS: List[Image] + """Lista zawierająca wszystkie obrazy ARROW_ po kolei.""" + + @overload + def __init__(self, string: str) -> None: + """Utwórz obraz z łańcucha opisującego, które diody LED są zapalone. + +``string`` has to consist of digits 0-9 arranged into lines, +describing the image, for example:: + + image = Image("90009:" + "09090:" + "00900:" + "09090:" + "90009") + +will create a 5×5 image of an X. The end of a line is indicated by a +colon. It's also possible to use newlines (\\n) insead of the colons. + +:param string: Łańcuch opisujący obraz.""" + ... + + @overload + def __init__(self, width: int=5, height: int=5, buffer: ReadableBuffer=None) -> None: + """Utwórz pusty obraz z ``width`` kolumnami i ``height`` wierszami. + +:param width: Opcjonalna szerokość obrazu +:param height: Opcjonalna wysokość obrazu +:param buffer: Opcjonalna tablica lub bajty ``width``×``height`` liczb całkowitych w zakresie 0-9 do zainicjowania obrazu + +Examples:: + + Image(2, 2, b'\x08\x08\x08\x08') + Image(2, 2, bytearray([9,9,9,9])) + +These create 2 x 2 pixel images at full brightness.""" + ... + + def width(self) -> int: + """Ustal liczbę kolumn + +:return: The number of columns in the image""" + ... + + def height(self) -> int: + """Uzyskaj liczbę wierszy + +:return: The number of rows in the image""" + ... + + def set_pixel(self, x: int, y: int, value: int) -> None: + """Ustaw jasność piksela. + +Example: ``my_image.set_pixel(0, 0, 9)`` + +:param x: Numer kolumny +:param y: Numer wiersza +:param value: Jasność jako liczba całkowita między 0 (ciemny) i 9 (jasna) + +This method will raise an exception when called on any of the built-in +read-only images, like ``Image.HEART``.""" + ... + + def get_pixel(self, x: int, y: int) -> int: + """uzyskaj jasność piksela. + +Example: ``my_image.get_pixel(0, 0)`` + +:param x: Numer kolumny +:param y: Numer wiersza +:return: The brightness as an integer between 0 and 9.""" + ... + + def shift_left(self, n: int) -> Image: + """Utwórz nowy obraz przesuwając ten obraz w lewo. + +Example: ``Image.HEART_SMALL.shift_left(1)`` + +:param n: Liczba kolumn do przesunięcia +:return: The shifted image""" + ... + + def shift_right(self, n: int) -> Image: + """Utwórz nowy obraz, przesuwając ten obraz w prawo. + +Example: ``Image.HEART_SMALL.shift_right(1)`` + +:param n: Liczba kolumn do przesunięcia +:return: The shifted image""" + ... + + def shift_up(self, n: int) -> Image: + """Utwórz nowy obraz, przesuwając obraz do góry. + +Example: ``Image.HEART_SMALL.shift_up(1)`` + +:param n: Liczba wierszy do przesunięcia o +:return: The shifted image""" + ... + + def shift_down(self, n: int) -> Image: + """Utwórz nowy obraz, przesuwając obraz do dołu. + +Example: ``Image.HEART_SMALL.shift_down(1)`` + +:param n: Liczba wierszy do przesunięcia o +:return: The shifted image""" + ... + + def crop(self, x: int, y: int, w: int, h: int) -> Image: + """Utwórz nowy obraz przez przycięcie zdjęcia. + +Example: ``Image.HEART.crop(1, 1, 3, 3)`` + +:param x: Kolumna przesunięcia przycięcia +:param y: Wiersz przesunięcia przycięcia +:param w: Szerokość przycięcia +:param h: Wysokość przycięcia +:return: The new image""" + ... + + def copy(self) -> Image: + """Utwórz dokładną kopię obrazu. + +Example: ``Image.HEART.copy()`` + +:return: The new image""" + ... + + def invert(self) -> Image: + """Utwórz nowy obraz przez odwrócenie jasności pikseli w obrazie źródłowym. + +Example: ``Image.SMALL_HEART.invert()`` + +:return: The new image.""" + ... + + def fill(self, value: int) -> None: + """Ustaw jasność wszystkich pikseli obrazka. + +Example: ``my_image.fill(5)`` + +:param value: Nowa jasność jako liczba między 0 (ciemny) a 9 (jasny). + +This method will raise an exception when called on any of the built-in +read-only images, like ``Image.HEART``.""" + ... + + def blit(self, src: Image, x: int, y: int, w: int, h: int, xdest: int=0, ydest: int=0) -> None: + """Skopiuj obszar z innego obrazu na ten obraz. + +Example: ``my_image.blit(Image.HEART, 1, 1, 3, 3, 1, 1)`` + +:param src: Zdjęcie źródłowe +:param x: Początkowe przesunięcie kolumny w obrazie źródłowym +:param y: Początkowe przesunięcie wiersza na obrazie źródłowym +:param w: Liczba kolumn do skopiowania +:param h: Liczba wierszy do skopiowania +:param xdest: Przesunięcie kolumny do modyfikacji na tym obrazie +:param ydest: Przesunięcie wiersza do modyfikacji na tym obrazie + +Pixels outside the source image are treated as having a brightness of 0. + +``shift_left()``, ``shift_right()``, ``shift_up()``, ``shift_down()`` +and ``crop()`` can are all implemented by using ``blit()``. + +For example, img.crop(x, y, w, h) can be implemented as:: + + def crop(self, x, y, w, h): + res = Image(w, h) + res.blit(self, x, y, w, h) + return res""" + ... + + def __repr__(self) -> str: + """Uzyskaj kompaktową reprezentację obrazu w postaci łańcucha.""" + ... + + def __str__(self) -> str: + """Uzyskaj czytelną reprezentację obrazu w postaci łańcucha.""" + ... + + def __add__(self, other: Image) -> Image: + """Utwórz nowy obraz, dodając wartości jasności z dwóch +obrazów dla każdego piksela. + +Example: ``Image.HEART + Image.HAPPY`` + +:param other: Obraz do dodania.""" + ... + + def __sub__(self, other: Image) -> Image: + """Utwórz nowy obraz, odejmując wartości jasności +innego obrazu od tego obrazu. + +Example: ``Image.HEART - Image.HEART_SMALL`` + +:param other: Obraz do odjęcia.""" + ... + + def __mul__(self, n: float) -> Image: + """Utwórz nowy obraz, mnożąc jasność każdego piksela przez +``n``. + +Example: ``Image.HEART * 0.5`` + +:param n: Wartość do mnożenia przez.""" + ... + + def __truediv__(self, n: float) -> Image: + """Utwórz nowy obraz, dzieląc jasność każdego piksela przez +``n``. + +Example: ``Image.HEART / 2`` + +:param n: Wartość do dzielenia przez.""" + ... + +class SoundEvent: + LOUD: SoundEvent + """Przedstawia przejście zdarzeń dźwiękowych z ``quiet`` do ``loud``, jak klaskanie lub krzyczenie.""" + QUIET: SoundEvent + """Przedstawia przejście zdarzeń dźwiękowych z ``loud`` do ``quiet``, jak mówienie lub muzyka w tle.""" + +class Sound: + """Wbudowane dźwięki można wywołać za pomocą ``audio.play(Sound.NAME)``.""" + GIGGLE: Sound + """Chichoczący dźwięk.""" + HAPPY: Sound + """Szczęśliwy dźwięk.""" + HELLO: Sound + """Dźwięk powitania.""" + MYSTERIOUS: Sound + """Tajemniczy dźwięk.""" + SAD: Sound + """Smutny dźwięk.""" + SLIDE: Sound + """Przesuwający się dźwięk.""" + SOARING: Sound + """Wznoszący się dźwięk.""" + SPRING: Sound + """Wiosny dźwięk.""" + TWINKLE: Sound + """Migoczący dźwięk.""" + YAWN: Sound + """Dźwięk ziewania.""" \ No newline at end of file diff --git a/lang/pl/typeshed/stdlib/microbit/accelerometer.pyi b/lang/pl/typeshed/stdlib/microbit/accelerometer.pyi new file mode 100644 index 0000000..e47dc08 --- /dev/null +++ b/lang/pl/typeshed/stdlib/microbit/accelerometer.pyi @@ -0,0 +1,103 @@ +"""Zmierz przyspieszenie micro:bita i rozpoznawaj gesty.""" +from typing import Tuple + +def get_x() -> int: + """Uzyskaj pomiar przyspieszenia na osi ``x`` w mili-g. + +Example: ``accelerometer.get_x()`` + +:return: A positive or negative integer depending on direction in the range +/- 2000mg.""" + ... + +def get_y() -> int: + """Uzyskaj pomiar przyspieszenia na osi ``y`` w mili-g. + +Example: ``accelerometer.get_y()`` + +:return: A positive or negative integer depending on direction in the range +/- 2000mg.""" + ... + +def get_z() -> int: + """Uzyskaj pomiar przyspieszenia na osi ``z`` w mili-g. + +Example: ``accelerometer.get_z()`` + +:return: A positive or negative integer depending on direction in the range +/- 2000mg.""" + ... + +def get_values() -> Tuple[int, int, int]: + """Uzyskaj pomiary przyspieszenia na wszystkich osiach jednocześnie, jako krotkę. + +Example: ``x, y, z = accelerometer.get_values()`` + +: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""" + ... + +def get_strength() -> int: + """Uzyskaj pomiar przyspieszenia wszystkich osi łącznie jako dodatnią liczbę całkowitą. Jest to suma pitagorejska osi X, Y i Z. + +Example: ``accelerometer.get_strength()`` + +:return: The combined acceleration strength of all the axes, in milli-g.""" + ... + +def current_gesture() -> str: + """Pobierz nazwę aktualnego gestu. + +Example: ``accelerometer.current_gesture()`` + +MicroPython understands the following gesture names: ``"up"``, ``"down"``, +``"left"``, ``"right"``, ``"face up"``, ``"face down"``, ``"freefall"``, +``"3g"``, ``"6g"``, ``"8g"``, ``"shake"``. Gestures are always +represented as strings. + +:return: The current gesture""" + ... + +def is_gesture(name: str) -> bool: + """Sprawdź, czy nazwany gest jest aktualnie aktywny. + +Example: ``accelerometer.is_gesture('shake')`` + +MicroPython understands the following gesture names: ``"up"``, ``"down"``, +``"left"``, ``"right"``, ``"face up"``, ``"face down"``, ``"freefall"``, +``"3g"``, ``"6g"``, ``"8g"``, ``"shake"``. Gestures are always +represented as strings. + +:param name: Nazwa gestu. +:return: ``True`` if the gesture is active, ``False`` otherwise.""" + ... + +def was_gesture(name: str) -> bool: + """Sprawdź, czy nazwany gest był aktywny od ostatniego połączenia. + +Example: ``accelerometer.was_gesture('shake')`` + +MicroPython understands the following gesture names: ``"up"``, ``"down"``, +``"left"``, ``"right"``, ``"face up"``, ``"face down"``, ``"freefall"``, +``"3g"``, ``"6g"``, ``"8g"``, ``"shake"``. Gestures are always +represented as strings. + +:param name: Nazwa gestu. +:return: ``True`` if the gesture was active since the last call, ``False`` otherwise.""" + +def get_gestures() -> Tuple[str, ...]: + """Zwróć krotkę historii gestów. + +Example: ``accelerometer.get_gestures()`` + +Clears the gesture history before returning. + +Gestures are not updated in the background so there needs to be constant +calls to some accelerometer method to do the gesture detection. Usually +gestures can be detected using a loop with a small :func:`microbit.sleep` delay. + +:return: The history as a tuple, most recent last.""" + ... + +def set_range(value: int) -> None: + """Ustaw zakres czułości akcelerometru w g (standardowa grawitacja) na najbliższe wartości obsługiwane przez sprzęt tak, aby zaokrąglał się do ``2``, ``4`` lub ``8`` g. + +Example: ``accelerometer.set_range(8)`` + +:param value: Nowy zakres dla akcelerometru, liczba całkowita w ``g``.""" \ No newline at end of file diff --git a/lang/pl/typeshed/stdlib/microbit/audio.pyi b/lang/pl/typeshed/stdlib/microbit/audio.pyi new file mode 100644 index 0000000..3a3fe4b --- /dev/null +++ b/lang/pl/typeshed/stdlib/microbit/audio.pyi @@ -0,0 +1,123 @@ +"""Odtwarzaj dźwięki za pomocą micro:bita (importuj ``audio`` dla kompatybilności V1).""" +from ..microbit import MicroBitDigitalPin, Sound, pin0 +from typing import ClassVar, Iterable, Union + +def play(source: Union[Iterable[AudioFrame], Sound, SoundEffect], wait: bool=True, pin: MicroBitDigitalPin=pin0, return_pin: Union[MicroBitDigitalPin, None]=None) -> None: + """Odtwórz wbudowany dźwięk, efekt dźwiękowy lub niestandardowe ramki audio. + +Example: ``audio.play(Sound.GIGGLE)`` + +:param source: Wbudowany ``Sound``, taki jak ``Sound.GIGGLE``, ``SoundEffect`` lub przykładowe dane jako iteracja obiektów ``AudioFrame``. +:param wait: Jeśli ``wait`` jest ``True``, ta funkcja będzie blokować, aż dźwięk zostanie zakończony. +:param pin: Opcjonalny argument do określenia pinu wyjściowego może być użyty do nadpisania domyślnej wartości ``pin0``. Jeśli nie chcemy, aby żaden dźwięk nie był odtwarzany, możemy użyć ``pin=None``. +:param return_pin: Określa pin łącznika różnicowego, aby podłączyć płytkę do zewnętrznego głośnika zamiast do ziemi. Jest to ignorowane dla **V2**.""" + +def is_playing() -> bool: + """Sprawdź, czy dźwięk jest odtwarzany. + +Example: ``audio.is_playing()`` + +:return: ``True`` if audio is playing, otherwise ``False``.""" + ... + +def stop() -> None: + """Zatrzymaj odtwarzania audio. + +Example: ``audio.stop()``""" + ... + +class SoundEffect: + """Efekt dźwiękowy, utworzony przez zestaw parametrów skonfigurowanych za pomocą konstruktora lub atrybutów.""" + WAVEFORM_SINE: ClassVar[int] + """Opcja sinusoidalnej fali używana dla parametru ``waveform``.""" + WAVEFORM_SAWTOOTH: ClassVar[int] + """Opcja fali piłokształtnej używana dla parametru ``waveform``.""" + WAVEFORM_TRIANGLE: ClassVar[int] + """Opcja fali trójkątnej używana dla parametru ``waveform``.""" + WAVEFORM_SQUARE: ClassVar[int] + """Opcja fali kwadratowj używana dla parametru ``waveform``.""" + WAVEFORM_NOISE: ClassVar[int] + """Opcja szumu używana dla parametru ``waveform``.""" + SHAPE_LINEAR: ClassVar[int] + """Opcja interpolacji liniowej używana dla parametru ``shape``.""" + SHAPE_CURVE: ClassVar[int] + """Opcja interpolacji krzywej używana dla parametru ``shape``.""" + SHAPE_LOG: ClassVar[int] + """Opcja interpolacji logarytmicznej używana dla parametru ``shape``.""" + FX_NONE: ClassVar[int] + """Opcja braku efektu użyta dla parametru ``fx``.""" + FX_TREMOLO: ClassVar[int] + """Opcja efektu Tremelo użyta dla parametru ``fx``.""" + FX_VIBRATO: ClassVar[int] + """Opcja efektu Vibrato użyta dla parametru ``fx``.""" + FX_WARBLE: ClassVar[int] + """Opcja efektu Warble użyta dla parametru ``fx``.""" + freq_start: int + """Częstotliwość początkowa w hercach (Hz), liczba między ``0`` i ``9999``""" + freq_end: int + """Częstotliwość końcowa w hercach (Hz), liczba między ``0`` i ``9999``""" + duration: int + """Czas trwania dźwięku w milisekundach, liczba pomiędzy ``0`` i ``9999``""" + vol_start: int + """Wartość głośności początkowej, liczba między ``0`` i ``255``""" + vol_end: int + """Wartość głośności końcowej, liczba między ``0`` i ``255``""" + waveform: int + """Rodzaj kształtu fali, jedna z tych wartości:``WAVEFORM_SINE``, ``WAVEFORM_SAWTOOTH``, ``WAVEFORM_TRIANGLE``, ``WAVEFORM_SQUARE``, ``WAVEFORM_NOISE`` (losowo generowany szum)""" + fx: int + """Efekt do dodania do dźwięku, jedna z następujących wartości: ``FX_TREMOLO``, ``FX_VIBRATO``, ``FX_WARBLE`` lub ``FX_NONE``""" + shape: int + """Rodzaj krzywej interpolacji między częstotliwością początkową i końcową, różne kształty fal mają różne szybkości zmian częstotliwości. Jedna z następujących wartości: ``SHAPE_LINEAR``, ``SHAPE_CURVE``, ``SHAPE_LOG``""" + + 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): + """Utwórz nowy efekt dźwiękowy. + +Example: ``my_effect = SoundEffect(duration=1000)`` + +All the parameters are optional, with default values as shown above, and +they can all be modified via attributes of the same name. For example, we +can first create an effect ``my_effect = SoundEffect(duration=1000)``, +and then change its attributes ``my_effect.duration = 500``. + +:param freq_start: Częstotliwość początkowa w hercach (Hz), liczba między ``0`` i ``9999``. +:param freq_end: Częstotliwość końcowa w hercach (Hz), liczba między ``0`` i ``9999``. +:param duration: Czas trwania dźwięku w milisekundach, liczba między ``0`` i ``9999``. +:param vol_start: Początkowa wartość głośności, liczba pomiędzy ``0`` i ``255``. +:param vol_end: Końcowa wartość głośności, liczba pomiędzy ``0`` i ``255``. +:param waveform: Rodzaj kształtu fali, jedna z tych wartości: ``WAVEFORM_SINE``, ``WAVEFORM_SAWTOOTH``, ``WAVEFORM_TRIANGLE``, ``WAVEFORM_SQUARE``, ``WAVEFORM_NOISE`` (losowo generowany szum). +:param fx: Efekt do dodania do dźwięku, jedna z następujących wartości: ``FX_TREMOLO``, ``FX_VIBRATO``, ``FX_WARBLE`` lub ``FX_NONE``. +:param shape: Rodzaj krzywej interpolacji między częstotliwością początkową i końcową, różne kształty fal mają różne szybkości zmian częstotliwości. Jedna z następujących wartości: ``SHAPE_LINEAR``, ``SHAPE_CURVE``, ``SHAPE_LOG``.""" + + def copy(self) -> SoundEffect: + """Utwórz kopię ``SoundEffect``. + +Example: ``sound_2 = sound_1.copy()`` + +:return: A copy of the SoundEffect.""" + +class AudioFrame: + """Obiekt ``AudioFrame`` jest listą 32 próbek, z których każda jest niepodpisanym bajtem (liczba całkowita między 0 a 255). + +It takes just over 4 ms to play a single frame. + +Example:: + + frame = AudioFrame() + for i in range(len(frame)): + frame[i] = 252 - i * 8""" + + def copyfrom(self, other: AudioFrame) -> None: + """Zastąp dane w tym ``AudioFrame`` danymi z innej instancji ``AudioFrame``. + +Example: ``my_frame.copyfrom(source_frame)`` + +:param other: Instancja ``AudioFrame``, z której skopiowane są dane.""" + + def __len__(self) -> int: + ... + + def __setitem__(self, key: int, value: int) -> None: + ... + + def __getitem__(self, key: int) -> int: + ... \ No newline at end of file diff --git a/lang/pl/typeshed/stdlib/microbit/compass.pyi b/lang/pl/typeshed/stdlib/microbit/compass.pyi new file mode 100644 index 0000000..cd6c9c7 --- /dev/null +++ b/lang/pl/typeshed/stdlib/microbit/compass.pyi @@ -0,0 +1,70 @@ +"""Użyj wbudowanego kompasu.""" + +def calibrate() -> None: + """Rozpoczyna proces kalibracji. + +Example: ``compass.calibrate()`` + +An instructive message will be scrolled to the user after which they will need +to rotate the device in order to draw a circle on the LED display.""" + ... + +def is_calibrated() -> bool: + """Sprawdź, czy kompas jest skalibrowany. + +Example: ``compass.is_calibrated()`` + +:return: ``True`` if the compass has been successfully calibrated, ``False`` otherwise.""" + ... + +def clear_calibration() -> None: + """Cofnij kalibrację, czyniąc kompas ponownie niekalibrowanym. + +Example: ``compass.clear_calibration()``""" + ... + +def get_x() -> int: + """Uzyskaj natężenie pola magnetycznego na osi ``x``. + +Example: ``compass.get_x()`` + +Call ``calibrate`` first or the results will be inaccurate. + +:return: A positive or negative integer in nano tesla representing the magnitude and direction of the field.""" + ... + +def get_y() -> int: + """Uzyskaj natężenie pola magnetycznego na osi ``y``. + +Example: ``compass.get_y()`` + +Call ``calibrate`` first or the results will be inaccurate. + +:return: A positive or negative integer in nano tesla representing the magnitude and direction of the field.""" + ... + +def get_z() -> int: + """Uzyskaj natężenie pola magnetycznego na osi ``z``. + +Example: ``compass.get_z()`` + +Call ``calibrate`` first or the results will be inaccurate. + +:return: A positive or negative integer in nano tesla representing the magnitude and direction of the field.""" + ... + +def heading() -> int: + """Pobierz kierunek kompasu. + +Example: ``compass.heading()`` + +:return: An integer in the range from 0 to 360, representing the angle in degrees, clockwise, with north as 0.""" + ... + +def get_field_strength() -> int: + """Uzyskaj wielkość pola magnetycznego wokół urządzenia. + +Example: ``compass.get_field_strength()`` + +:return: An integer indication of the magnitude of the magnetic field in nano tesla.""" + ... \ No newline at end of file diff --git a/lang/pl/typeshed/stdlib/microbit/display.pyi b/lang/pl/typeshed/stdlib/microbit/display.pyi new file mode 100644 index 0000000..25ee96c --- /dev/null +++ b/lang/pl/typeshed/stdlib/microbit/display.pyi @@ -0,0 +1,92 @@ +"""Pokaż tekst, obrazy i animacje na wyświetlaczu 5x5 LED.""" +from ..microbit import Image +from typing import Union, overload, Iterable + +def get_pixel(x: int, y: int) -> int: + """Uzyskaj jasność LED w kolumnie ``x`` i w wierszu ``y``. + +Example: ``display.get_pixel(0, 0)`` + +:param x: Wyświetlana kolumna (0..4) +:param y: Wyświetlany wiersz (0..4) +:return: A number between 0 (off) and 9 (bright)""" + ... + +def set_pixel(x: int, y: int, value: int) -> None: + """Ustaw jasność LED w kolumnie ``x`` i wierszu ``y``. + +Example: ``display.set_pixel(0, 0, 9)`` + +:param x: Wyświetlana kolumna (0..4) +:param y: Wyświetlany wiersz (0..4) +:param value: Jasność między 0 (wyłączona) i 9 (jasna)""" + ... + +def clear() -> None: + """Ustaw jasność wszystkich diod LED na 0 (wyłączone). + +Example: ``display.clear()``""" + ... + +def show(image: Union[str, float, int, Image, Iterable[Image]], delay: int=400, wait: bool=True, loop: bool=False, clear: bool=False) -> None: + """Pokazuje obrazy, litery lub cyfry na wyświetlaczu LED. + +Example: ``display.show(Image.HEART)`` + +When ``image`` is an image or a list of images then each image is displayed in turn. +If ``image`` is a string or number, each letter or digit is displayed in turn. + +:param image: Łańcuch, liczba, obraz lub lista obrazów do pokazania. +:param delay: Każda litera, cyfra lub obraz są wyświetlane z ``delay`` milisekundami między sobą. +:param wait: Jeśli ``wait`` jest ``True``, ta funkcja będzie blokować, aż zakończy się animacja, w przeciwnym razie animacja pojawi się w tle. +:param loop: Jeśli ``loop`` jest ``True``, animacja będzie powtarzana w nieskończoność. +:param clear: Jeśli ``clear`` jest ``True``, wyświetlacz zostanie wyczyszczony po zakończeniu sekwencji. + +The ``wait``, ``loop`` and ``clear`` arguments must be specified using their keyword.""" + ... + +def scroll(text: Union[str, float, int], delay: int=150, wait: bool=True, loop: bool=False, monospace: bool=False) -> None: + """Przewija liczbę lub tekst na wyświetlaczu LED. + +Example: ``display.scroll('micro:bit')`` + +:param text: Łańcuch do przewinięcia. Jeśli ``text`` jest liczbą całkowitą lub zmiennopozycyjną, najpierw zostanie przekonwertowany na łańcuch za pomocą ``str()``. +:param delay: Parametr ``delay`` kontroluje szybkość przewijania tekstu. +:param wait: Jeśli ``wait`` jest ``True``, ta funkcja będzie blokować, aż zakończy się animacja, w przeciwnym razie animacja pojawi się w tle. +:param loop: Jeśli ``loop`` jest ``True``, animacja będzie powtarzana w nieskończoność. +:param monospace: Jeśli ``monospace`` jest ``True``, wszystkie znaki zajmą co najwyżej 5 kolumn pikseli na szerokość, w przeciwnym razie będzie dokładnie 1 pusta kolumna pikseli pomiędzy każdym znakiem, gdy się przewijają. + +The ``wait``, ``loop`` and ``monospace`` arguments must be specified +using their keyword.""" + ... + +def on() -> None: + """Włącz wyświetlacz LED. + +Example: ``display.on()``""" + ... + +def off() -> None: + """Wyłącz wyświetlacz LED (wyłączenie wyświetlania pozwala na ponowne użycie pinów GPIO do innych celów). + +Example: ``display.off()``""" + ... + +def is_on() -> bool: + """Sprawdź, czy wyświetlacz LED jest włączony. + +Example: ``display.is_on()`` + +:return: ``True`` if the display is on, otherwise returns ``False``.""" + ... + +def read_light_level() -> int: + """Odczytuj poziom światła. + +Example: ``display.read_light_level()`` + +Uses the display's LEDs in reverse-bias mode to sense the amount of light +falling on the display. + +:return: An integer between 0 and 255 representing the light level, with larger meaning more light.""" + ... \ No newline at end of file diff --git a/lang/pl/typeshed/stdlib/microbit/i2c.pyi b/lang/pl/typeshed/stdlib/microbit/i2c.pyi new file mode 100644 index 0000000..0adc4a4 --- /dev/null +++ b/lang/pl/typeshed/stdlib/microbit/i2c.pyi @@ -0,0 +1,49 @@ +"""Komunikuj się z urządzeniami za pomocą protokołu magistrali I2C.""" +from _typeshed import ReadableBuffer +from ..microbit import MicroBitDigitalPin, pin19, pin20 +from typing import List + +def init(freq: int=100000, sda: MicroBitDigitalPin=pin20, scl: MicroBitDigitalPin=pin19) -> None: + """Ponownie zainicjuj peryferia. + +Example: ``i2c.init()`` + +:param freq: clock frequency +:param sda: ``sda`` pin (domyślnie 20) +:param scl: ``scl`` pin (domyślnie 19) + +On a micro:bit V1 board, changing the I²C pins from defaults will make +the accelerometer and compass stop working, as they are connected +internally to those pins. This warning does not apply to the **V2** +revision of the micro:bit as this has `separate I²C lines `_ +for the motion sensors and the edge connector.""" + ... + +def scan() -> List[int]: + """Przeskanuj magistralę w poszukiwaniu urządzeń. + +Example: ``i2c.scan()`` + +:return: A list of 7-bit addresses corresponding to those devices that responded to the scan.""" + ... + +def read(addr: int, n: int, repeat: bool=False) -> bytes: + """Odczytaj bajty z urządzenia.. + +Example: ``i2c.read(0x50, 64)`` + +:param addr: 7-bitowy adres urządzenia +:param n: Liczba bajtów do odczytu +:param repeat: Jeśli ``True``, nie zostaną wysłane żadne bity zatrzymania +:return: The bytes read""" + ... + +def write(addr: int, buf: ReadableBuffer, repeat: bool=False) -> None: + """Zapisz bajty na urządzenie. + +Example: ``i2c.write(0x50, bytes([1, 2, 3]))`` + +:param addr: 7-bitowy adres urządzenia +:param buf: Bufor zawierający bajty do zapisu +:param repeat: Jeśli ``True``, nie zostaną wysłane żadne bity zatrzymania""" + ... \ No newline at end of file diff --git a/lang/pl/typeshed/stdlib/microbit/microphone.pyi b/lang/pl/typeshed/stdlib/microbit/microphone.pyi new file mode 100644 index 0000000..368df6f --- /dev/null +++ b/lang/pl/typeshed/stdlib/microbit/microphone.pyi @@ -0,0 +1,62 @@ +"""Odpowiedz na dźwięk przy użyciu wbudowanego mikrofonu (tylko V2).""" +from typing import Optional, Tuple +from ..microbit import SoundEvent + +def current_event() -> Optional[SoundEvent]: + """Pobierz ostatnie nagrane zdarzenie dźwiękowe + +Example: ``microphone.current_event()`` + +:return: The event, ``SoundEvent('loud')`` or ``SoundEvent('quiet')``.""" + ... + +def was_event(event: SoundEvent) -> bool: + """Sprawdź, czy dźwięk był słyszany co najmniej raz od ostatniego połączenia. + +Example: ``microphone.was_event(SoundEvent.LOUD)`` + +This call clears the sound history before returning. + +:param event: Zdarzenie do sprawdzenia, takie jak ``SoundEvent.LOUD`` lub ``SoundEvent.QUIET`` +:return: ``True`` if sound was heard at least once since the last call, otherwise ``False``.""" + ... + +def is_event(event: SoundEvent) -> bool: + """Sprawdź najnowsze wykryte zdarzenie dźwiękowe. + +Example: ``microphone.is_event(SoundEvent.LOUD)`` + +This call does not clear the sound event history. + +:param event: Zdarzenie do sprawdzenia, takie jak ``SoundEvent.LOUD`` lub ``SoundEvent.QUIET`` +:return: ``True`` if sound was the most recent heard, ``False`` otherwise.""" + ... + +def get_events() -> Tuple[SoundEvent, ...]: + """Pobierz historię zdarzeń dźwiękowych jako krotkę. + +Example: ``microphone.get_events()`` + +This call clears the sound history before returning. + +:return: A tuple of the event history with the most recent event last.""" + ... + +def set_threshold(event: SoundEvent, value: int) -> None: + """Ustaw próg dla zdarzenia dźwiękowego. + +Example: ``microphone.set_threshold(SoundEvent.LOUD, 250)`` + +A high threshold means the event will only trigger if the sound is very loud (>= 250 in the example). + +:param event: Zdarzenie dźwiękowe, takie jak ``SoundEvent.LOUD`` lub ``SoundEvent.QUIET``. +:param value: Poziom progu w zakresie 0-255.""" + ... + +def sound_level() -> int: + """Uzyskaj poziom ciśnienia akustycznego. + +Example: ``microphone.sound_level()`` + +:return: A representation of the sound pressure level in the range 0 to 255.""" + ... \ No newline at end of file diff --git a/lang/pl/typeshed/stdlib/microbit/speaker.pyi b/lang/pl/typeshed/stdlib/microbit/speaker.pyi new file mode 100644 index 0000000..9cd1b88 --- /dev/null +++ b/lang/pl/typeshed/stdlib/microbit/speaker.pyi @@ -0,0 +1,15 @@ +"""Sprawdź wbudowany głośnik (tylko V2).""" + +def off() -> None: + """Wyłącz głośnik. + +Example: ``speaker.off()`` + +This does not disable sound output to an edge connector pin.""" + ... + +def on() -> None: + """Włącz głośnik. + +Example: ``speaker.on()``""" + ... \ No newline at end of file diff --git a/lang/pl/typeshed/stdlib/microbit/spi.pyi b/lang/pl/typeshed/stdlib/microbit/spi.pyi new file mode 100644 index 0000000..b6e67aa --- /dev/null +++ b/lang/pl/typeshed/stdlib/microbit/spi.pyi @@ -0,0 +1,47 @@ +"""Komunikuj się z urządzeniami za pomocą magistrali szeregowego interfejsu (SPI).""" +from _typeshed import ReadableBuffer, WriteableBuffer +from ..microbit import pin13, pin14, pin15, MicroBitDigitalPin + +def init(baudrate: int=1000000, bits: int=8, mode: int=0, sclk: MicroBitDigitalPin=pin13, mosi: MicroBitDigitalPin=pin15, miso: MicroBitDigitalPin=pin14) -> None: + """Zainicjuj komunikację SPI. + +Example: ``spi.init()`` + +For correct communication, the parameters have to be the same on both communicating devices. + +:param baudrate: Szybkość komunikacji. +:param bits: Szerokość w bitach każdego transferu. Obecnie obsługiwanych jest tylko ``bits=8``. Może to jednak ulec zmianie w przyszłości. +:param mode: Określa połączenie polarności zegara i fazy - `zobacz tabelę online `_. +:param sclk: pin sclk (domyślnie 13) +:param mosi: pin mosi (domyślnie 15) +:param miso: pin miso (domyślnie 14)""" + ... + +def read(nbytes: int, out: int=0) -> bytes: + """Czytaj bajty. + +Example: ``spi.read(64)`` + +:param nbytes: Maksymalna liczba bajtów do odczytu. +:param out: The byte value to write (default 0). +:return: The bytes read.""" + ... + +def write(buffer: ReadableBuffer) -> None: + """Zapisz bajty na magistrali. + +Example: ``spi.write(bytes([1, 2, 3]))`` + +:param buffer: Bufor do odczytu danych.""" + ... + +def write_readinto(out: WriteableBuffer, in_: ReadableBuffer) -> None: + """Zapisz bufor ``out`` do magistrali i wczytaj dowolną odpowiedź do bufora ``in_``. + +Example: ``spi.write_readinto(out_buffer, in_buffer)`` + +The length of the buffers should be the same. The buffers can be the same object. + +:param out: Bufor do zapisu dowolnej odpowiedzi. +:param in_: Bufor do odczytu danych.""" + ... \ No newline at end of file diff --git a/lang/pl/typeshed/stdlib/microbit/uart.pyi b/lang/pl/typeshed/stdlib/microbit/uart.pyi new file mode 100644 index 0000000..375b560 --- /dev/null +++ b/lang/pl/typeshed/stdlib/microbit/uart.pyi @@ -0,0 +1,79 @@ +"""Komunikuj się z urządzeniem za pomocą interfejsu szeregowego.""" +from _typeshed import WriteableBuffer +from ..microbit import MicroBitDigitalPin +from typing import Optional, Union +ODD: int +"""Nieparzysta parzystość""" +EVEN: int +"""Parzysta parzystość""" + +def init(baudrate: int=9600, bits: int=8, parity: Optional[int]=None, stop: int=1, tx: Optional[MicroBitDigitalPin]=None, rx: Optional[MicroBitDigitalPin]=None) -> None: + """Zainicjuj komunikację seryjną. + +Example: ``uart.init(115200, tx=pin0, rx=pin1)`` + +:param baudrate: Szybkość komunikacji. +:param bits: Rozmiar przesyłanych bajtów. micro:bit obsługuje tylko 8. +:param parity: Jak sprawdzana jest parzystość, ``None``, ``uart.ODD`` lub ``uart.EVEN``. +:param stop: Liczba bitów stopu musi wynosić 1 dla micro:bita. +:param tx: Transmitując pin. +:param rx: Odbieranie pinu. + +Initializing the UART on external pins will cause the Python console on +USB to become unaccessible, as it uses the same hardware. To bring the +console back you must reinitialize the UART without passing anything for +``tx`` or ``rx`` (or passing ``None`` to these arguments). This means +that calling ``uart.init(115200)`` is enough to restore the Python console. + +For more details see `the online documentation `_.""" + ... + +def any() -> bool: + """Sprawdź, czy czekają jakieś dane. + +Example: ``uart.any()`` + +:return: ``True`` if any data is waiting, else ``False``.""" + ... + +def read(nbytes: Optional[int]=None) -> Optional[bytes]: + """Czytaj bajty. + +Example: ``uart.read()`` + +:param nbytes: Jeśli ``nbytes`` jest określony, przeczytaj co najwyżej tę liczbę bajtów, w przeciwnym razie przeczytaj jak najwięcej bajtów +:return: A bytes object or ``None`` on timeout""" + ... + +def readinto(buf: WriteableBuffer, nbytes: Optional[int]=None) -> Optional[int]: + """Przeczytaj bajty do ``buf``. + +Example: ``uart.readinto(input_buffer)`` + +:param buf: Bufor do zapisu. +:param nbytes: Jeśli ``nbytes`` jest określony, przeczytaj co najwyżej tę liczbę bajtów, w przeciwnym razie przeczytaj ``len(buf)`` bajtów. +:return: number of bytes read and stored into ``buf`` or ``None`` on timeout.""" + ... + +def readline() -> Optional[bytes]: + """Przeczytaj wiersz kończący się znakiem nowej linii. + +Example: ``uart.readline()`` + +:return: The line read or ``None`` on timeout. The newline character is included in the returned bytes.""" + ... + +def write(buf: Union[bytes, str]) -> Optional[int]: + """Zapisz bufor na magistrali. + +Example: ``uart.write('hello world')`` + +:param buf: Obiekt bajtów lub łańcuch. +:return: The number of bytes written, or ``None`` on timeout. + +Examples:: + + uart.write('hello world') + uart.write(b'hello world') + uart.write(bytes([1, 2, 3]))""" + ... \ No newline at end of file diff --git a/lang/pl/typeshed/stdlib/micropython.pyi b/lang/pl/typeshed/stdlib/micropython.pyi new file mode 100644 index 0000000..7e87975 --- /dev/null +++ b/lang/pl/typeshed/stdlib/micropython.pyi @@ -0,0 +1,132 @@ +"""Wewnątrz MicroPythona. (microPython)""" +from typing import Any, TypeVar, overload +_T = TypeVar('_T') + +def const(expr: _T) -> _T: + """Służy do zadeklarowania, że wyrażenie jest stałą tak, że kompilator może +je zoptymalizować. + +The use of this function should be as follows:: + + from micropython import const + CONST_X = const(123) + CONST_Y = const(2 * CONST_X + 1) + +Constants declared this way are still accessible as global variables from +outside the module they are declared in. On the other hand, if a constant +begins with an underscore then it is hidden, it is not available as a +global variable, and does not take up any memory during execution. + +:param expr: Wyrażenie stałe.""" + ... + +@overload +def opt_level() -> int: + """Uzyskaj obecny poziom optymalizacji dla kompilacji skryptów. + +Example: ``micropython.opt_level()`` + +The optimisation level controls the following compilation features: + +- Assertions: at level 0 assertion statements are enabled and compiled + into the bytecode; at levels 1 and higher assertions are not compiled. + +- Built-in ``__debug__`` variable: at level 0 this variable expands to + True; at levels 1 and higher it expands to False. + +- Source-code line numbers: at levels 0, 1 and 2 source-code line number + are stored along with the bytecode so that exceptions can report the + line number they occurred at; at levels 3 and higher line numbers are + not stored. + +:return: An integer representing the current level.""" + ... + +@overload +def opt_level(level: int) -> None: + """Ustawia poziom optymalizacji dla późniejszej kompilacji skryptów. + +Example: ``micropython.opt_level(1)`` + +The optimisation level controls the following compilation features: + +- Assertions: at level 0 assertion statements are enabled and compiled + into the bytecode; at levels 1 and higher assertions are not compiled. + +- Built-in ``__debug__`` variable: at level 0 this variable expands to + True; at levels 1 and higher it expands to False. + +- Source-code line numbers: at levels 0, 1 and 2 source-code line number + are stored along with the bytecode so that exceptions can report the + line number they occurred at; at levels 3 and higher line numbers are + not stored. + +The default optimisation level is usually level 0. + +:param level: Poziom optymalizacji całkowity.""" + ... + +def mem_info(verbose: Any=None) -> None: + """Drukuj informacje o aktualnie używanej pamięci. + +Example: ``micropython.mem_info()`` + +:param verbose: Jeśli dany jest argument ``verbose``, drukowane są dodatkowe informacje.""" + ... + +def qstr_info(verbose: Any=None) -> None: + """Drukuj informacje o aktualnie internowanych łańcuchach. + +Example: ``micropython.qstr_info()`` + +:param verbose: Jeśli dany jest argument ``verbose``, drukowane są dodatkowe informacje. + +The information that is printed is implementation dependent, but currently +includes the number of interned strings and the amount of RAM they use. In +verbose mode it prints out the names of all RAM-interned strings.""" + ... + +def stack_use() -> int: + """Zwróć liczbę całkowitą reprezentującą aktualną wielkość używanego stosu + +Example: ``micropython.stack_use()`` + +The absolute value of this is not particularly useful, rather it +should be used to compute differences in stack usage at different points. + +:return: An integer representing current stack use.""" + ... + +def heap_lock() -> None: + """Zablokuj stos. + +Example: ``micropython.heap_lock()`` + +When locked no memory allocation can occur and a ``MemoryError`` will be +raised if any heap allocation is attempted.""" + ... + +def heap_unlock() -> None: + """Odblokuj stos. + +Example: ``micropython.heap_unlock()`` + +When locked no memory allocation can occur and a ``MemoryError`` will be +raised if any heap allocation is attempted.""" + ... + +def kbd_intr(chr: int) -> None: + """Ustaw znak, który zgłosi wyjątek ``KeyboardInterrupt``. + +Example: ``micropython.kbd_intr(-1)`` + +:param chr: Kod znaku, aby zwiększyć przerwę lub -1, aby wyłączyć przechwytywanie Ctrl-C. + +By default this is set to 3 during script execution, corresponding to Ctrl-C. +Passing -1 to this function will disable capture of Ctrl-C, and passing 3 +will restore it. + +This function can be used to prevent the capturing of Ctrl-C on the +incoming stream of characters that is usually used for the REPL, in case +that stream is used for other purposes.""" + ... \ No newline at end of file diff --git a/lang/pl/typeshed/stdlib/music.pyi b/lang/pl/typeshed/stdlib/music.pyi new file mode 100644 index 0000000..cee40a5 --- /dev/null +++ b/lang/pl/typeshed/stdlib/music.pyi @@ -0,0 +1,128 @@ +"""Twórz i graj w melodie.""" +from typing import Optional, Tuple, Union, List +from .microbit import MicroBitDigitalPin, pin0 +DADADADUM: Tuple[str, ...] +"""Melodia: otwarcie 5. symfonii Beethovena w C minor""" +ENTERTAINER: Tuple[str, ...] +"""Melodia: fragment otwierający klasyczny Scott Joplin Ragtime "The Entertainer".""" +PRELUDE: Tuple[str, ...] +"""Melodia: otwarcie pierwszego Preludium w C Major, 48 preludiów i Fug J.S.Bacha.""" +ODE: Tuple[str, ...] +"""Melodia: motyw Ody do radości z 9. Symfonii Beethovena w D minor.""" +NYAN: Tuple[str, ...] +"""Melodia: motyw Nyan Kot (http://www.nyan.cat/). + +The composer is unknown. This is fair use for educational porpoises (as they say in New York).""" +RINGTONE: Tuple[str, ...] +"""Melodia: coś, co brzmi jak dzwonek telefonu komórkowego. + +To be used to indicate an incoming message. +""" +FUNK: Tuple[str, ...] +"""Melody: funkowa linia basu dla tajnych agentów i geniuszy kryminalnych.""" +BLUES: Tuple[str, ...] +"""Melodia: 12-taktowy bluesowy chodzący bas w stylu boogie-woogie.""" +BIRTHDAY: Tuple[str, ...] +"""Melodia: "Wszystkiego najlepszego…" + +For copyright status see: http://www.bbc.co.uk/news/world-us-canada-34332853 +""" +WEDDING: Tuple[str, ...] +"""Melodia: chór panny młodej z opery Wagnera „Lohengrin”. (ślub)""" +FUNERAL: Tuple[str, ...] +"""Melodia: »Marsz pogrzebowy« znany jako Sonata Fortepianowa No. 2 w B♭ minor, Op. 35 Fryderyka Chopina. (pogrzeb)""" +PUNCHLINE: Tuple[str, ...] +"""Melodia: zabawny fragment oznaczający, że zażartowano.""" +PYTHON: Tuple[str, ...] +"""Melodia: Marsz John Philip Sousa „Liberty Bell” aka, motyw „Monty Python Flating Circus” (po którym nazwano język programowania Pythona).""" +BADDY: Tuple[str, ...] +"""Melodia: wejście złego człowieka do ery kina niemego.""" +CHASE: Tuple[str, ...] +"""Melodia: scena pościgu z epoki kina niemego.""" +BA_DING: Tuple[str, ...] +"""Melodia: krótki sygnał informujący, że coś się wydarzyło.""" +WAWAWAWAA: Tuple[str, ...] +"""Melodia: bardzo smutny puzon.""" +JUMP_UP: Tuple[str, ...] +"""Melodia: do użytku w grze, wskazujący ruch w górę.""" +JUMP_DOWN: Tuple[str, ...] +"""Melodia: do użytku w grze, wskazujący ruch w górę.""" +POWER_UP: Tuple[str, ...] +"""Melodia: fanfara oznaczająca odblokowanie osiągnięcia.""" +POWER_DOWN: Tuple[str, ...] +"""Melodia: smutna fanfara oznaczająca utracenie osiągnięcia.""" + +def set_tempo(ticks: int=4, bpm: int=120) -> None: + """Ustawia przybliżone tempo dla odtwarzania. + +Example: ``music.set_tempo(bpm=120)`` + +:param ticks: Liczba taktów składających się na uderzenie. +:param bpm: Liczba całkowita określająca liczbę uderzeń na minutę. + +Suggested default values allow the following useful behaviour: + +- music.set_tempo() – reset the tempo to default of ticks = 4, bpm = 120 +- music.set_tempo(ticks=8) – change the “definition” of a beat +- music.set_tempo(bpm=180) – just change the tempo + +To work out the length of a tick in milliseconds is very simple arithmetic: +60000/bpm/ticks_per_beat. For the default values that’s +60000/120/4 = 125 milliseconds or 1 beat = 500 milliseconds.""" + ... + +def get_tempo() -> Tuple[int, int]: + """Pobiera bieżące tempo jako parę liczb całkowitych: ``(ticks, bpm)``. + +Example: ``ticks, beats = music.get_tempo()`` + +:return: The temp as a tuple with two integer values, the ticks then the beats per minute.""" + ... + +def play(music: Union[str, List[str], Tuple[str, ...]], pin: Optional[MicroBitDigitalPin]=pin0, wait: bool=True, loop: bool=False) -> None: + """Odtwarzaj muzykę. + +Example: ``music.play(music.NYAN)`` + +:param music: muzyka określona w `specjalnej notacji `_ +:param pin: pin wyjściowy do użycia z zewnętrznym głośnikiem (domyślnie ``pin0``), ``None`` dla braku dźwięku. +:param wait: Jeśli ``wait`` jest ustawiony na ``True``, ta funkcja jest blokowana. +:param loop: Jeśli ``loop`` jest ustawiony na ``True``, melodia powtarza się, aż ``stop`` jest wywołana lub połączenie blokujące zostanie przerwane. + +Many built-in melodies are defined in this module.""" + ... + +def pitch(frequency: int, duration: int=-1, pin: Optional[MicroBitDigitalPin]=pin0, wait: bool=True) -> None: + """Zagraj nutę. + +Example: ``music.pitch(185, 1000)`` + +:param frequency: Częstotliwość całkowitoliczbowa +:param duration: Czas trwania w milisekundach. Jeśli ujemny, to dźwięk jest ciągły aż do następnego połączenia lub połączenia z ``stop``. +:param pin: Opcjonalny pin wyjściowy (domyślny ``pin0``). +:param wait: Jeśli ``wait`` jest ustawiony na ``True``, ta funkcja jest blokowana. + +For example, if the frequency is set to 440 and the length to +1000 then we hear a standard concert A for one second. + +You can only play one pitch on one pin at any one time.""" + ... + +def stop(pin: Optional[MicroBitDigitalPin]=pin0) -> None: + """Zatrzymuje odtwarzanie muzyki na wbudowanym głośniku i jakimkolwiek pinie wyjściowym dźwięku. + +Example: ``music.stop()`` + +:param pin: Opcjonalny argument może być podany do określenia pinu, np. ``music.stop(pin1)``.""" + +def reset() -> None: + """Resetuje takty, bpm, czas trwania i oktawę do ich wartości domyślnych. + +Example: ``music.reset()`` + +Values: +- ``ticks = 4`` +- ``bpm = 120`` +- ``duration = 4`` +- ``octave = 4``""" + ... \ No newline at end of file diff --git a/lang/pl/typeshed/stdlib/neopixel.pyi b/lang/pl/typeshed/stdlib/neopixel.pyi new file mode 100644 index 0000000..822e46b --- /dev/null +++ b/lang/pl/typeshed/stdlib/neopixel.pyi @@ -0,0 +1,81 @@ +"""Indywidualnie adresowalne paski LED RGB i RGBW.""" +from .microbit import MicroBitDigitalPin +from typing import Tuple + +class NeoPixel: + + def __init__(self, pin: MicroBitDigitalPin, n: int, bpp: int=3) -> None: + """Zainicjuj nowy pasek neopikselowych diod LED sterowanych za pomocą pinu. + +Example: ``np = neopixel.NeoPixel(pin0, 8)`` + +To support RGBW neopixels, a third argument can be passed to +``NeoPixel`` to indicate the number of bytes per pixel (``bpp``). +For RGBW, this is is 4 rather than the default of 3 for RGB and GRB. + +Each pixel is addressed by a position (starting from 0). Neopixels are +given RGB (red, green, blue) / RGBW (red, green, blue, white) values +between 0-255 as a tuple. For example, in RGB, ``(255,255,255)`` is +white. In RGBW, ``(255,255,255,0)`` or ``(0,0,0,255)`` is white. + +See `the online docs `_ for warnings and other advice. + +:param pin: Pin kontrolujący pasek neopikseli. +:param n: Liczba neopikseli w pasku. +:param bpp: Bajty na piksel. W przypadku obsługi neopikseli RGBW należy przekazać 4 zamiast domyślnych 3 dla RGB i GRB.""" + ... + + def clear(self) -> None: + """Wyczyść wszystkie piksele. + +Example: ``np.clear()``""" + ... + + def show(self) -> None: + """Pokaż piksele. + +Example: ``np.show()`` + +Must be called for any updates to become visible.""" + ... + + def write(self) -> None: + """Pokaż piksele (tylko micro:bit V2). + +Example: ``np.write()`` + +Must be called for any updates to become visible. + +Equivalent to ``show``.""" + ... + + def fill(self, colour: Tuple[int, ...]) -> None: + """Pokoloruj wszystkie piksele określoną wartością RGB/RGBW (tylko micro:bit V2). + +Example: ``np.fill((0, 0, 255))`` + +:param colour: Krotka o takiej samej długości jak liczba bajtów na piksel (bpp). + +Use in conjunction with ``show()`` to update the neopixels.""" + ... + + def __setitem__(self, key: int, value: Tuple[int, ...]) -> None: + """Ustaw kolor pikseli. + +Example: ``np[0] = (255, 0, 0)`` + +:param key: Liczba pikseli. +:param value: Kolor""" + + def __getitem__(self, key: int) -> Tuple[int, ...]: + """Uzyskaj kolor piksela. + +Example: ``r, g, b = np[0]`` + +:param key: Liczba pikseli. +:return: The colour tuple.""" + + def __len__(self) -> int: + """Uzyskaj długość tego paska pikseli. + +Example: ``len(np)``""" \ No newline at end of file diff --git a/lang/pl/typeshed/stdlib/os.pyi b/lang/pl/typeshed/stdlib/os.pyi new file mode 100644 index 0000000..dec924c --- /dev/null +++ b/lang/pl/typeshed/stdlib/os.pyi @@ -0,0 +1,63 @@ +"""Uzyskaj dostęp do systemu plików.""" +from typing import Tuple +from typing import List + +def listdir() -> List[str]: + """Lista plików. + +Example: ``os.listdir()`` + +:return: A list of the names of all the files contained within the local +persistent on-device file system.""" + ... + +def remove(filename: str) -> None: + """Usuń (usuń) plik. + +Example: ``os.remove('data.txt')`` + +:param filename: Plik do usunięcia. + +If the file does not exist an ``OSError`` exception will occur.""" + ... + +def size(filename: str) -> int: + """Zwraca rozmiar pliku. + +Example: ``os.size('data.txt')`` + +:param filename: Plik +:return: The size in bytes. + +If the file does not exist an ``OSError`` exception will occur.""" + +class uname_result(Tuple[str, str, str, str, str]): + """Wynik ``os.uname()``""" + sysname: str + """Nazwa systemu operacyjnego.""" + nodename: str + """Nazwa maszyny w sieci (zdefiniowana w implementacji).""" + release: str + """Wydanie systemu operacyjnego.""" + version: str + """Wersja systemu operacyjnego""" + machine: str + """Identyfikator sprzętu.""" + +def uname() -> uname_result: + """Zwraca informacje identyfikujące bieżący system operacyjny. + +Example: ``os.uname()`` + +The return value is an object with five attributes: + +- ``sysname`` - operating system name +- ``nodename`` - name of machine on network (implementation-defined) +- ``release`` - operating system release +- ``version`` - operating system version +- ``machine`` - hardware identifier + +There is no underlying operating system in MicroPython. As a result the +information returned by the ``uname`` function is mostly useful for +versioning details.""" + ... \ No newline at end of file diff --git a/lang/pl/typeshed/stdlib/power.pyi b/lang/pl/typeshed/stdlib/power.pyi new file mode 100644 index 0000000..2be8b27 --- /dev/null +++ b/lang/pl/typeshed/stdlib/power.pyi @@ -0,0 +1,53 @@ +"""Manage the power modes of the micro:bit (V2 only). +""" + +from microbit import MicroBitDigitalPin, Button +from typing import Optional, Tuple, Union + +def off() -> None: + """Power down the board to the lowest possible power mode. + + Example: ``power.off()`` + + This is the equivalent to pressing the reset button for a few seconds, + to set the board in "Off mode". + + The micro:bit will only wake up if the reset button is pressed or, + if on battery power, when a USB cable is connected. + + When the board wakes up it will start for a reset state, so your program + will start running from the beginning. + """ + ... + +def deep_sleep( + ms: Optional[int] = None, + wake_on: Optional[ + Union[MicroBitDigitalPin, Button] | Tuple[MicroBitDigitalPin | Button, ...] + ] = None, + run_every: bool = True, +) -> None: + """Set the micro:bit into a low power mode where it can wake up and continue operation. + + Example: ``power.deep_sleep(wake_on=(button_a, button_b))`` + + The program state is preserved and when it wakes up it will resume + operation where it left off. + + Deep Sleep mode will consume more battery power than Off mode. + + The wake up sources are configured via arguments. + + The board will always wake up when receiving UART data, when the reset + button is pressed (which resets the board) or, in battery power, + when the USB cable is inserted. + + When the ``run_every`` parameter is set to ``True`` (the default), any + function scheduled with ``run_every`` will momentarily wake up the board + to run and when it finishes it will go back to sleep. + + :param ms: A time in milliseconds to wait before it wakes up. + :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))``. + :param run_every: A boolean to configure if the functions scheduled with ``microbit.run_every`` will continue to run while it sleeps. + """ + ... diff --git a/lang/pl/typeshed/stdlib/radio.pyi b/lang/pl/typeshed/stdlib/radio.pyi new file mode 100644 index 0000000..bc27b9e --- /dev/null +++ b/lang/pl/typeshed/stdlib/radio.pyi @@ -0,0 +1,130 @@ +"""Komunikuj się pomiędzy micro:bitami za pomocą wbudowanego radia.""" +from _typeshed import WriteableBuffer +from typing import Optional, Tuple +RATE_1MBIT: int +"""Stała używana do wskazania przepustowości 1 MBit na sekundę.""" +RATE_2MBIT: int +"""Stała używana do wskazania przepustowości 2 MBit na sekundę.""" + +def on() -> None: + """Włącza radio + +Example: ``radio.on()`` + +This needs to be explicitly called since the radio draws power and takes +up memory that you may otherwise need.""" + ... + +def off() -> None: + """Wyłącza radio, oszczędzając energię i pamięć. + +Example: ``radio.off()``""" + ... + +def 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: + """Konfiguruje radio. + +Example: ``radio.config(group=42)`` + +The default configuration is suitable for most use. + +:param length: (default=32) definiuje maksymalną długość w bajtach wiadomości wysyłanej przez radio. +Może mieć długość do 251 bajtów (254 - 3 bajty dla S0, LENGTH i S1). +:param queue: (default=3) określa liczbę wiadomości, które mogą być przechowywane w kolejce przychodzących wiadomości. +Jeśli w kolejce na wiadomości przychodzące nie ma już wolnych miejsc, wiadomość przychodząca jest odrzucana. +:param channel: (default=7) wartość całkowita od 0 do 83 (włącznie), która definiuje dowolny „kanał”, do którego dostrojone jest radio. +Wiadomości będą wysyłane za pośrednictwem tego kanału i tylko wiadomości otrzymane za pośrednictwem tego kanału zostaną umieszczone w kolejce wiadomości przychodzących. Każdy stopień ma szerokość 1 MHz w oparciu o częstotliwość 2400 MHz. +:param power: (default=6) jest liczb całkowitą od 0 do 7 (włącznie) do oznaczenia siły sygnału używanego podczas nadawania wiadomości. +Im wyższa wartość, tym silniejszy jest sygnał, ale tym większa moc jest zużywana przez urządzenie. Numeracja przekłada się na pozycje w następującym wykazie wartości dBm (decybel miliwat): -30, -20, -16, -12, -8, -4, 0, 4. +:param address: (default=0x75626974) dowolna nazwa wyrażona jako 32-bitowy adres, używana do filtrowania przychodzących pakietów na poziomie sprzętowym, zatrzymując tylko te, które odpowiadają ustawionemu adresowi. +Domyślnym ustawieniem używanym przez inne platformy powiązane z micro:bitem jest ustawienie domyślne używane tutaj. +:param group: (default=0) 8-bitowa wartość (0-255) używana wraz z ``address`` podczas filtrowania wiadomości. +Koncepcyjnie, "adres" jest jak adres domu/biura, a "grupa" jest jak osoba pod tym adresem, na który chcesz wysłać swoją wiadomość. +:param data_rate: (default=``radio.RATE_1MBIT``) wskazuje prędkość, z jaką odbywa się przesyłanie danych. +Może być jedną z następujących stałych zdefiniowanych w module ``radio``:``RATE_250KBIT``, ``RATE_1MBIT`` lub ``RATE_2MBIT``. + +If ``config`` is not called then the defaults described above are assumed.""" + ... + +def reset() -> None: + """Resetuj ustawienia do ich wartości domyślnych. + +Example: ``radio.reset()`` + +The defaults as as per the ``config`` function above.""" + ... + +def send_bytes(message: bytes) -> None: + """Wysyła wiadomość zawierającą bajty. + +Example: ``radio.send_bytes(b'hello')`` + +:param message: Bajty do wysłania.""" + ... + +def receive_bytes() -> Optional[bytes]: + """Otrzymuj następną przychodzącą wiadomość w kolejce wiadomości. + +Example: ``radio.receive_bytes()`` + +:return: The message bytes if any, otherwise ``None``.""" + ... + +def receive_bytes_into(buffer: WriteableBuffer) -> Optional[int]: + """Skopiuj następną wiadomość przychodzącą do kolejki wiadomości w buforze. + +Example: ``radio.receive_bytes_info(buffer)`` + +:param buffer: Bufor docelowy. Wiadomość jest obcinana, jeśli jest większa niż bufor. +: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).""" + ... + +def send(message: str) -> None: + """Wysyła łańcuch wiadomości. + +Example: ``radio.send('hello')`` + +This is the equivalent of ``radio.send_bytes(bytes(message, 'utf8'))`` but with ``b'\x01\x00\x01'`` +prepended to the front (to make it compatible with other platforms that target the micro:bit). + +:param message: Łańcuch do wysłania.""" + ... + +def receive() -> Optional[str]: + """Działa dokładnie w taki sam sposób, jak ``receive_bytes``, ale zwraca cokolwiek zostało wysłane. (odbierz) + +Example: ``radio.receive()`` + +Equivalent to ``str(receive_bytes(), 'utf8')`` but with a check that the the first +three bytes are ``b'\x01\x00\x01'`` (to make it compatible with other platforms that +may target the micro:bit). + +:return: The message with the prepended bytes stripped and converted to a string. + +A ``ValueError`` exception is raised if conversion to string fails.""" + ... + +def receive_full() -> Optional[Tuple[bytes, int, int]]: + """Zwraca krotkę zawierającą trzy wartości reprezentujące następną wiadomość przychodzącą do kolejki wiadomości. + +Example: ``radio.receive_full()`` + +If there are no pending messages then ``None`` is returned. + +The three values in the tuple represent: + +- the next incoming message on the message queue as bytes. +- the RSSI (signal strength): a value between 0 (strongest) and -255 (weakest) as measured in dBm. +- a microsecond timestamp: the value returned by ``time.ticks_us()`` when the message was received. + +For example:: + + details = radio.receive_full() + if details: + msg, rssi, timestamp = details + +This function is useful for providing information needed for triangulation +and/or trilateration with other micro:bit devices. + +:return: ``None`` if there is no message, otherwise a tuple of length three with the bytes, strength and timestamp values.""" + ... \ No newline at end of file diff --git a/lang/pl/typeshed/stdlib/random.pyi b/lang/pl/typeshed/stdlib/random.pyi new file mode 100644 index 0000000..c6431c6 --- /dev/null +++ b/lang/pl/typeshed/stdlib/random.pyi @@ -0,0 +1,81 @@ +"""Generuj liczb losowe. (losowy)""" +from typing import TypeVar, Sequence, Union, overload + +def getrandbits(n: int) -> int: + """Wygeneruj liczbę całkowitą z ``n`` losowymi bitami. + +Example: ``random.getrandbits(1)`` + +:param n: Wartość między 1–30 (włącznie).""" + ... + +def seed(n: int) -> None: + """Zainicjuj generator liczb losowych. + +Example: ``random.seed(0)`` + +:param n: Całkowity zarodek + +This will give you reproducibly deterministic randomness from a given starting +state (``n``).""" + ... + +def randint(a: int, b: int) -> int: + """Wybierz losową liczbę całkowitą pomiędzy ``a`` i ``b`` włącznie. + +Example: ``random.randint(0, 9)`` + +:param a: Wartość początkowa dla zakresu (włącznie) +:param b: Wartość końcowa dla zakresu (wyłącznie) + +Alias for ``randrange(a, b + 1)``.""" + ... + +@overload +def randrange(stop: int) -> int: + """Wybierz losowo wybraną liczbę całkowitą między zero aż do (ale nie +włącznie) ``stop``. + +Example: ``random.randrange(10)`` + +:param stop: Wartość końcowa zakresu (wyłącznie)""" + ... + +@overload +def randrange(start: int, stop: int, step: int=1) -> int: + """Wybierz losowo wybrany element z ``range(start, stop, step)``. + +Example: ``random.randrange(0, 10)`` + +:param start: Początek zakresu (włącznie) +:param stop: Koniec zakresu (wyłącznie) +:param step: Krok""" + ... +_T = TypeVar('_T') + +def choice(seq: Sequence[_T]) -> _T: + """Wybierz losowy element z niepustego cigu ``seq``. + +Example: ``random.choice([Image.HAPPY, Image.SAD])`` + +:param seq: Cig. + +If ``seq`` is empty, raises ``IndexError``.""" + ... + +def random() -> float: + """Wygeneruj losową liczbę zmiennopozycyjną w zakresie [0.0, 1.0). + +Example: ``random.random()`` + +:return: The random floating point number""" + ... + +def uniform(a: float, b: float) -> float: + """Zwróć losową liczbę zmiennopozycyjnłą między ``a`` i ``b``. + +Example: ``random.uniform(0, 9)`` + +:param a: Wartość początkowa dla zakresu (włącznie) +:param b: Wartość końcowa dla zakresu (wyłącznie)""" + ... \ No newline at end of file diff --git a/lang/pl/typeshed/stdlib/speech.pyi b/lang/pl/typeshed/stdlib/speech.pyi new file mode 100644 index 0000000..cf7dced --- /dev/null +++ b/lang/pl/typeshed/stdlib/speech.pyi @@ -0,0 +1,79 @@ +"""Spraw, by micro:bit mówił, śpiewał i tworzył inne dźwięki podobne do mowy.""" +from typing import Optional +from .microbit import MicroBitDigitalPin, pin0 + +def translate(words: str) -> str: + """Tłumacz angielskie słowa na fonemy. + +Example: ``speech.translate('hello world')`` + +:param words: Łańcuch słów angielskich. +:return: A string containing a best guess at the appropriate phonemes to pronounce. +The output is generated from this `text to phoneme translation table `_. + +This function should be used to generate a first approximation of phonemes +that can be further hand-edited to improve accuracy, inflection and +emphasis. + +See `the online documentation `_ for detailed information.""" + ... + +def pronounce(phonemes: str, pitch: int=64, speed: int=72, mouth: int=128, throat: int=128, pin: Optional[MicroBitDigitalPin]=pin0) -> None: + """Wymów fonemy. + +Example: ``speech.pronounce(' /HEHLOW WERLD')`` + +:param phonemes: Łańcuch fonemów do wymówienia +:param pitch: Liczba reprezentująca wysokość głosu +:param speed: Liczba reprezentująca szybkość głosu +:param mouth: Liczba reprezentująca usta głosu +:param throat: Liczba reprezentująca gardło głosu +:param pin: Opcjonalny argument do określenia pinu wyjściowego może być użyty do nadpisania domyślnej wartości ``pin0``. +Jeśli nie chcemy, aby jakikolwiek dźwięk wydobywał się z pinów, możemy użyć ``pin=None``. Tylko micro:bit V2. + +Override the optional pitch, speed, mouth and throat settings to change the +timbre (quality) of the voice. + +See `the online documentation `_ for detailed information.""" + ... + +def say(words: str, pitch: int=64, speed: int=72, mouth: int=128, throat: int=128, pin: MicroBitDigitalPin=pin0) -> None: + """Powiedz angielskie słowa. + +Example: ``speech.say('hello world')`` + +:param words: Łańcuch słów do powiedzenia. +:param pitch: Liczba reprezentująca wysokość głosu +:param speed: Liczba reprezentująca szybkość głosu +:param mouth: Liczba reprezentująca usta głosu +:param throat: Liczba reprezentująca gardło głosu +:param pin: Opcjonalny argument do określenia pinu wyjściowego może być użyty do nadpisania domyślnej wartości ``pin0``. +Jeśli nie chcemy, aby jakikolwiek dźwięk wydobywał się z pinów, możemy użyć ``pin=None``. Tylko micro:bit V2. + +The result is semi-accurate for English. Override the optional pitch, speed, +mouth and throat settings to change the timbre (quality) of the voice. + +This is a short-hand equivalent of: +``speech.pronounce(speech.translate(words))`` + +See `the online documentation `_ for detailed information.""" + ... + +def sing(phonemes: str, pitch: int=64, speed: int=72, mouth: int=128, throat: int=128, pin: MicroBitDigitalPin=pin0) -> None: + """Zaśpiewaj fonemy. + +Example: ``speech.sing(' /HEHLOW WERLD')`` + +:param phonemes: Łańcuch słów do zaśpiewania. +:param pitch: Liczba reprezentująca wysokość głosu +:param speed: Liczba reprezentująca szybkość głosu +:param mouth: Liczba reprezentująca usta głosu +:param throat: Liczba reprezentująca gardło głosu +:param pin: Opcjonalny argument do określenia pinu wyjściowego może być użyty do nadpisania domyślnej wartości ``pin0``. +Jeśli nie chcemy, aby jakikolwiek dźwięk wydobywał się z pinów, możemy użyć ``pin=None``. Tylko micro:bit V2. + +Override the optional pitch, speed, mouth and throat settings to change +the timbre (quality) of the voice. + +See `the online documentation `_ for detailed information.""" + ... \ No newline at end of file diff --git a/lang/pl/typeshed/stdlib/struct.pyi b/lang/pl/typeshed/stdlib/struct.pyi new file mode 100644 index 0000000..ea3d443 --- /dev/null +++ b/lang/pl/typeshed/stdlib/struct.pyi @@ -0,0 +1,56 @@ +"""Pakuj i rozpakowuj prymitywne typy danych.""" +from _typeshed import ReadableBuffer, WriteableBuffer +from typing import Any, Tuple, Union + +def calcsize(fmt: str) -> int: + """Uzyskaj liczbę bajtów potrzebnych do przechowywania podanego ``fmt``. + +Example: ``struct.calcsize('hf')`` + +:param fmt: Łańcuch formatu. +:return The number of bytes needed to store such a value.""" + ... + +def pack(fmt: str, v1: Any, *vn: Any) -> bytes: + """Upakuj wartości zgodnie z łńcuchem formatu. + +Example: ``struct.pack('hf', 1, 3.1415)`` + +:param fmt: Łańcuch formatu. +:param v1: Pierwsza wartość. +:param *vn: Pozostałe wartości. +:return A bytes object encoding the values.""" + ... + +def pack_into(fmt: str, buffer: WriteableBuffer, offset: int, v1: Any, *vn: Any) -> None: + """Upakuj wartości zgodnie z łńcuchem formatu. + +Example: ``struct.pack_info('hf', buffer, 1, 3.1415)`` + +:param fmt: Łańcuch formatu. +:param buffer: Bufor docelowy do zapisu. +:param offset: Przesunięcie do bufora. Wartość ujemna może być liczona od końca bufora. +:param v1: (w1) Pierwsza wartość. +:param *vn: Pozostałe wartości.""" + ... + +def unpack(fmt: str, data: ReadableBuffer) -> Tuple[Any, ...]: + """Rozpakuj dane zgodnie z łańcuchem formatu. + +Example: ``v1, v2 = struct.unpack('hf', buffer)`` + +:param fmt: Łańcuch formatu. +:param data: Dane +:return: A tuple of the unpacked values.""" + ... + +def unpack_from(fmt: str, buffer: ReadableBuffer, offset: int=0) -> Tuple: + """Rozpakuj dane z buforu zgodnie z łańcuchem formatu. + +Example: ``v1, v2 = struct.unpack_from('hf', buffer)`` + +:param fmt: Łańcuch formatu. +:param buffer: Bufor źródłowy do odczytu. +:param offset: Przesunięcie do bufora. Wartość ujemna może być liczona od końca bufora. +:return: A tuple of the unpacked values.""" + ... \ No newline at end of file diff --git a/lang/pl/typeshed/stdlib/sys.pyi b/lang/pl/typeshed/stdlib/sys.pyi new file mode 100644 index 0000000..c0683cb --- /dev/null +++ b/lang/pl/typeshed/stdlib/sys.pyi @@ -0,0 +1,96 @@ +"""Funkcje specyficzne dla systemu""" +from typing import Any, Dict, List, NoReturn, TextIO, Tuple + +def exit(retval: object=...) -> NoReturn: + """Zakończ bieżący program z podanym kodem wyjścia. + +Example: ``sys.exit(1)`` + +This function raises a ``SystemExit`` exception. If an argument is given, its +value given as an argument to ``SystemExit``. + +:param retval: Kod lub wiadomość wyjściowa.""" + ... + +def print_exception(exc: Exception) -> None: + """Wydrukuj wyjątek ze śledzeniem. + +Example: ``sys.print_exception(e)`` + +:param exc: Wyjątek do wydrukowania + +This is simplified version of a function which appears in the +``traceback`` module in CPython.""" +argv: List[str] +"""Zmienna lista argumentów, od których uruchomiono bieżący program.""" +byteorder: str +"""Kolejność bajtów systemu (``"little"`` lub ``"big"``).""" + +class _implementation: + name: str + version: Tuple[int, int, int] +implementation: _implementation +"""Obiekt z informacjami o bieżącej implementacji Pythona. + +For MicroPython, it has following attributes: + +- ``name`` - string "micropython" +- ``version`` - tuple (major, minor, micro), e.g. (1, 7, 0) + +This object is the recommended way to distinguish MicroPython from other +Python implementations (note that it still may not exist in the very +minimal ports). + +CPython mandates more attributes for this object, but the actual useful +bare minimum is implemented in MicroPython. +""" +maxsize: int +""" +Maksymalna wartość, jaką może przechowywać natywny typ całkowity na bieżącej platformie, +lub maksymalna wartość reprezentowana przez typ całkowity MicroPythona, jeśli jest mniejsza +niż maksymalna wartość platformy (tak jest w przypadku portów MicroPython bez +wsparcia long int). + +This attribute is useful for detecting "bitness" of a platform (32-bit vs +64-bit, etc.). It's recommended to not compare this attribute to some +value directly, but instead count number of bits in it:: + + bits = 0 + v = sys.maxsize + while v: + bits += 1 + v >>= 1 + if bits > 32: + # 64-bit (or more) platform + ... + else: + # 32-bit (or less) platform + # Note that on 32-bit platform, value of bits may be less than 32 + # (e.g. 31) due to peculiarities described above, so use "> 16", + # "> 32", "> 64" style of comparisons. +""" +modules: Dict[str, Any] +"""Słownik załadowanych modułów. + +On some ports, it may not include builtin modules.""" +path: List[str] +"""Zmienna lista katalogów do wyszukiwania importowanych modułów.""" +platform: str +"""Platforma na której działa MicroPython. + +For OS/RTOS ports, this is usually an identifier of the OS, e.g. ``"linux"``. +For baremetal ports it is an identifier of a board, e.g. ``"pyboard"`` for +the original MicroPython reference board. It thus can be used to +distinguish one board from another. + +If you need to check whether your program runs on MicroPython (vs other +Python implementation), use ``sys.implementation`` instead. +""" +version: str +"""Wersja Pythona, z którą ta implementacja jest zgodna, jako łańcuch.""" +version_info: Tuple[int, int, int] +"""Wersja Pythona, z którą ta implementacja jest zgodna, jako krotka typu int. + +Only the first three version numbers (major, minor, micro) are supported and +they can be referenced only by index, not by name. +""" \ No newline at end of file diff --git a/lang/pl/typeshed/stdlib/this.pyi b/lang/pl/typeshed/stdlib/this.pyi new file mode 100644 index 0000000..faf492b --- /dev/null +++ b/lang/pl/typeshed/stdlib/this.pyi @@ -0,0 +1 @@ +def authors() -> str: ... diff --git a/lang/pl/typeshed/stdlib/time.pyi b/lang/pl/typeshed/stdlib/time.pyi new file mode 100644 index 0000000..cc4cf6e --- /dev/null +++ b/lang/pl/typeshed/stdlib/time.pyi @@ -0,0 +1,117 @@ +"""Zmierz czas i dodaj opóźnienia do programów.""" +from typing import Union + +def sleep(seconds: Union[int, float]) -> None: + """Opóźnij kilka sekund. + +Example: ``time.sleep(1)`` + +:param seconds: Liczba sekund snu. +Użyj liczby zmiennopozycyjnej, aby spać przez ułamkową część sekund.""" + ... + +def sleep_ms(ms: int) -> None: + """Opóźnij o podaną liczbę milisekund. + +Example: ``time.sleep_ms(1_000_000)`` + +:param ms: Liczba milisekund opóźnienia (>= 0).""" + ... + +def sleep_us(us: int) -> None: + """Opóźnij o podaną liczbę milisekund. + +Example: ``time.sleep_us(1000)`` + +:param us: Liczba milisekund opóźnienia (>= 0).""" + ... + +def ticks_ms() -> int: + """Uzyskaj rosnący licznik milisekundowy z dowolnym punktem odniesienia, +który zawija się po pewnej wartości. + +Example: ``time.ticks_ms()`` + +:return: The counter value in milliseconds.""" + ... + +def ticks_us() -> int: + """Uzyskaj rosnący licznik milisekundowy z dowolnym punktem odniesienia, +który zawija się po pewnej wartości. + +Example: ``time.ticks_us()`` + +:return: The counter value in microseconds.""" + ... + +def ticks_add(ticks: int, delta: int) -> int: + """Przesunięcie zaznacza wartość o podaną liczbę, która może być dodatnia lub +negatywny. +. + +Example: ``time.ticks_add(time.ticks_ms(), 200)`` + +Given a ticks value, this function allows to calculate ticks +value delta ticks before or after it, following modular-arithmetic +definition of tick values. + +:param ticks: Wartość ticków +:param delta: Przesunięcie o liczbę całkowitą + +Example:: + + # Find out what ticks value there was 100ms ago + print(ticks_add(time.ticks_ms(), -100)) + + # Calculate deadline for operation and test for it + deadline = ticks_add(time.ticks_ms(), 200) + while ticks_diff(deadline, time.ticks_ms()) > 0: + do_a_little_of_something() + + # Find out TICKS_MAX used by this port + print(ticks_add(0, -1))""" + ... + +def ticks_diff(ticks1: int, ticks2: int) -> int: + """Zmierz różnicę ticków między wartościami zwróconymi z +``time.ticks_ms()`` lub ``ticks_us()``, jako wartość ze znakiem, +która może się zawijać. + +Example: ``time.ticks_diff(scheduled_time, now)`` + +:param ticks1: Wartość do odejmowania od +:param ticks2: Wartość do odejmowania + +The argument order is the same as for subtraction operator, +``ticks_diff(ticks1, ticks2)`` has the same meaning as ``ticks1 - ticks2``. + +``ticks_diff()`` is designed to accommodate various usage +patterns, among them: + +Polling with timeout. In this case, the order of events is known, and you +will deal only with positive results of :func:`time.ticks_diff()`:: + + # Wait for GPIO pin to be asserted, but at most 500us + start = time.ticks_us() + while pin.value() == 0: + if time.ticks_diff(time.ticks_us(), start) > 500: + raise TimeoutError + + +Scheduling events. In this case, :func:`time.ticks_diff()` result may be +negative if an event is overdue:: + + # This code snippet is not optimized + now = time.ticks_ms() + scheduled_time = task.scheduled_time() + if ticks_diff(scheduled_time, now) > 0: + print("Too early, let's nap") + sleep_ms(ticks_diff(scheduled_time, now)) + task.run() + elif ticks_diff(scheduled_time, now) == 0: + print("Right at time!") + task.run() + elif ticks_diff(scheduled_time, now) < 0: + print("Oops, running late, tell task to run faster!") + task.run(run_faster=True)""" + ... \ No newline at end of file diff --git a/lang/pl/typeshed/stdlib/types.pyi b/lang/pl/typeshed/stdlib/types.pyi new file mode 100644 index 0000000..752b2de --- /dev/null +++ b/lang/pl/typeshed/stdlib/types.pyi @@ -0,0 +1,413 @@ +import sys +from typing import ( + Any, + AsyncGenerator, + Awaitable, + Callable, + Generator, + Generic, + ItemsView, + Iterable, + Iterator, + KeysView, + Mapping, + Tuple, + Type, + TypeVar, + ValuesView, + overload, +) +from typing_extensions import Literal, final + +# Note, all classes "defined" here require special handling. + +_T = TypeVar("_T") +_T1 = TypeVar("_T1") +_T2 = TypeVar("_T2") +_T_co = TypeVar("_T_co", covariant=True) +_T_contra = TypeVar("_T_contra", contravariant=True) +_KT = TypeVar("_KT") +_VT_co = TypeVar("_VT_co", covariant=True) +_V_co = TypeVar("_V_co", covariant=True) + +@final +class _Cell: + __hash__: None # type: ignore + cell_contents: Any + +@final +class FunctionType: + __closure__: Tuple[_Cell, ...] | None + __code__: CodeType + __defaults__: Tuple[Any, ...] | None + __dict__: dict[str, Any] + __globals__: dict[str, Any] + __name__: str + __qualname__: str + __annotations__: dict[str, Any] + __kwdefaults__: dict[str, Any] + def __init__( + self, + code: CodeType, + globals: dict[str, Any], + name: str | None = ..., + argdefs: Tuple[object, ...] | None = ..., + closure: Tuple[_Cell, ...] | None = ..., + ) -> None: ... + def __call__(self, *args: Any, **kwargs: Any) -> Any: ... + def __get__(self, obj: object | None, type: type | None) -> MethodType: ... + +LambdaType = FunctionType + +@final +class CodeType: + """Create a code object. Not for the faint of heart.""" + + co_argcount: int + if sys.version_info >= (3, 8): + co_posonlyargcount: int + co_kwonlyargcount: int + co_nlocals: int + co_stacksize: int + co_flags: int + co_code: bytes + co_consts: Tuple[Any, ...] + co_names: Tuple[str, ...] + co_varnames: Tuple[str, ...] + co_filename: str + co_name: str + co_firstlineno: int + co_lnotab: bytes + co_freevars: Tuple[str, ...] + co_cellvars: Tuple[str, ...] + if sys.version_info >= (3, 8): + def __init__( + self, + argcount: int, + posonlyargcount: int, + kwonlyargcount: int, + nlocals: int, + stacksize: int, + flags: int, + codestring: bytes, + constants: Tuple[Any, ...], + names: Tuple[str, ...], + varnames: Tuple[str, ...], + filename: str, + name: str, + firstlineno: int, + lnotab: bytes, + freevars: Tuple[str, ...] = ..., + cellvars: Tuple[str, ...] = ..., + ) -> None: ... + else: + def __init__( + self, + argcount: int, + kwonlyargcount: int, + nlocals: int, + stacksize: int, + flags: int, + codestring: bytes, + constants: Tuple[Any, ...], + names: Tuple[str, ...], + varnames: Tuple[str, ...], + filename: str, + name: str, + firstlineno: int, + lnotab: bytes, + freevars: Tuple[str, ...] = ..., + cellvars: Tuple[str, ...] = ..., + ) -> None: ... + if sys.version_info >= (3, 8): + def replace( + self, + *, + co_argcount: int = ..., + co_posonlyargcount: int = ..., + co_kwonlyargcount: int = ..., + co_nlocals: int = ..., + co_stacksize: int = ..., + co_flags: int = ..., + co_firstlineno: int = ..., + co_code: bytes = ..., + co_consts: Tuple[Any, ...] = ..., + co_names: Tuple[str, ...] = ..., + co_varnames: Tuple[str, ...] = ..., + co_freevars: Tuple[str, ...] = ..., + co_cellvars: Tuple[str, ...] = ..., + co_filename: str = ..., + co_name: str = ..., + co_lnotab: bytes = ..., + ) -> CodeType: ... + +@final +class MappingProxyType(Mapping[_KT, _VT_co], Generic[_KT, _VT_co]): + __hash__: None # type: ignore + def __init__(self, mapping: Mapping[_KT, _VT_co]) -> None: ... + def __getitem__(self, k: _KT) -> _VT_co: ... + def __iter__(self) -> Iterator[_KT]: ... + def __len__(self) -> int: ... + def copy(self) -> dict[_KT, _VT_co]: ... + def keys(self) -> KeysView[_KT]: ... + def values(self) -> ValuesView[_VT_co]: ... + def items(self) -> ItemsView[_KT, _VT_co]: ... + if sys.version_info >= (3, 9): + def __class_getitem__(cls, item: Any) -> GenericAlias: ... + def __reversed__(self) -> Iterator[_KT]: ... + def __or__( + self, __value: Mapping[_T1, _T2] + ) -> dict[_KT | _T1, _VT_co | _T2]: ... + def __ror__( + self, __value: Mapping[_T1, _T2] + ) -> dict[_KT | _T1, _VT_co | _T2]: ... + +class SimpleNamespace: + __hash__: None # type: ignore + def __init__(self, **kwargs: Any) -> None: ... + def __getattribute__(self, name: str) -> Any: ... + def __setattr__(self, name: str, value: Any) -> None: ... + def __delattr__(self, name: str) -> None: ... + +class ModuleType: + __name__: str + __file__: str + __dict__: dict[str, Any] + __package__: str | None + def __init__(self, name: str, doc: str | None = ...) -> None: ... + +@final +class GeneratorType(Generator[_T_co, _T_contra, _V_co]): + gi_code: CodeType + gi_frame: FrameType + gi_running: bool + gi_yieldfrom: GeneratorType[_T_co, _T_contra, Any] | None + def __iter__(self) -> GeneratorType[_T_co, _T_contra, _V_co]: ... + def __next__(self) -> _T_co: ... + def close(self) -> None: ... + def send(self, __arg: _T_contra) -> _T_co: ... + @overload + def throw( + self, + __typ: Type[BaseException], + __val: BaseException | object = ..., + __tb: TracebackType | None = ..., + ) -> _T_co: ... + @overload + def throw( + self, __typ: BaseException, __val: None = ..., __tb: TracebackType | None = ... + ) -> _T_co: ... + +@final +class AsyncGeneratorType(AsyncGenerator[_T_co, _T_contra]): + ag_await: Awaitable[Any] | None + ag_frame: FrameType + ag_running: bool + ag_code: CodeType + def __aiter__(self) -> AsyncGeneratorType[_T_co, _T_contra]: ... + def __anext__(self) -> Awaitable[_T_co]: ... + def asend(self, __val: _T_contra) -> Awaitable[_T_co]: ... + @overload + def athrow( + self, + __typ: Type[BaseException], + __val: BaseException | object = ..., + __tb: TracebackType | None = ..., + ) -> Awaitable[_T_co]: ... + @overload + def athrow( + self, __typ: BaseException, __val: None = ..., __tb: TracebackType | None = ... + ) -> Awaitable[_T_co]: ... + def aclose(self) -> Awaitable[None]: ... + +@final +class CoroutineType: + cr_await: Any | None + cr_code: CodeType + cr_frame: FrameType + cr_running: bool + def close(self) -> None: ... + def send(self, __arg: Any) -> Any: ... + @overload + def throw( + self, + __typ: Type[BaseException], + __val: BaseException | object = ..., + __tb: TracebackType | None = ..., + ) -> Any: ... + @overload + def throw( + self, __typ: BaseException, __val: None = ..., __tb: TracebackType | None = ... + ) -> Any: ... + +class _StaticFunctionType: + """Fictional type to correct the type of MethodType.__func__. + + FunctionType is a descriptor, so mypy follows the descriptor protocol and + converts MethodType.__func__ back to MethodType (the return type of + FunctionType.__get__). But this is actually a special case; MethodType is + implemented in C and its attribute access doesn't go through + __getattribute__. + + By wrapping FunctionType in _StaticFunctionType, we get the right result; + similar to wrapping a function in staticmethod() at runtime to prevent it + being bound as a method. + """ + + def __get__(self, obj: object | None, type: type | None) -> FunctionType: ... + +@final +class MethodType: + __closure__: Tuple[_Cell, ...] | None # inherited from the added function + __defaults__: Tuple[Any, ...] | None # inherited from the added function + __func__: _StaticFunctionType + __self__: object + __name__: str # inherited from the added function + __qualname__: str # inherited from the added function + def __init__(self, func: Callable[..., Any], obj: object) -> None: ... + def __call__(self, *args: Any, **kwargs: Any) -> Any: ... + +@final +class BuiltinFunctionType: + __self__: object | ModuleType + __name__: str + __qualname__: str + def __call__(self, *args: Any, **kwargs: Any) -> Any: ... + +BuiltinMethodType = BuiltinFunctionType + +if sys.version_info >= (3, 7): + @final + class WrapperDescriptorType: + __name__: str + __qualname__: str + __objclass__: type + def __call__(self, *args: Any, **kwargs: Any) -> Any: ... + def __get__(self, obj: Any, type: type = ...) -> Any: ... + @final + class MethodWrapperType: + __self__: object + __name__: str + __qualname__: str + __objclass__: type + def __call__(self, *args: Any, **kwargs: Any) -> Any: ... + def __eq__(self, other: Any) -> bool: ... + def __ne__(self, other: Any) -> bool: ... + @final + class MethodDescriptorType: + __name__: str + __qualname__: str + __objclass__: type + def __call__(self, *args: Any, **kwargs: Any) -> Any: ... + def __get__(self, obj: Any, type: type = ...) -> Any: ... + @final + class ClassMethodDescriptorType: + __name__: str + __qualname__: str + __objclass__: type + def __call__(self, *args: Any, **kwargs: Any) -> Any: ... + def __get__(self, obj: Any, type: type = ...) -> Any: ... + +@final +class TracebackType: + if sys.version_info >= (3, 7): + def __init__( + self, + tb_next: TracebackType | None, + tb_frame: FrameType, + tb_lasti: int, + tb_lineno: int, + ) -> None: ... + tb_next: TracebackType | None + else: + @property + def tb_next(self) -> TracebackType | None: ... + # the rest are read-only even in 3.7 + @property + def tb_frame(self) -> FrameType: ... + @property + def tb_lasti(self) -> int: ... + @property + def tb_lineno(self) -> int: ... + +@final +class FrameType: + f_back: FrameType | None + f_builtins: dict[str, Any] + f_code: CodeType + f_globals: dict[str, Any] + f_lasti: int + f_lineno: int + f_locals: dict[str, Any] + f_trace: Callable[[FrameType, str, Any], Any] | None + if sys.version_info >= (3, 7): + f_trace_lines: bool + f_trace_opcodes: bool + def clear(self) -> None: ... + +@final +class GetSetDescriptorType: + __name__: str + __objclass__: type + def __get__(self, __obj: Any, __type: type = ...) -> Any: ... + def __set__(self, __instance: Any, __value: Any) -> None: ... + def __delete__(self, obj: Any) -> None: ... + +@final +class MemberDescriptorType: + __name__: str + __objclass__: type + def __get__(self, __obj: Any, __type: type = ...) -> Any: ... + def __set__(self, __instance: Any, __value: Any) -> None: ... + def __delete__(self, obj: Any) -> None: ... + +if sys.version_info >= (3, 7): + def new_class( + name: str, + bases: Iterable[object] = ..., + kwds: dict[str, Any] | None = ..., + exec_body: Callable[[dict[str, Any]], None] | None = ..., + ) -> type: ... + def resolve_bases(bases: Iterable[object]) -> Tuple[Any, ...]: ... + +else: + def new_class( + name: str, + bases: Tuple[type, ...] = ..., + kwds: dict[str, Any] | None = ..., + exec_body: Callable[[dict[str, Any]], None] | None = ..., + ) -> type: ... + +def prepare_class( + name: str, bases: Tuple[type, ...] = ..., kwds: dict[str, Any] | None = ... +) -> Tuple[type, dict[str, Any], dict[str, Any]]: ... + +# Actually a different type, but `property` is special and we want that too. +DynamicClassAttribute = property + +def coroutine(func: Callable[..., Any]) -> CoroutineType: ... + +if sys.version_info >= (3, 8): + CellType = _Cell + +if sys.version_info >= (3, 9): + class GenericAlias: + __origin__: type + __args__: Tuple[Any, ...] + __parameters__: Tuple[Any, ...] + def __init__(self, origin: type, args: Any) -> None: ... + def __getattr__(self, name: str) -> Any: ... # incomplete + +if sys.version_info >= (3, 10): + @final + class NoneType: + def __bool__(self) -> Literal[False]: ... + EllipsisType = ellipsis # noqa F811 from builtins + from builtins import _NotImplementedType + + NotImplementedType = _NotImplementedType # noqa F811 from builtins + @final + class UnionType: + __args__: Tuple[Any, ...] + def __or__(self, obj: Any) -> UnionType: ... + def __ror__(self, obj: Any) -> UnionType: ... diff --git a/lang/pl/typeshed/stdlib/typing.pyi b/lang/pl/typeshed/stdlib/typing.pyi new file mode 100644 index 0000000..a494557 --- /dev/null +++ b/lang/pl/typeshed/stdlib/typing.pyi @@ -0,0 +1,716 @@ +import collections # Needed by aliases like DefaultDict, see mypy issue 2986 +import sys +from abc import ABCMeta, abstractmethod +from types import BuiltinFunctionType, CodeType, FrameType, FunctionType, MethodType, ModuleType, TracebackType +from typing_extensions import Literal as _Literal + +if sys.version_info >= (3, 7): + from types import MethodDescriptorType, MethodWrapperType, WrapperDescriptorType + +if sys.version_info >= (3, 9): + from types import GenericAlias + +# Definitions of special type checking related constructs. Their definitions +# are not used, so their value does not matter. + +Any = object() + +class TypeVar: + __name__: str + __bound__: Optional[Type[Any]] + __constraints__: Tuple[Type[Any], ...] + __covariant__: bool + __contravariant__: bool + def __init__( + self, + name: str, + *constraints: Type[Any], + bound: Union[None, Type[Any], str] = ..., + covariant: bool = ..., + contravariant: bool = ..., + ) -> None: ... + +_promote = object() + +class _SpecialForm: + def __getitem__(self, typeargs: Any) -> object: ... + +_F = TypeVar("_F", bound=Callable[..., Any]) + +def overload(func: _F) -> _F: ... + +Union: _SpecialForm = ... +Optional: _SpecialForm = ... +Tuple: _SpecialForm = ... +Generic: _SpecialForm = ... +# Protocol is only present in 3.8 and later, but mypy needs it unconditionally +Protocol: _SpecialForm = ... +Callable: _SpecialForm = ... +Type: _SpecialForm = ... +ClassVar: _SpecialForm = ... +if sys.version_info >= (3, 8): + Final: _SpecialForm = ... + def final(f: _F) -> _F: ... + Literal: _SpecialForm = ... + # TypedDict is a (non-subscriptable) special form. + TypedDict: object + +if sys.version_info < (3, 7): + class GenericMeta(type): ... + +if sys.version_info >= (3, 10): + class ParamSpecArgs: + __origin__: ParamSpec + def __init__(self, origin: ParamSpec) -> None: ... + class ParamSpecKwargs: + __origin__: ParamSpec + def __init__(self, origin: ParamSpec) -> None: ... + class ParamSpec: + __name__: str + __bound__: Optional[Type[Any]] + __covariant__: bool + __contravariant__: bool + def __init__( + self, name: str, *, bound: Union[None, Type[Any], str] = ..., contravariant: bool = ..., covariant: bool = ... + ) -> None: ... + @property + def args(self) -> ParamSpecArgs: ... + @property + def kwargs(self) -> ParamSpecKwargs: ... + Concatenate: _SpecialForm = ... + TypeAlias: _SpecialForm = ... + TypeGuard: _SpecialForm = ... + +# Return type that indicates a function does not return. +# This type is equivalent to the None type, but the no-op Union is necessary to +# distinguish the None type from the None value. +NoReturn = Union[None] + +# These type variables are used by the container types. +_T = TypeVar("_T") +_S = TypeVar("_S") +_KT = TypeVar("_KT") # Key type. +_VT = TypeVar("_VT") # Value type. +_T_co = TypeVar("_T_co", covariant=True) # Any type covariant containers. +_V_co = TypeVar("_V_co", covariant=True) # Any type covariant containers. +_KT_co = TypeVar("_KT_co", covariant=True) # Key type covariant containers. +_VT_co = TypeVar("_VT_co", covariant=True) # Value type covariant containers. +_T_contra = TypeVar("_T_contra", contravariant=True) # Ditto contravariant. +_TC = TypeVar("_TC", bound=Type[object]) + +def no_type_check(arg: _F) -> _F: ... +def no_type_check_decorator(decorator: _F) -> _F: ... + +# Type aliases and type constructors + +class _Alias: + # Class for defining generic aliases for library types. + def __getitem__(self, typeargs: Any) -> Any: ... + +List = _Alias() +Dict = _Alias() +DefaultDict = _Alias() +Set = _Alias() +FrozenSet = _Alias() +Counter = _Alias() +Deque = _Alias() +ChainMap = _Alias() + +if sys.version_info >= (3, 7): + OrderedDict = _Alias() + +if sys.version_info >= (3, 9): + Annotated: _SpecialForm = ... + +# Predefined type variables. +AnyStr = TypeVar("AnyStr", str, bytes) + +# Abstract base classes. + +def runtime_checkable(cls: _TC) -> _TC: ... +@runtime_checkable +class SupportsInt(Protocol, metaclass=ABCMeta): + @abstractmethod + def __int__(self) -> int: ... + +@runtime_checkable +class SupportsFloat(Protocol, metaclass=ABCMeta): + @abstractmethod + def __float__(self) -> float: ... + +@runtime_checkable +class SupportsComplex(Protocol, metaclass=ABCMeta): + @abstractmethod + def __complex__(self) -> complex: ... + +@runtime_checkable +class SupportsBytes(Protocol, metaclass=ABCMeta): + @abstractmethod + def __bytes__(self) -> bytes: ... + +if sys.version_info >= (3, 8): + @runtime_checkable + class SupportsIndex(Protocol, metaclass=ABCMeta): + @abstractmethod + def __index__(self) -> int: ... + +@runtime_checkable +class SupportsAbs(Protocol[_T_co]): + @abstractmethod + def __abs__(self) -> _T_co: ... + +@runtime_checkable +class SupportsRound(Protocol[_T_co]): + @overload + @abstractmethod + def __round__(self) -> int: ... + @overload + @abstractmethod + def __round__(self, ndigits: int) -> _T_co: ... + +@runtime_checkable +class Sized(Protocol, metaclass=ABCMeta): + @abstractmethod + def __len__(self) -> int: ... + +@runtime_checkable +class Hashable(Protocol, metaclass=ABCMeta): + # TODO: This is special, in that a subclass of a hashable class may not be hashable + # (for example, list vs. object). It's not obvious how to represent this. This class + # is currently mostly useless for static checking. + @abstractmethod + def __hash__(self) -> int: ... + +@runtime_checkable +class Iterable(Protocol[_T_co]): + @abstractmethod + def __iter__(self) -> Iterator[_T_co]: ... + +@runtime_checkable +class Iterator(Iterable[_T_co], Protocol[_T_co]): + @abstractmethod + def __next__(self) -> _T_co: ... + def __iter__(self) -> Iterator[_T_co]: ... + +@runtime_checkable +class Reversible(Iterable[_T_co], Protocol[_T_co]): + @abstractmethod + def __reversed__(self) -> Iterator[_T_co]: ... + +class Generator(Iterator[_T_co], Generic[_T_co, _T_contra, _V_co]): + def __next__(self) -> _T_co: ... + @abstractmethod + def send(self, __value: _T_contra) -> _T_co: ... + @overload + @abstractmethod + def throw( + self, __typ: Type[BaseException], __val: Union[BaseException, object] = ..., __tb: Optional[TracebackType] = ... + ) -> _T_co: ... + @overload + @abstractmethod + def throw(self, __typ: BaseException, __val: None = ..., __tb: Optional[TracebackType] = ...) -> _T_co: ... + def close(self) -> None: ... + def __iter__(self) -> Generator[_T_co, _T_contra, _V_co]: ... + @property + def gi_code(self) -> CodeType: ... + @property + def gi_frame(self) -> FrameType: ... + @property + def gi_running(self) -> bool: ... + @property + def gi_yieldfrom(self) -> Optional[Generator[Any, Any, Any]]: ... + +@runtime_checkable +class Awaitable(Protocol[_T_co]): + @abstractmethod + def __await__(self) -> Generator[Any, None, _T_co]: ... + +class Coroutine(Awaitable[_V_co], Generic[_T_co, _T_contra, _V_co]): + __name__: str + __qualname__: str + @property + def cr_await(self) -> Optional[Any]: ... + @property + def cr_code(self) -> CodeType: ... + @property + def cr_frame(self) -> FrameType: ... + @property + def cr_running(self) -> bool: ... + @abstractmethod + def send(self, __value: _T_contra) -> _T_co: ... + @overload + @abstractmethod + def throw( + self, __typ: Type[BaseException], __val: Union[BaseException, object] = ..., __tb: Optional[TracebackType] = ... + ) -> _T_co: ... + @overload + @abstractmethod + def throw(self, __typ: BaseException, __val: None = ..., __tb: Optional[TracebackType] = ...) -> _T_co: ... + @abstractmethod + def close(self) -> None: ... + +# NOTE: This type does not exist in typing.py or PEP 484. +# The parameters correspond to Generator, but the 4th is the original type. +class AwaitableGenerator( + Awaitable[_V_co], Generator[_T_co, _T_contra, _V_co], Generic[_T_co, _T_contra, _V_co, _S], metaclass=ABCMeta +): ... + +@runtime_checkable +class AsyncIterable(Protocol[_T_co]): + @abstractmethod + def __aiter__(self) -> AsyncIterator[_T_co]: ... + +@runtime_checkable +class AsyncIterator(AsyncIterable[_T_co], Protocol[_T_co]): + @abstractmethod + def __anext__(self) -> Awaitable[_T_co]: ... + def __aiter__(self) -> AsyncIterator[_T_co]: ... + +class AsyncGenerator(AsyncIterator[_T_co], Generic[_T_co, _T_contra]): + @abstractmethod + def __anext__(self) -> Awaitable[_T_co]: ... + @abstractmethod + def asend(self, __value: _T_contra) -> Awaitable[_T_co]: ... + @overload + @abstractmethod + def athrow( + self, __typ: Type[BaseException], __val: Union[BaseException, object] = ..., __tb: Optional[TracebackType] = ... + ) -> Awaitable[_T_co]: ... + @overload + @abstractmethod + def athrow(self, __typ: BaseException, __val: None = ..., __tb: Optional[TracebackType] = ...) -> Awaitable[_T_co]: ... + @abstractmethod + def aclose(self) -> Awaitable[None]: ... + @abstractmethod + def __aiter__(self) -> AsyncGenerator[_T_co, _T_contra]: ... + @property + def ag_await(self) -> Any: ... + @property + def ag_code(self) -> CodeType: ... + @property + def ag_frame(self) -> FrameType: ... + @property + def ag_running(self) -> bool: ... + +@runtime_checkable +class Container(Protocol[_T_co]): + @abstractmethod + def __contains__(self, __x: object) -> bool: ... + +@runtime_checkable +class Collection(Iterable[_T_co], Container[_T_co], Protocol[_T_co]): + # Implement Sized (but don't have it as a base class). + @abstractmethod + def __len__(self) -> int: ... + +_Collection = Collection[_T_co] + +class Sequence(_Collection[_T_co], Reversible[_T_co], Generic[_T_co]): + @overload + @abstractmethod + def __getitem__(self, i: int) -> _T_co: ... + @overload + @abstractmethod + def __getitem__(self, s: slice) -> Sequence[_T_co]: ... + # Mixin methods + def index(self, value: Any, start: int = ..., stop: int = ...) -> int: ... + def count(self, value: Any) -> int: ... + def __contains__(self, x: object) -> bool: ... + def __iter__(self) -> Iterator[_T_co]: ... + def __reversed__(self) -> Iterator[_T_co]: ... + +class MutableSequence(Sequence[_T], Generic[_T]): + @abstractmethod + def insert(self, index: int, value: _T) -> None: ... + @overload + @abstractmethod + def __getitem__(self, i: int) -> _T: ... + @overload + @abstractmethod + def __getitem__(self, s: slice) -> MutableSequence[_T]: ... + @overload + @abstractmethod + def __setitem__(self, i: int, o: _T) -> None: ... + @overload + @abstractmethod + def __setitem__(self, s: slice, o: Iterable[_T]) -> None: ... + @overload + @abstractmethod + def __delitem__(self, i: int) -> None: ... + @overload + @abstractmethod + def __delitem__(self, i: slice) -> None: ... + # Mixin methods + def append(self, value: _T) -> None: ... + def clear(self) -> None: ... + def extend(self, values: Iterable[_T]) -> None: ... + def reverse(self) -> None: ... + def pop(self, index: int = ...) -> _T: ... + def remove(self, value: _T) -> None: ... + def __iadd__(self, x: Iterable[_T]) -> MutableSequence[_T]: ... + +class AbstractSet(_Collection[_T_co], Generic[_T_co]): + @abstractmethod + def __contains__(self, x: object) -> bool: ... + # Mixin methods + def __le__(self, s: AbstractSet[Any]) -> bool: ... + def __lt__(self, s: AbstractSet[Any]) -> bool: ... + def __gt__(self, s: AbstractSet[Any]) -> bool: ... + def __ge__(self, s: AbstractSet[Any]) -> bool: ... + def __and__(self, s: AbstractSet[Any]) -> AbstractSet[_T_co]: ... + def __or__(self, s: AbstractSet[_T]) -> AbstractSet[Union[_T_co, _T]]: ... + def __sub__(self, s: AbstractSet[Any]) -> AbstractSet[_T_co]: ... + def __xor__(self, s: AbstractSet[_T]) -> AbstractSet[Union[_T_co, _T]]: ... + def isdisjoint(self, other: Iterable[Any]) -> bool: ... + +class MutableSet(AbstractSet[_T], Generic[_T]): + @abstractmethod + def add(self, value: _T) -> None: ... + @abstractmethod + def discard(self, value: _T) -> None: ... + # Mixin methods + def clear(self) -> None: ... + def pop(self) -> _T: ... + def remove(self, value: _T) -> None: ... + def __ior__(self, s: AbstractSet[_S]) -> MutableSet[Union[_T, _S]]: ... + def __iand__(self, s: AbstractSet[Any]) -> MutableSet[_T]: ... + def __ixor__(self, s: AbstractSet[_S]) -> MutableSet[Union[_T, _S]]: ... + def __isub__(self, s: AbstractSet[Any]) -> MutableSet[_T]: ... + +class MappingView(Sized): + def __init__(self, mapping: Mapping[Any, Any]) -> None: ... # undocumented + def __len__(self) -> int: ... + +class ItemsView(MappingView, AbstractSet[Tuple[_KT_co, _VT_co]], Generic[_KT_co, _VT_co]): + def __init__(self, mapping: Mapping[_KT_co, _VT_co]) -> None: ... # undocumented + def __and__(self, o: Iterable[Any]) -> Set[Tuple[_KT_co, _VT_co]]: ... + def __rand__(self, o: Iterable[_T]) -> Set[_T]: ... + def __contains__(self, o: object) -> bool: ... + def __iter__(self) -> Iterator[Tuple[_KT_co, _VT_co]]: ... + if sys.version_info >= (3, 8): + def __reversed__(self) -> Iterator[Tuple[_KT_co, _VT_co]]: ... + def __or__(self, o: Iterable[_T]) -> Set[Union[Tuple[_KT_co, _VT_co], _T]]: ... + def __ror__(self, o: Iterable[_T]) -> Set[Union[Tuple[_KT_co, _VT_co], _T]]: ... + def __sub__(self, o: Iterable[Any]) -> Set[Tuple[_KT_co, _VT_co]]: ... + def __rsub__(self, o: Iterable[_T]) -> Set[_T]: ... + def __xor__(self, o: Iterable[_T]) -> Set[Union[Tuple[_KT_co, _VT_co], _T]]: ... + def __rxor__(self, o: Iterable[_T]) -> Set[Union[Tuple[_KT_co, _VT_co], _T]]: ... + +class KeysView(MappingView, AbstractSet[_KT_co], Generic[_KT_co]): + def __init__(self, mapping: Mapping[_KT_co, Any]) -> None: ... # undocumented + def __and__(self, o: Iterable[Any]) -> Set[_KT_co]: ... + def __rand__(self, o: Iterable[_T]) -> Set[_T]: ... + def __contains__(self, o: object) -> bool: ... + def __iter__(self) -> Iterator[_KT_co]: ... + if sys.version_info >= (3, 8): + def __reversed__(self) -> Iterator[_KT_co]: ... + def __or__(self, o: Iterable[_T]) -> Set[Union[_KT_co, _T]]: ... + def __ror__(self, o: Iterable[_T]) -> Set[Union[_KT_co, _T]]: ... + def __sub__(self, o: Iterable[Any]) -> Set[_KT_co]: ... + def __rsub__(self, o: Iterable[_T]) -> Set[_T]: ... + def __xor__(self, o: Iterable[_T]) -> Set[Union[_KT_co, _T]]: ... + def __rxor__(self, o: Iterable[_T]) -> Set[Union[_KT_co, _T]]: ... + +class ValuesView(MappingView, Iterable[_VT_co], Generic[_VT_co]): + def __init__(self, mapping: Mapping[Any, _VT_co]) -> None: ... # undocumented + def __contains__(self, o: object) -> bool: ... + def __iter__(self) -> Iterator[_VT_co]: ... + if sys.version_info >= (3, 8): + def __reversed__(self) -> Iterator[_VT_co]: ... + +@runtime_checkable +class ContextManager(Protocol[_T_co]): + def __enter__(self) -> _T_co: ... + def __exit__( + self, + __exc_type: Optional[Type[BaseException]], + __exc_value: Optional[BaseException], + __traceback: Optional[TracebackType], + ) -> Optional[bool]: ... + +@runtime_checkable +class AsyncContextManager(Protocol[_T_co]): + def __aenter__(self) -> Awaitable[_T_co]: ... + def __aexit__( + self, exc_type: Optional[Type[BaseException]], exc_value: Optional[BaseException], traceback: Optional[TracebackType] + ) -> Awaitable[Optional[bool]]: ... + +class Mapping(_Collection[_KT], Generic[_KT, _VT_co]): + # TODO: We wish the key type could also be covariant, but that doesn't work, + # see discussion in https: //github.com/python/typing/pull/273. + @abstractmethod + def __getitem__(self, k: _KT) -> _VT_co: ... + # Mixin methods + @overload + def get(self, key: _KT) -> Optional[_VT_co]: ... + @overload + def get(self, key: _KT, default: Union[_VT_co, _T]) -> Union[_VT_co, _T]: ... + def items(self) -> AbstractSet[Tuple[_KT, _VT_co]]: ... + def keys(self) -> AbstractSet[_KT]: ... + def values(self) -> ValuesView[_VT_co]: ... + def __contains__(self, o: object) -> bool: ... + +class MutableMapping(Mapping[_KT, _VT], Generic[_KT, _VT]): + @abstractmethod + def __setitem__(self, k: _KT, v: _VT) -> None: ... + @abstractmethod + def __delitem__(self, v: _KT) -> None: ... + def clear(self) -> None: ... + @overload + def pop(self, key: _KT) -> _VT: ... + @overload + def pop(self, key: _KT, default: Union[_VT, _T] = ...) -> Union[_VT, _T]: ... + def popitem(self) -> Tuple[_KT, _VT]: ... + def setdefault(self, key: _KT, default: _VT = ...) -> _VT: ... + # 'update' used to take a Union, but using overloading is better. + # The second overloaded type here is a bit too general, because + # Mapping[Tuple[_KT, _VT], W] is a subclass of Iterable[Tuple[_KT, _VT]], + # but will always have the behavior of the first overloaded type + # at runtime, leading to keys of a mix of types _KT and Tuple[_KT, _VT]. + # We don't currently have any way of forcing all Mappings to use + # the first overload, but by using overloading rather than a Union, + # mypy will commit to using the first overload when the argument is + # known to be a Mapping with unknown type parameters, which is closer + # to the behavior we want. See mypy issue #1430. + @overload + def update(self, __m: Mapping[_KT, _VT], **kwargs: _VT) -> None: ... + @overload + def update(self, __m: Iterable[Tuple[_KT, _VT]], **kwargs: _VT) -> None: ... + @overload + def update(self, **kwargs: _VT) -> None: ... + +Text = str + +TYPE_CHECKING = True + +class IO(Iterator[AnyStr], Generic[AnyStr]): + # TODO use abstract properties + @property + def mode(self) -> str: ... + @property + def name(self) -> str: ... + @abstractmethod + def close(self) -> None: ... + @property + def closed(self) -> bool: ... + @abstractmethod + def fileno(self) -> int: ... + @abstractmethod + def flush(self) -> None: ... + @abstractmethod + def isatty(self) -> bool: ... + @abstractmethod + def read(self, n: int = ...) -> AnyStr: ... + @abstractmethod + def readable(self) -> bool: ... + @abstractmethod + def readline(self, limit: int = ...) -> AnyStr: ... + @abstractmethod + def readlines(self, hint: int = ...) -> list[AnyStr]: ... + @abstractmethod + def seek(self, offset: int, whence: int = ...) -> int: ... + @abstractmethod + def seekable(self) -> bool: ... + @abstractmethod + def tell(self) -> int: ... + @abstractmethod + def truncate(self, size: Optional[int] = ...) -> int: ... + @abstractmethod + def writable(self) -> bool: ... + @abstractmethod + def write(self, s: AnyStr) -> int: ... + @abstractmethod + def writelines(self, lines: Iterable[AnyStr]) -> None: ... + @abstractmethod + def __next__(self) -> AnyStr: ... + @abstractmethod + def __iter__(self) -> Iterator[AnyStr]: ... + @abstractmethod + def __enter__(self) -> IO[AnyStr]: ... + @abstractmethod + def __exit__( + self, t: Optional[Type[BaseException]], value: Optional[BaseException], traceback: Optional[TracebackType] + ) -> Optional[bool]: ... + +class BinaryIO(IO[bytes]): + @abstractmethod + def __enter__(self) -> BinaryIO: ... + +class TextIO(IO[str]): + # TODO use abstractproperty + @property + def buffer(self) -> BinaryIO: ... + @property + def encoding(self) -> str: ... + @property + def errors(self) -> Optional[str]: ... + @property + def line_buffering(self) -> int: ... # int on PyPy, bool on CPython + @property + def newlines(self) -> Any: ... # None, str or tuple + @abstractmethod + def __enter__(self) -> TextIO: ... + +class ByteString(Sequence[int], metaclass=ABCMeta): ... + +class Match(Generic[AnyStr]): + pos: int + endpos: int + lastindex: Optional[int] + lastgroup: Optional[AnyStr] + string: AnyStr + + # The regular expression object whose match() or search() method produced + # this match instance. + re: Pattern[AnyStr] + def expand(self, template: AnyStr) -> AnyStr: ... + # group() returns "AnyStr" or "AnyStr | None", depending on the pattern. + @overload + def group(self, __group: _Literal[0] = ...) -> AnyStr: ... + @overload + def group(self, __group: str | int) -> AnyStr | Any: ... + @overload + def group(self, __group1: str | int, __group2: str | int, *groups: str | int) -> Tuple[AnyStr | Any, ...]: ... + # Each item of groups()'s return tuple is either "AnyStr" or + # "AnyStr | None", depending on the pattern. + @overload + def groups(self) -> Tuple[AnyStr | Any, ...]: ... + @overload + def groups(self, default: _T) -> Tuple[AnyStr | _T, ...]: ... + # Each value in groupdict()'s return dict is either "AnyStr" or + # "AnyStr | None", depending on the pattern. + @overload + def groupdict(self) -> dict[str, AnyStr | Any]: ... + @overload + def groupdict(self, default: _T) -> dict[str, AnyStr | _T]: ... + def start(self, __group: Union[int, str] = ...) -> int: ... + def end(self, __group: Union[int, str] = ...) -> int: ... + def span(self, __group: Union[int, str] = ...) -> Tuple[int, int]: ... + @property + def regs(self) -> Tuple[Tuple[int, int], ...]: ... # undocumented + # __getitem__() returns "AnyStr" or "AnyStr | None", depending on the pattern. + @overload + def __getitem__(self, __key: _Literal[0]) -> AnyStr: ... + @overload + def __getitem__(self, __key: int | str) -> AnyStr | Any: ... + if sys.version_info >= (3, 9): + def __class_getitem__(cls, item: Any) -> GenericAlias: ... + +class Pattern(Generic[AnyStr]): + flags: int + groupindex: Mapping[str, int] + groups: int + pattern: AnyStr + def search(self, string: AnyStr, pos: int = ..., endpos: int = ...) -> Optional[Match[AnyStr]]: ... + def match(self, string: AnyStr, pos: int = ..., endpos: int = ...) -> Optional[Match[AnyStr]]: ... + def fullmatch(self, string: AnyStr, pos: int = ..., endpos: int = ...) -> Optional[Match[AnyStr]]: ... + def split(self, string: AnyStr, maxsplit: int = ...) -> list[AnyStr]: ... + def findall(self, string: AnyStr, pos: int = ..., endpos: int = ...) -> list[Any]: ... + def finditer(self, string: AnyStr, pos: int = ..., endpos: int = ...) -> Iterator[Match[AnyStr]]: ... + @overload + def sub(self, repl: AnyStr, string: AnyStr, count: int = ...) -> AnyStr: ... + @overload + def sub(self, repl: Callable[[Match[AnyStr]], AnyStr], string: AnyStr, count: int = ...) -> AnyStr: ... + @overload + def subn(self, repl: AnyStr, string: AnyStr, count: int = ...) -> Tuple[AnyStr, int]: ... + @overload + def subn(self, repl: Callable[[Match[AnyStr]], AnyStr], string: AnyStr, count: int = ...) -> Tuple[AnyStr, int]: ... + if sys.version_info >= (3, 9): + def __class_getitem__(cls, item: Any) -> GenericAlias: ... + +# Functions + +if sys.version_info >= (3, 7): + _get_type_hints_obj_allowed_types = Union[ + object, + Callable[..., Any], + FunctionType, + BuiltinFunctionType, + MethodType, + ModuleType, + WrapperDescriptorType, + MethodWrapperType, + MethodDescriptorType, + ] +else: + _get_type_hints_obj_allowed_types = Union[ + object, Callable[..., Any], FunctionType, BuiltinFunctionType, MethodType, ModuleType, + ] + +if sys.version_info >= (3, 9): + def get_type_hints( + obj: _get_type_hints_obj_allowed_types, + globalns: Optional[Dict[str, Any]] = ..., + localns: Optional[Dict[str, Any]] = ..., + include_extras: bool = ..., + ) -> Dict[str, Any]: ... + +else: + def get_type_hints( + obj: _get_type_hints_obj_allowed_types, globalns: Optional[Dict[str, Any]] = ..., localns: Optional[Dict[str, Any]] = ... + ) -> Dict[str, Any]: ... + +if sys.version_info >= (3, 8): + def get_origin(tp: Any) -> Optional[Any]: ... + def get_args(tp: Any) -> Tuple[Any, ...]: ... + +@overload +def cast(typ: Type[_T], val: Any) -> _T: ... +@overload +def cast(typ: str, val: Any) -> Any: ... +@overload +def cast(typ: object, val: Any) -> Any: ... + +# Type constructors + +# NamedTuple is special-cased in the type checker +class NamedTuple(Tuple[Any, ...]): + _field_types: collections.OrderedDict[str, Type[Any]] + _field_defaults: Dict[str, Any] = ... + _fields: Tuple[str, ...] + _source: str + def __init__(self, typename: str, fields: Iterable[Tuple[str, Any]] = ..., **kwargs: Any) -> None: ... + @classmethod + def _make(cls: Type[_T], iterable: Iterable[Any]) -> _T: ... + if sys.version_info >= (3, 8): + def _asdict(self) -> Dict[str, Any]: ... + else: + def _asdict(self) -> collections.OrderedDict[str, Any]: ... + def _replace(self: _T, **kwargs: Any) -> _T: ... + +# Internal mypy fallback type for all typed dicts (does not exist at runtime) +class _TypedDict(Mapping[str, object], metaclass=ABCMeta): + def copy(self: _T) -> _T: ... + # Using NoReturn so that only calls using mypy plugin hook that specialize the signature + # can go through. + def setdefault(self, k: NoReturn, default: object) -> object: ... + # Mypy plugin hook for 'pop' expects that 'default' has a type variable type. + def pop(self, k: NoReturn, default: _T = ...) -> object: ... # type: ignore + def update(self: _T, __m: _T) -> None: ... + def __delitem__(self, k: NoReturn) -> None: ... + def items(self) -> ItemsView[str, object]: ... + def keys(self) -> KeysView[str]: ... + def values(self) -> ValuesView[object]: ... + def __or__(self: _T, __value: _T) -> _T: ... + def __ior__(self: _T, __value: _T) -> _T: ... + +def NewType(name: str, tp: Type[_T]) -> Type[_T]: ... + +# This itself is only available during type checking +def type_check_only(func_or_cls: _F) -> _F: ... + +if sys.version_info >= (3, 7): + class ForwardRef: + __forward_arg__: str + __forward_code__: CodeType + __forward_evaluated__: bool + __forward_value__: Optional[Any] + __forward_is_argument__: bool + def __init__(self, arg: str, is_argument: bool = ...) -> None: ... + def _evaluate(self, globalns: Optional[Dict[str, Any]], localns: Optional[Dict[str, Any]]) -> Optional[Any]: ... + def __eq__(self, other: Any) -> bool: ... + def __hash__(self) -> int: ... + def __repr__(self) -> str: ... + +if sys.version_info >= (3, 10): + def is_typeddict(tp: Any) -> bool: ... diff --git a/lang/pl/typeshed/stdlib/typing_extensions.pyi b/lang/pl/typeshed/stdlib/typing_extensions.pyi new file mode 100644 index 0000000..59fe3df --- /dev/null +++ b/lang/pl/typeshed/stdlib/typing_extensions.pyi @@ -0,0 +1,115 @@ +import abc +import sys +from typing import ( + TYPE_CHECKING as TYPE_CHECKING, + Any, + AsyncContextManager as AsyncContextManager, + AsyncGenerator as AsyncGenerator, + AsyncIterable as AsyncIterable, + AsyncIterator as AsyncIterator, + Awaitable as Awaitable, + Callable, + ChainMap as ChainMap, + ClassVar as ClassVar, + ContextManager as ContextManager, + Coroutine as Coroutine, + Counter as Counter, + DefaultDict as DefaultDict, + Deque as Deque, + ItemsView, + KeysView, + Mapping, + NewType as NewType, + NoReturn as NoReturn, + Text as Text, + Tuple, + Type as Type, + TypeVar, + ValuesView, + _Alias, + overload as overload, +) + +_T = TypeVar("_T") +_F = TypeVar("_F", bound=Callable[..., Any]) +_TC = TypeVar("_TC", bound=Type[object]) + +class _SpecialForm: + def __getitem__(self, typeargs: Any) -> Any: ... + +def runtime_checkable(cls: _TC) -> _TC: ... + +# This alias for above is kept here for backwards compatibility. +runtime = runtime_checkable +Protocol: _SpecialForm = ... +Final: _SpecialForm = ... + +def final(f: _F) -> _F: ... + +Literal: _SpecialForm = ... + +def IntVar(name: str) -> Any: ... # returns a new TypeVar + +# Internal mypy fallback type for all typed dicts (does not exist at runtime) +class _TypedDict(Mapping[str, object], metaclass=abc.ABCMeta): + def copy(self: _T) -> _T: ... + # Using NoReturn so that only calls using mypy plugin hook that specialize the signature + # can go through. + def setdefault(self, k: NoReturn, default: object) -> object: ... + # Mypy plugin hook for 'pop' expects that 'default' has a type variable type. + def pop(self, k: NoReturn, default: _T = ...) -> object: ... # type: ignore + def update(self: _T, __m: _T) -> None: ... + def items(self) -> ItemsView[str, object]: ... + def keys(self) -> KeysView[str]: ... + def values(self) -> ValuesView[object]: ... + def __delitem__(self, k: NoReturn) -> None: ... + +# TypedDict is a (non-subscriptable) special form. +TypedDict: object = ... + +OrderedDict = _Alias() + +def get_type_hints( + obj: Callable[..., Any], + globalns: dict[str, Any] | None = ..., + localns: dict[str, Any] | None = ..., + include_extras: bool = ..., +) -> dict[str, Any]: ... + +if sys.version_info >= (3, 7): + def get_args(tp: Any) -> Tuple[Any, ...]: ... + def get_origin(tp: Any) -> Any | None: ... + +Annotated: _SpecialForm = ... +_AnnotatedAlias: Any = ... # undocumented + +@runtime_checkable +class SupportsIndex(Protocol, metaclass=abc.ABCMeta): + @abc.abstractmethod + def __index__(self) -> int: ... + +# PEP 612 support for Python < 3.9 +if sys.version_info >= (3, 10): + from typing import Concatenate as Concatenate, ParamSpec as ParamSpec, TypeAlias as TypeAlias, TypeGuard as TypeGuard +else: + class ParamSpecArgs: + __origin__: ParamSpec + def __init__(self, origin: ParamSpec) -> None: ... + class ParamSpecKwargs: + __origin__: ParamSpec + def __init__(self, origin: ParamSpec) -> None: ... + class ParamSpec: + __name__: str + __bound__: Type[Any] | None + __covariant__: bool + __contravariant__: bool + def __init__( + self, name: str, *, bound: None | Type[Any] | str = ..., contravariant: bool = ..., covariant: bool = ... + ) -> None: ... + @property + def args(self) -> ParamSpecArgs: ... + @property + def kwargs(self) -> ParamSpecKwargs: ... + Concatenate: _SpecialForm = ... + TypeAlias: _SpecialForm = ... + TypeGuard: _SpecialForm = ... diff --git a/lang/pl/typeshed/stdlib/uarray.pyi b/lang/pl/typeshed/stdlib/uarray.pyi new file mode 100644 index 0000000..d1ba4d9 --- /dev/null +++ b/lang/pl/typeshed/stdlib/uarray.pyi @@ -0,0 +1 @@ +from array import * diff --git a/lang/pl/typeshed/stdlib/ucollections.pyi b/lang/pl/typeshed/stdlib/ucollections.pyi new file mode 100644 index 0000000..9400561 --- /dev/null +++ b/lang/pl/typeshed/stdlib/ucollections.pyi @@ -0,0 +1 @@ +from collections import * diff --git a/lang/pl/typeshed/stdlib/uerrno.pyi b/lang/pl/typeshed/stdlib/uerrno.pyi new file mode 100644 index 0000000..5ecb44d --- /dev/null +++ b/lang/pl/typeshed/stdlib/uerrno.pyi @@ -0,0 +1 @@ +from errno import * diff --git a/lang/pl/typeshed/stdlib/urandom.pyi b/lang/pl/typeshed/stdlib/urandom.pyi new file mode 100644 index 0000000..1c31bde --- /dev/null +++ b/lang/pl/typeshed/stdlib/urandom.pyi @@ -0,0 +1 @@ +from random import * diff --git a/lang/pl/typeshed/stdlib/ustruct.pyi b/lang/pl/typeshed/stdlib/ustruct.pyi new file mode 100644 index 0000000..ee3a9fc --- /dev/null +++ b/lang/pl/typeshed/stdlib/ustruct.pyi @@ -0,0 +1 @@ +from struct import * diff --git a/lang/pl/typeshed/stdlib/usys.pyi b/lang/pl/typeshed/stdlib/usys.pyi new file mode 100644 index 0000000..104052c --- /dev/null +++ b/lang/pl/typeshed/stdlib/usys.pyi @@ -0,0 +1 @@ +from sys import * diff --git a/lang/pl/typeshed/stdlib/utime.pyi b/lang/pl/typeshed/stdlib/utime.pyi new file mode 100644 index 0000000..72705db --- /dev/null +++ b/lang/pl/typeshed/stdlib/utime.pyi @@ -0,0 +1 @@ +from time import * diff --git a/lang/zh-cn/typeshed/stdlib/microbit/spi.pyi b/lang/zh-cn/typeshed/stdlib/microbit/spi.pyi index eadfc2f..bbca0c1 100644 --- a/lang/zh-cn/typeshed/stdlib/microbit/spi.pyi +++ b/lang/zh-cn/typeshed/stdlib/microbit/spi.pyi @@ -17,12 +17,13 @@ For correct communication, the parameters have to be the same on both communicat :param miso: (MISO) MISO引脚(默认值14)""" ... -def read(nbytes: int) -> bytes: - """读取字节。 (读取) +def read(nbytes: int, out: int=0) -> bytes: + """读取字节数。 (读取) Example: ``spi.read(64)`` :param nbytes: (字节数) 要读取的最大字节数。 +:param out: (写出) The byte value to write (default 0). :return: The bytes read.""" ... diff --git a/lang/zh-tw/typeshed/stdlib/microbit/spi.pyi b/lang/zh-tw/typeshed/stdlib/microbit/spi.pyi index 94182e6..34e5f08 100644 --- a/lang/zh-tw/typeshed/stdlib/microbit/spi.pyi +++ b/lang/zh-tw/typeshed/stdlib/microbit/spi.pyi @@ -17,12 +17,13 @@ For correct communication, the parameters have to be the same on both communicat :param miso: miso 引腳 (預設 14)""" ... -def read(nbytes: int) -> bytes: +def read(nbytes: int, out: int=0) -> bytes: """讀取位元組。 Example: ``spi.read(64)`` :param nbytes: 要讀取的最大位元組數。 +:param out: The byte value to write (default 0). :return: The bytes read.""" ... diff --git a/scripts/build-translations.sh b/scripts/build-translations.sh index 21bebeb..2d7b383 100755 --- a/scripts/build-translations.sh +++ b/scripts/build-translations.sh @@ -5,7 +5,7 @@ set -euxo pipefail -languages="ca de fr es-ES ja ko nl zh-CN zh-TW lol" +languages="ca de fr es-ES ja ko nl pl zh-CN zh-TW lol" for language in $languages; do lower="${language,,}" @@ -13,4 +13,4 @@ for language in $languages; do cp -r lang/en "lang/${lower}" done npm run i18n:typeshed-to-crowdin -npm run i18n:crowdin-to-typeshed \ No newline at end of file +npm run i18n:crowdin-to-typeshed