From d806fe9fbe3a2265fa2b360ada9022086d15a010 Mon Sep 17 00:00:00 2001 From: Laurens Valk Date: Thu, 30 Dec 2021 09:12:17 +0100 Subject: [PATCH] pybricks.common.Control: Fix docstring and type hints for limits(). Fixes https://github.com/pybricks/support/issues/565 --- src/pybricks/_common.py | 2 +- src/pybricks/_common.pyi | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/pybricks/_common.py b/src/pybricks/_common.py index 6dc0034..e9d0e5b 100644 --- a/src/pybricks/_common.py +++ b/src/pybricks/_common.py @@ -110,7 +110,7 @@ class Control: """ def limits(self, speed, acceleration, torque): - """Configures the maximum speed, acceleration, duty, and torque. + """Configures the maximum speed, acceleration, and torque. If no arguments are given, this will return the current values. diff --git a/src/pybricks/_common.pyi b/src/pybricks/_common.pyi index 3479f3f..5c4ab78 100644 --- a/src/pybricks/_common.pyi +++ b/src/pybricks/_common.pyi @@ -23,15 +23,16 @@ class Control: self, speed: Optional[int] = None, acceleration: Optional[int] = None, - actuation: Optional[int] = None, + torque: Optional[int] = None, ) -> None: ... - def pid(self) -> Tuple[int, int, int, int, int, int]: ... + def pid(self) -> Tuple[int, int, int, None, int]: ... @overload def pid( self, kp: Optional[int] = None, ki: Optional[int] = None, kd: Optional[int] = None, + reserved: Optional[int] = None, integral_rate: Optional[int] = None, ) -> None: ... @overload