Skip to content

Commit 022afab

Browse files
committed
pybricks.robotics: add type hint for curve()
This method was added in 30803fc.
1 parent ce17123 commit 022afab

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

src/pybricks/robotics.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# SPDX-License-Identifier: MIT
2-
# Copyright (c) 2018-2020 The Pybricks Authors
2+
# Copyright (c) 2018-2021 The Pybricks Authors
33

44
"""Robotics module for the Pybricks API."""
55

@@ -100,8 +100,9 @@ def reset(self):
100100
"""Resets the estimated driven distance and angle to 0."""
101101
pass
102102

103-
def settings(self, straight_speed, straight_acceleration, turn_rate,
104-
turn_acceleration):
103+
def settings(
104+
self, straight_speed, straight_acceleration, turn_rate, turn_acceleration
105+
):
105106
"""Configures the speed and acceleration used
106107
by :meth:`.straight`, :meth:`.turn`, and :meth:`.curve`.
107108

src/pybricks/robotics.pyi

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
# SPDX-License-Identifier: MIT
2-
# Copyright (c) 2020 The Pybricks Authors
2+
# Copyright (c) 2020-2021 The Pybricks Authors
33

44
from typing import Optional, Tuple, overload, Union
5+
56
from ._common import Control, Motor
7+
from .parameters import Stop
68

79
class DriveBase:
810
distance_control: Control
@@ -32,3 +34,6 @@ class DriveBase:
3234
) -> None: ...
3335
def straight(self, distance: int) -> None: ...
3436
def turn(self, angle: int) -> None: ...
37+
def curve(
38+
self, radius: int, angle: int, then: Stop = Stop.HOLD, wait: bool = True
39+
) -> None: ...

0 commit comments

Comments
 (0)