Skip to content

Commit ec15648

Browse files
author
BiffoBear
committed
Rolled back changes to Sphinx and moved to types in string quotes.
1 parent fac3aa7 commit ec15648

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

adafruit_rgbled.py

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,6 @@
2020
"""
2121
try:
2222
from typing import Union
23-
import adafruit_pca9685 as pca9685
24-
import pwmio
25-
import microcontroller
2623
except ImportError:
2724
pass
2825

@@ -87,20 +84,20 @@ class RGBLED:
8784

8885
def __init__(
8986
self,
90-
red_pin: Union[microcontroller.Pin, pwmio.PWMOut, pca9685.PWMChannel],
91-
green_pin: Union[microcontroller.Pin, pwmio.PWMOut, pca9685.PWMChannel],
92-
blue_pin: Union[microcontroller.Pin, pwmio.PWMOut, pca9685.PWMChannel],
87+
red_pin: Union["microcontroller.Pin", PWMOut, "PWMChannel"],
88+
green_pin: Union["microcontroller.Pin", PWMOut, "PWMChannel"],
89+
blue_pin: Union["microcontroller.Pin", PWMOut, "PWMChannel"],
9390
invert_pwm: bool = False,
9491
) -> None:
9592
"""
96-
:param Union[microcontroller.Pin, pwmio.PWMOut, pca9685.PWMChannel] red_pin:
93+
:param Union["microcontroller.Pin", PWMOut, "PWMChannel"] red_pin:
9794
The connection to the red LED.
98-
:param Union[microcontroller.Pin, pwmio.PWMOut, pca9685.PWMChannel] green_pin:
95+
:param Union["microcontroller.Pin", PWMOut, "PWMChannel"] green_pin:
9996
The connection to the green LED.
100-
:param Union[microcontroller.Pin, pwmio.PWMOut, pca9685.PWMChannel] blue_pin:
97+
:param Union["microcontroller.Pin", PWMOut, "PWMChannel"] blue_pin:
10198
The connection to the blue LED.
10299
:param bool invert_pwm: False if the RGB LED is common cathode,
103-
True if the RGB LED is common anode.
100+
True if the RGB LED is common anode. Defaults to False.
104101
"""
105102
self._rgb_led_pins = [red_pin, green_pin, blue_pin]
106103
for i in range( # pylint: disable=consider-using-enumerate

0 commit comments

Comments
 (0)