|
20 | 20 | """
|
21 | 21 | try:
|
22 | 22 | from typing import Union
|
23 |
| - import adafruit_pca9685 as pca9685 |
24 |
| - import pwmio |
25 |
| - import microcontroller |
26 | 23 | except ImportError:
|
27 | 24 | pass
|
28 | 25 |
|
@@ -87,20 +84,20 @@ class RGBLED:
|
87 | 84 |
|
88 | 85 | def __init__(
|
89 | 86 | 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"], |
93 | 90 | invert_pwm: bool = False,
|
94 | 91 | ) -> None:
|
95 | 92 | """
|
96 |
| - :param Union[microcontroller.Pin, pwmio.PWMOut, pca9685.PWMChannel] red_pin: |
| 93 | + :param Union["microcontroller.Pin", PWMOut, "PWMChannel"] red_pin: |
97 | 94 | 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: |
99 | 96 | 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: |
101 | 98 | The connection to the blue LED.
|
102 | 99 | :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. |
104 | 101 | """
|
105 | 102 | self._rgb_led_pins = [red_pin, green_pin, blue_pin]
|
106 | 103 | for i in range( # pylint: disable=consider-using-enumerate
|
|
0 commit comments