pybricks.robotics: add type hint for curve()

This method was added in 30803fc.
This commit is contained in:
David Lechner
2021-12-16 15:33:00 -06:00
parent ce17123325
commit 022afabd30
2 changed files with 10 additions and 4 deletions
+4 -3
View File
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: MIT
# Copyright (c) 2018-2020 The Pybricks Authors
# Copyright (c) 2018-2021 The Pybricks Authors
"""Robotics module for the Pybricks API."""
@@ -100,8 +100,9 @@ class DriveBase:
"""Resets the estimated driven distance and angle to 0."""
pass
def settings(self, straight_speed, straight_acceleration, turn_rate,
turn_acceleration):
def settings(
self, straight_speed, straight_acceleration, turn_rate, turn_acceleration
):
"""Configures the speed and acceleration used
by :meth:`.straight`, :meth:`.turn`, and :meth:`.curve`.
+6 -1
View File
@@ -1,8 +1,10 @@
# SPDX-License-Identifier: MIT
# Copyright (c) 2020 The Pybricks Authors
# Copyright (c) 2020-2021 The Pybricks Authors
from typing import Optional, Tuple, overload, Union
from ._common import Control, Motor
from .parameters import Stop
class DriveBase:
distance_control: Control
@@ -32,3 +34,6 @@ class DriveBase:
) -> None: ...
def straight(self, distance: int) -> None: ...
def turn(self, angle: int) -> None: ...
def curve(
self, radius: int, angle: int, then: Stop = Stop.HOLD, wait: bool = True
) -> None: ...