doc/ev3devices, pupdevices: do not inherit Motor

Just import it. Otherwise, Sphinx does not pick up autoattribute docstrings.
This commit is contained in:
Laurens Valk
2020-01-28 17:58:54 +01:00
parent 4ed787240e
commit e73945d9c5
2 changed files with 5 additions and 27 deletions
+4 -12
View File
@@ -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.
"""
+1 -15
View File
@@ -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():