diff --git a/doc/main/iodevices/dcmotor.rst b/doc/main/iodevices/dcmotor.rst index 0411db0..f807337 100644 --- a/doc/main/iodevices/dcmotor.rst +++ b/doc/main/iodevices/dcmotor.rst @@ -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 diff --git a/doc/main/micropython/exceptions.rst b/doc/main/micropython/exceptions.rst index 173824c..d7dc6c6 100644 --- a/doc/main/micropython/exceptions.rst +++ b/doc/main/micropython/exceptions.rst @@ -54,7 +54,6 @@ This section lists all available exceptions in alphabetical order. .. _OSError: .. autoclass:: ubuiltins.OSError - :noindex: .. autoclass:: ubuiltins.OverflowError :no-members: diff --git a/doc/main/parameters/axis.rst b/doc/main/parameters/axis.rst index 42f1246..62ddf84 100644 --- a/doc/main/parameters/axis.rst +++ b/doc/main/parameters/axis.rst @@ -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. diff --git a/doc/main/pupdevices/dcmotor.rst b/doc/main/pupdevices/dcmotor.rst index 58f776d..20c47ad 100644 --- a/doc/main/pupdevices/dcmotor.rst +++ b/doc/main/pupdevices/dcmotor.rst @@ -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 ------------------- diff --git a/doc/main/pupdevices/pfmotor.rst b/doc/main/pupdevices/pfmotor.rst index 2e39602..e022621 100644 --- a/doc/main/pupdevices/pfmotor.rst +++ b/doc/main/pupdevices/pfmotor.rst @@ -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 ------------------- diff --git a/jedi/tests/test_get_signature.py b/jedi/tests/test_get_signature.py index a3c3991..089fcbf 100644 --- a/jedi/tests/test_get_signature.py +++ b/jedi/tests/test_get_signature.py @@ -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", ], diff --git a/src/pybricks/parameters.py b/src/pybricks/parameters.py index ee9ca6d..1e25592 100644 --- a/src/pybricks/parameters.py +++ b/src/pybricks/parameters.py @@ -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) diff --git a/src/pybricks/robotics.py b/src/pybricks/robotics.py index 22eada6..f3e4601 100644 --- a/src/pybricks/robotics.py +++ b/src/pybricks/robotics.py @@ -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