From 92e3735d63584e490882526ebe146402a503f8fd Mon Sep 17 00:00:00 2001 From: Laurens Valk Date: Mon, 3 Jun 2019 15:22:57 +0200 Subject: [PATCH] drop class method identifier from docs For example, this changes classmethod sound.beeps(number) Description into sound.beeps(number) Description --- pybricks/_common.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/pybricks/_common.py b/pybricks/_common.py index a9e623b..ab2667e 100644 --- a/pybricks/_common.py +++ b/pybricks/_common.py @@ -211,10 +211,12 @@ class Motor(): class Display(): """Show images or text on a display.""" + @staticmethod def clear(self): """Clear everything on the display.""" pass + @staticmethod def text(self, text, coordinate=None): """Display text. @@ -225,6 +227,7 @@ class Display(): """ pass + @staticmethod def image(self, file_name, alignment=Align.CENTER, coordinate=None, clear=True): """image(file_name, alignment=Align.CENTER, coordinate=None, clear=True) @@ -245,6 +248,7 @@ class Display(): class Speaker(): """Play beeps and sound files using a speaker.""" + @staticmethod def beep(self, frequency=500, duration=100, volume=30): """Play a beep/tone. @@ -255,6 +259,7 @@ class Speaker(): """ pass + @staticmethod def beeps(self, number): """Play a number of default beeps with a brief pause in between. @@ -264,6 +269,7 @@ class Speaker(): """ pass + @staticmethod def file(self, file_name, volume=100): """Play a sound file. @@ -279,14 +285,17 @@ class Speaker(): class Light(): """Control an LED.""" + @staticmethod def on(self): """Turn on the light at maximum brightness.""" pass + @staticmethod def off(self): """Turn off the light.""" pass + @staticmethod def brightness(self, brightness): """Set the perceived brightness of the light. @@ -299,6 +308,7 @@ class Light(): class ColorLight(): """Control an RGB LED.""" + @staticmethod def color(color): """Turn on the light at the specified color. @@ -307,10 +317,12 @@ class ColorLight(): """ pass + @staticmethod def off(self): """Turn off the light.""" pass + @staticmethod def brightness(self, red, green, blue): """Set the perceived brightness of the red, green, and blue light. @@ -324,6 +336,7 @@ class ColorLight(): class Battery(): """Get the status of a battery.""" + @staticmethod def voltage(self): """Get the voltage of the battery. @@ -332,6 +345,7 @@ class Battery(): """ pass + @staticmethod def current(self): """Get the current supplied by the battery.