From 3548ff47ce28a3f7df7a99e00ea9dcf6182aa7cc Mon Sep 17 00:00:00 2001 From: Laurens Valk Date: Sat, 28 May 2022 11:20:07 +0200 Subject: [PATCH] pybricks.common.Keypad: Add typing. --- src/pybricks/_common.py | 9 +++++---- src/pybricks/_common.pyi | 3 --- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/pybricks/_common.py b/src/pybricks/_common.py index 9fbd7f3..44eee68 100644 --- a/src/pybricks/_common.py +++ b/src/pybricks/_common.py @@ -779,12 +779,13 @@ class Keypad: def __init__(self, active_buttons): pass - def pressed(self): - """Checks which buttons are currently pressed. + def pressed(self) -> Tuple[Button]: + """pressed() -> Tuple[Button] - :returns: Tuple of pressed buttons. - :rtype: Tuple of :class:`Button` + Checks which buttons are currently pressed. + Returns: + Tuple of pressed buttons. """ pass diff --git a/src/pybricks/_common.pyi b/src/pybricks/_common.pyi index aadbfcc..1fa6330 100644 --- a/src/pybricks/_common.pyi +++ b/src/pybricks/_common.pyi @@ -6,9 +6,6 @@ from typing import Collection, Iterable, Optional, Tuple, Union, overload from .geometry import Axis, Matrix, vector from .parameters import Button, Color, Direction, Side, Stop, Port -class Keypad: - def pressed(self) -> Tuple[Button]: ... - class Battery: def voltage(self) -> int: ... def current(self) -> int: ...