Skip to content

Commit da467ce

Browse files
committed
Fix pylint errors
1 parent cce7094 commit da467ce

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

adafruit_led_animation/animation/colorcycle.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,13 @@ class ColorCycle(Animation):
3838
:param float speed: Animation speed in seconds, e.g. ``0.1``.
3939
:param colors: A list of colors to cycle through in ``(r, g, b)`` tuple, or ``0x000000`` hex
4040
format. Defaults to a rainbow color cycle.
41-
:param start_color: An index (from 0) for which color to start from. Default 0 (first color given).
41+
:param start_color: An index (from 0) for which color to start from. Default 0 (first color).
4242
"""
43-
43+
44+
# pylint: disable=too-many-arguments
4445
def __init__(self, pixel_object, speed, colors=RAINBOW, start_color=0, name=None):
4546
self.colors = colors
47+
self.start_color = start_color
4648
super().__init__(pixel_object, speed, colors[start_color], name=name)
4749
self._generator = self._color_generator(start_color)
4850
next(self._generator)
@@ -66,4 +68,4 @@ def reset(self):
6668
"""
6769
Resets to the first color.
6870
"""
69-
self._generator = self._color_generator()
71+
self._generator = self._color_generator(self.start_color)

0 commit comments

Comments
 (0)