pybricks: Indexing fixes.

The noindex made them not show up. Also fix misc related indexing issues.
This commit is contained in:
Laurens Valk
2026-06-01 16:26:24 +02:00
parent 89e5bde8e7
commit 7409057b9c
8 changed files with 17 additions and 37 deletions
+2 -4
View File
@@ -14,14 +14,12 @@ automatically detect the motor and use the correct and safe settings.
:width: 40 %
.. autoclass:: pybricks.iodevices.DCMotor
:noindex:
:no-members:
.. automethod:: pybricks.iodevices.DCMotor.dc
:noindex:
.. automethod:: pybricks.iodevices.DCMotor.brake
:noindex:
.. automethod:: pybricks.iodevices.DCMotor.stop
:noindex:
.. automethod:: pybricks.iodevices.DCMotor.settings
-1
View File
@@ -54,7 +54,6 @@ This section lists all available exceptions in alphabetical order.
.. _OSError:
.. autoclass:: ubuiltins.OSError
:noindex:
.. autoclass:: ubuiltins.OverflowError
:no-members:
+9
View File
@@ -6,5 +6,14 @@ Axis
.. autoclass:: pybricks.parameters.Axis
:no-members:
.. autoattribute:: pybricks.parameters.Axis.X
:annotation: = vector(1, 0, 0)
.. autoattribute:: pybricks.parameters.Axis.Y
:annotation: = vector(0, 1, 0)
.. autoattribute:: pybricks.parameters.Axis.Z
:annotation: = vector(0, 0, 1)
On Move Hub, doing math with these vectors is not supported. The axes can still
be used to set up the hub orientation.
-4
View File
@@ -21,20 +21,16 @@ Motors without rotation sensors
.. blockimg:: pybricks_blockMotorDuty_DCMotor
.. automethod:: pybricks.pupdevices.DCMotor.dc
:noindex:
.. blockimg:: pybricks_blockMotorStop_DCMotor_coast
.. automethod:: pybricks.pupdevices.DCMotor.stop
:noindex:
.. blockimg:: pybricks_blockMotorStop_DCMotor_brake
.. automethod:: pybricks.pupdevices.DCMotor.brake
:noindex:
.. automethod:: pybricks.pupdevices.DCMotor.settings
:noindex:
Examples
-------------------
-4
View File
@@ -21,23 +21,19 @@ and ambient conditions.
.. blockimg:: pybricks_variables_set_pf_motor
.. autoclass:: pybricks.pupdevices.PFMotor
:noindex:
:no-members:
.. blockimg:: pybricks_blockMotorDuty_PFMotor
.. automethod:: pybricks.pupdevices.PFMotor.dc
:noindex:
.. blockimg:: pybricks_blockMotorStop_PFMotor_coast
.. automethod:: pybricks.pupdevices.PFMotor.stop
:noindex:
.. blockimg:: pybricks_blockMotorStop_PFMotor_brake
.. automethod:: pybricks.pupdevices.PFMotor.brake
:noindex:
Examples
-------------------
+3 -2
View File
@@ -984,12 +984,13 @@ METHOD_PARAMS = [
pytest.param(
"pybricks.robotics",
"DriveBase",
"curve",
"arc",
[
(
[
"radius: Number",
"angle: Number",
"angle: Number=None",
"distance: Number=None",
"then: Stop=Stop.HOLD",
"wait: bool=True",
],
+3 -7
View File
@@ -58,16 +58,12 @@ class _PybricksEnum(Enum, metaclass=_PybricksEnumMeta):
class Axis:
"""Unit axes of a coordinate system.
.. data:: X = vector(1, 0, 0)
.. data:: Y = vector(0, 1, 0)
.. data:: Z = vector(0, 0, 1)
"""
"""Unit axes of a coordinate system."""
X: _Matrix = _vector(1, 0, 0)
Y: _Matrix = _vector(0, 1, 0)
Z: _Matrix = _vector(0, 0, 1)
-15
View File
@@ -265,21 +265,6 @@ class DriveBase:
radius cannot be zero. Use :meth:`.turn` for in-place turns.
"""
def curve(
self, radius: Number, angle: Number, then: Stop = Stop.HOLD, wait: bool = True
) -> MaybeAwaitable:
"""curve(radius, angle, then=Stop.HOLD, wait=True)
Drives an arc along a circle of a given radius, by a given angle.
Arguments:
radius (Number, mm): Radius of the circle.
angle (Number, deg): Angle along the circle.
then (Stop): What to do after coming to a standstill.
wait (bool): Wait for the maneuver to complete before continuing
with the rest of the program.
"""
def done(self) -> bool:
"""done() -> bool