mirror of
https://github.com/pybricks/pybricks-api.git
synced 2026-09-11 17:14:41 +00:00
api: rename _common to builtins
Because this module describes devices that can be built into a hub or other device. Since this design is now explicitly shown in the docs as well, we don't need to hide this module in the package.
This commit is contained in:
@@ -6,7 +6,7 @@ verify_ssl = true
|
||||
[dev-packages]
|
||||
sphinx = "*"
|
||||
flake8 = "*"
|
||||
sphinx-rtd-theme = "~=0.4.0"
|
||||
sphinx-rtd-theme = "==0.4.2"
|
||||
doc8 = "*"
|
||||
|
||||
[packages]
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
"""Sphinx workaround to document instance attributes such as self.light"""
|
||||
|
||||
from ._common import Speaker, Display, Battery, ColorLight, KeyPad, LightArray
|
||||
from .builtins import Speaker, Display, Battery, ColorLight, KeyPad, LightArray
|
||||
|
||||
from types import ModuleType
|
||||
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
"""LEGO® Power Functions 2.0 City Hub."""
|
||||
|
||||
from ._common import Battery, ColorLight
|
||||
from .builtins import Battery, ColorLight
|
||||
|
||||
battery = Battery()
|
||||
light = ColorLight()
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
"""LEGO® MINDSTORMS® EV3 Brick."""
|
||||
|
||||
from ._common import Speaker, Display, Battery, ColorLight, KeyPad
|
||||
from .builtins import Speaker, Display, Battery, ColorLight, KeyPad
|
||||
|
||||
sound = Speaker()
|
||||
display = Display()
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
"""LEGO® MINDSTORMS® EV3 motors and sensors."""
|
||||
|
||||
from .parameters import Direction
|
||||
from ._common import Motor as CommonMotor
|
||||
from .builtins import Motor as CommonMotor
|
||||
|
||||
|
||||
class Motor(CommonMotor):
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
"""LEGO® Programmable Hubs."""
|
||||
from enum import Enum
|
||||
from ._common import Speaker, Display, Battery, ColorLight, KeyPad
|
||||
from .builtins import Speaker, Display, Battery, ColorLight, KeyPad
|
||||
|
||||
class EV3Brick():
|
||||
"""LEGO® MINDSTORMS® EV3 Brick.
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
"""LEGO® Power Functions 2.0 motor, sensors, and lights."""
|
||||
|
||||
from ._common import Motor as CommonMotor, ColorLight
|
||||
from .builtins import Motor as CommonMotor, ColorLight
|
||||
|
||||
from ._common import KeyPad, Accelerometer
|
||||
from .builtins import KeyPad, Accelerometer
|
||||
# The above abviously needs fixing (but not until after fixing merge conflict)
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
"""LEGO® Power Functions 2.0 Move Hub."""
|
||||
|
||||
from ._common import Battery, ColorLight
|
||||
from .builtins import Battery, ColorLight
|
||||
|
||||
battery = Battery()
|
||||
light = ColorLight()
|
||||
|
||||
Reference in New Issue
Block a user