From e73945d9c583b7501eac8761d7408a2abe45fd52 Mon Sep 17 00:00:00 2001 From: Laurens Valk Date: Tue, 28 Jan 2020 17:58:54 +0100 Subject: [PATCH] doc/ev3devices, pupdevices: do not inherit Motor Just import it. Otherwise, Sphinx does not pick up autoattribute docstrings. --- pybricks/ev3devices.py | 16 ++++------------ pybricks/pupdevices.py | 16 +--------------- 2 files changed, 5 insertions(+), 27 deletions(-) diff --git a/pybricks/ev3devices.py b/pybricks/ev3devices.py index 39b47cb..3e8c389 100644 --- a/pybricks/ev3devices.py +++ b/pybricks/ev3devices.py @@ -1,18 +1,7 @@ """LEGO® MINDSTORMS® EV3 motors and sensors.""" from .parameters import Direction -from .builtins import Motor as CommonMotor - - -class Motor(CommonMotor): - """LEGO® MINDSTORMS® EV3 Medium or Large Motor. - - Element 99455/6148292 or 95658/6148278, contained in: - - * 31313: LEGO® MINDSTORMS® EV3 (2013) - * 45544: LEGO® MINDSTORMS® Education EV3 Core Set (2013) - * 45503 or 45502: Separate part (2013) - """ +from .builtins import Motor class TouchSensor(): @@ -222,6 +211,9 @@ class GyroSensor(): def reset_angle(self, angle): """Set the rotation angle of the sensor to a desired value. + If you don't specify an angle, the absolute value will be used if + available. + Arguments: angle (:ref:`angle`): Value to which the angle should be reset. """ diff --git a/pybricks/pupdevices.py b/pybricks/pupdevices.py index 086397b..0984298 100644 --- a/pybricks/pupdevices.py +++ b/pybricks/pupdevices.py @@ -1,21 +1,7 @@ """LEGO® Powered Up motor, sensors, and lights.""" from .builtins import KeyPad, Accelerometer, ColorLight -from .builtins import Motor as CommonMotor - - -class Motor(CommonMotor): - """LEGO® Powered Up Motors""" - - def reset_angle(self, angle): - """Reset the accumulated rotation angle of the motor. - - Arguments: - angle (:ref:`angle`): Value to which the angle should be reset. If - you don't specify an angle, the absolute - value will be used if the motor supports it. - """ - pass +from .builtins import Motor class RemoteControl():