From 506c92f533fa54c7683cb9b2036664a8a6ac8611 Mon Sep 17 00:00:00 2001 From: Grace Date: Wed, 20 Mar 2024 09:45:12 +0000 Subject: [PATCH] Add `get_touches` method docs --- lang/en/typeshed/stdlib/microbit/__init__.pyi | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lang/en/typeshed/stdlib/microbit/__init__.pyi b/lang/en/typeshed/stdlib/microbit/__init__.pyi index 163df7f..08ed2d1 100644 --- a/lang/en/typeshed/stdlib/microbit/__init__.pyi +++ b/lang/en/typeshed/stdlib/microbit/__init__.pyi @@ -290,6 +290,15 @@ class MicroBitTouchPin(MicroBitAnalogDigitalPin): :return: ``True`` or ``False`` to indicate if the pin was touched since the device started or since the last time this method was called. """ ... + + def get_touches(self) -> int: + """Get the number of times the pin was touched since the last time this method was called. + + Example: ``pin0.get_touches()`` + + :return: the number of times the pin was touched since the device started or since the last time this method was called. + """ + ... def set_touch_mode(self, value: int) -> None: """Set the touch mode for the pin.