pybricks.common.Control: Fix docstring and type hints for limits().

Fixes https://github.com/pybricks/support/issues/565
This commit is contained in:
Laurens Valk
2021-12-30 09:12:27 +01:00
parent 1259d5d33a
commit d806fe9fbe
2 changed files with 4 additions and 3 deletions
+1 -1
View File
@@ -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.
+3 -2
View File
@@ -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