pybricks.common.Keypad: Add typing.

This commit is contained in:
Laurens Valk
2022-05-28 11:20:07 +02:00
parent a02b283f3f
commit 3548ff47ce
2 changed files with 5 additions and 7 deletions
+5 -4
View File
@@ -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
-3
View File
@@ -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: ...