Skip to content

Commit 7409057

Browse files
committed
pybricks: Indexing fixes.
The noindex made them not show up. Also fix misc related indexing issues.
1 parent 89e5bde commit 7409057

8 files changed

Lines changed: 17 additions & 37 deletions

File tree

doc/main/iodevices/dcmotor.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,12 @@ automatically detect the motor and use the correct and safe settings.
1414
:width: 40 %
1515

1616
.. autoclass:: pybricks.iodevices.DCMotor
17-
:noindex:
1817
:no-members:
1918

2019
.. automethod:: pybricks.iodevices.DCMotor.dc
21-
:noindex:
2220

2321
.. automethod:: pybricks.iodevices.DCMotor.brake
24-
:noindex:
2522

2623
.. automethod:: pybricks.iodevices.DCMotor.stop
27-
:noindex:
24+
25+
.. automethod:: pybricks.iodevices.DCMotor.settings

doc/main/micropython/exceptions.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ This section lists all available exceptions in alphabetical order.
5454
.. _OSError:
5555

5656
.. autoclass:: ubuiltins.OSError
57-
:noindex:
5857

5958
.. autoclass:: ubuiltins.OverflowError
6059
:no-members:

doc/main/parameters/axis.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,14 @@ Axis
66
.. autoclass:: pybricks.parameters.Axis
77
:no-members:
88

9+
.. autoattribute:: pybricks.parameters.Axis.X
10+
:annotation: = vector(1, 0, 0)
11+
12+
.. autoattribute:: pybricks.parameters.Axis.Y
13+
:annotation: = vector(0, 1, 0)
14+
15+
.. autoattribute:: pybricks.parameters.Axis.Z
16+
:annotation: = vector(0, 0, 1)
17+
918
On Move Hub, doing math with these vectors is not supported. The axes can still
1019
be used to set up the hub orientation.

doc/main/pupdevices/dcmotor.rst

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,16 @@ Motors without rotation sensors
2121
.. blockimg:: pybricks_blockMotorDuty_DCMotor
2222

2323
.. automethod:: pybricks.pupdevices.DCMotor.dc
24-
:noindex:
2524

2625
.. blockimg:: pybricks_blockMotorStop_DCMotor_coast
2726

2827
.. automethod:: pybricks.pupdevices.DCMotor.stop
29-
:noindex:
3028

3129
.. blockimg:: pybricks_blockMotorStop_DCMotor_brake
3230

3331
.. automethod:: pybricks.pupdevices.DCMotor.brake
34-
:noindex:
3532

3633
.. automethod:: pybricks.pupdevices.DCMotor.settings
37-
:noindex:
3834

3935
Examples
4036
-------------------

doc/main/pupdevices/pfmotor.rst

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,23 +21,19 @@ and ambient conditions.
2121
.. blockimg:: pybricks_variables_set_pf_motor
2222

2323
.. autoclass:: pybricks.pupdevices.PFMotor
24-
:noindex:
2524
:no-members:
2625

2726
.. blockimg:: pybricks_blockMotorDuty_PFMotor
2827

2928
.. automethod:: pybricks.pupdevices.PFMotor.dc
30-
:noindex:
3129

3230
.. blockimg:: pybricks_blockMotorStop_PFMotor_coast
3331

3432
.. automethod:: pybricks.pupdevices.PFMotor.stop
35-
:noindex:
3633

3734
.. blockimg:: pybricks_blockMotorStop_PFMotor_brake
3835

3936
.. automethod:: pybricks.pupdevices.PFMotor.brake
40-
:noindex:
4137

4238
Examples
4339
-------------------

jedi/tests/test_get_signature.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -984,12 +984,13 @@ def _get_method_signature(module: str, type: str, method: str) -> SignatureHelp:
984984
pytest.param(
985985
"pybricks.robotics",
986986
"DriveBase",
987-
"curve",
987+
"arc",
988988
[
989989
(
990990
[
991991
"radius: Number",
992-
"angle: Number",
992+
"angle: Number=None",
993+
"distance: Number=None",
993994
"then: Stop=Stop.HOLD",
994995
"wait: bool=True",
995996
],

src/pybricks/parameters.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -58,16 +58,12 @@ def __repr__(self):
5858

5959

6060
class Axis:
61-
"""Unit axes of a coordinate system.
62-
63-
.. data:: X = vector(1, 0, 0)
64-
.. data:: Y = vector(0, 1, 0)
65-
.. data:: Z = vector(0, 0, 1)
66-
67-
"""
61+
"""Unit axes of a coordinate system."""
6862

6963
X: _Matrix = _vector(1, 0, 0)
64+
7065
Y: _Matrix = _vector(0, 1, 0)
66+
7167
Z: _Matrix = _vector(0, 0, 1)
7268

7369

src/pybricks/robotics.py

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -265,21 +265,6 @@ def arc(
265265
radius cannot be zero. Use :meth:`.turn` for in-place turns.
266266
"""
267267

268-
def curve(
269-
self, radius: Number, angle: Number, then: Stop = Stop.HOLD, wait: bool = True
270-
) -> MaybeAwaitable:
271-
"""curve(radius, angle, then=Stop.HOLD, wait=True)
272-
273-
Drives an arc along a circle of a given radius, by a given angle.
274-
275-
Arguments:
276-
radius (Number, mm): Radius of the circle.
277-
angle (Number, deg): Angle along the circle.
278-
then (Stop): What to do after coming to a standstill.
279-
wait (bool): Wait for the maneuver to complete before continuing
280-
with the rest of the program.
281-
"""
282-
283268
def done(self) -> bool:
284269
"""done() -> bool
285270

0 commit comments

Comments
 (0)