Skip to content

Commit 0790d55

Browse files
author
BiffoBear
committed
Removed extra copy of doc string from color property.
1 parent 962c75c commit 0790d55

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

adafruit_rgbled.py

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ class RGBLED:
8686
import adafruit_rgbled
8787
with adafruit_rgbled.RGBLED(board.D5, board.D6, board.D7, invert_pwm=True) as rgb_led:
8888
rgb_led.color = (0, 255, 0)
89-
9089
"""
9190

9291
def __init__(
@@ -135,21 +134,18 @@ def deinit(self) -> None:
135134

136135
@property
137136
def color(self) -> Union[int, tuple]:
138-
"""Return the RGB LED's current color.
139-
140-
:return Union[int, tuple]: The currently set color.
141137
"""
142-
return self._current_color
143-
144-
@color.setter
145-
def color(self, value: Union[int, tuple]):
146-
"""Sets the RGB LED to a desired color.
138+
Sets the RGB LED to a desired color.
147139
:param Union[int, tuple] value: RGB LED desired value - can be a RGB tuple of values
148140
0 - 255 or a 24-bit integer. e.g. (255, 64, 35) and 0xff4023 are equivalent.
149141
150142
:raises ValueError: If the input is an int > 0xffffff.
151143
:raises TypeError: If the input is not an integer or a tuple.
152144
"""
145+
return self._current_color
146+
147+
@color.setter
148+
def color(self, value: Union[int, tuple]):
153149
self._current_color = value
154150
if isinstance(value, tuple):
155151
for i in range(0, 3):

0 commit comments

Comments
 (0)