Skip to content

Commit d6f6b27

Browse files
author
BiffoBear
committed
Moved doc-string from __init__ to class definition.
1 parent 715c977 commit d6f6b27

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

adafruit_rgbled.py

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,15 @@ class RGBLED:
8181
import adafruit_rgbled
8282
with adafruit_rgbled.RGBLED(board.D5, board.D6, board.D7, invert_pwm=True) as rgb_led:
8383
rgb_led.color = (0, 255, 0)
84+
85+
:param Union["microcontroller.Pin", PWMOut, "PWMChannel"] red_pin:
86+
The connection to the red LED.
87+
:param Union["microcontroller.Pin", PWMOut, "PWMChannel"] green_pin:
88+
The connection to the green LED.
89+
:param Union["microcontroller.Pin", PWMOut, "PWMChannel"] blue_pin:
90+
The connection to the blue LED.
91+
:param bool invert_pwm: False if the RGB LED is common cathode,
92+
True if the RGB LED is common anode. Defaults to False.
8493
"""
8594

8695
def __init__(
@@ -90,16 +99,6 @@ def __init__(
9099
blue_pin: Union["microcontroller.Pin", PWMOut, "PWMChannel"],
91100
invert_pwm: bool = False,
92101
) -> None:
93-
"""
94-
:param Union["microcontroller.Pin", PWMOut, "PWMChannel"] red_pin:
95-
The connection to the red LED.
96-
:param Union["microcontroller.Pin", PWMOut, "PWMChannel"] green_pin:
97-
The connection to the green LED.
98-
:param Union["microcontroller.Pin", PWMOut, "PWMChannel"] blue_pin:
99-
The connection to the blue LED.
100-
:param bool invert_pwm: False if the RGB LED is common cathode,
101-
True if the RGB LED is common anode. Defaults to False.
102-
"""
103102
self._rgb_led_pins = [red_pin, green_pin, blue_pin]
104103
for pin, _ in enumerate(self._rgb_led_pins):
105104
try:

0 commit comments

Comments
 (0)