Skip to content

Commit b0206e9

Browse files
committed
Still needs docstrings in new files.
1 parent 0dc7599 commit b0206e9

File tree

6 files changed

+18
-14
lines changed

6 files changed

+18
-14
lines changed

adafruit_led_animation/animation.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,9 @@ def reset(self):
401401
white = len(self.pixel_object[0]) > 3 and isinstance(
402402
self.pixel_object[0][-1], int
403403
)
404-
from adafruit_led_animation.helper import pulse_generator # pylint: disable=import-outside-toplevel
404+
from adafruit_led_animation.helper import ( # pylint: disable=import-outside-toplevel
405+
pulse_generator,
406+
)
405407

406408
self._generator = pulse_generator(self._period, self, white)
407409

adafruit_led_animation/rainbow.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
from time import monotonic_ns
2-
3-
from adafruit_led_animation import NANOS_PER_SECOND
41
from adafruit_led_animation.animation import Animation, Chase, Comet
52
from adafruit_led_animation.color import BLACK, colorwheel
3+
from . import NANOS_PER_SECOND, monotonic_ns
64

75

86
class Rainbow(Animation):

adafruit_led_animation/sequence.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import random
2-
from time import monotonic_ns
3-
4-
from adafruit_led_animation import NANOS_PER_SECOND
52
from adafruit_led_animation.color import BLACK
3+
from . import NANOS_PER_SECOND, monotonic_ns
64

75

86
class AnimationSequence:

adafruit_led_animation/sparkle.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import random
2-
from time import monotonic_ns
3-
4-
from adafruit_led_animation import NANOS_PER_SECOND
52
from adafruit_led_animation.animation import Animation
3+
from . import NANOS_PER_SECOND, monotonic_ns
64

75

86
class Sparkle(Animation):

examples/led_animation_all_animations.py

+9-3
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,17 @@
2626
comet = animation.Comet(pixels, speed=0.01, color=PURPLE, tail_length=10, bounce=True)
2727
chase = animation.Chase(pixels, speed=0.1, size=3, spacing=6, color=WHITE)
2828
pulse = animation.Pulse(pixels, speed=0.1, period=3, color=AMBER)
29-
sparkle = adafruit_led_animation.sparkle.Sparkle(pixels, speed=0.1, color=PURPLE, num_sparkles=10)
29+
sparkle = adafruit_led_animation.sparkle.Sparkle(
30+
pixels, speed=0.1, color=PURPLE, num_sparkles=10
31+
)
3032
solid = animation.Solid(pixels, color=JADE)
3133
rainbow = adafruit_led_animation.rainbow.Rainbow(pixels, speed=0.1, period=2)
32-
sparkle_pulse = adafruit_led_animation.sparkle.SparklePulse(pixels, speed=0.1, period=3, color=JADE)
33-
rainbow_comet = adafruit_led_animation.rainbow.RainbowComet(pixels, speed=0.1, tail_length=7, bounce=True)
34+
sparkle_pulse = adafruit_led_animation.sparkle.SparklePulse(
35+
pixels, speed=0.1, period=3, color=JADE
36+
)
37+
rainbow_comet = adafruit_led_animation.rainbow.RainbowComet(
38+
pixels, speed=0.1, tail_length=7, bounce=True
39+
)
3440
rainbow_chase = adafruit_led_animation.rainbow.RainbowChase(
3541
pixels, speed=0.1, size=3, spacing=2, wheel_step=8
3642
)

examples/led_animation_gridmap.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@
3939
rainbow_comet_v = adafruit_led_animation.rainbow.RainbowComet(
4040
pixel_wing_vertical, speed=0.1, tail_length=7, bounce=True
4141
)
42-
rainbow_v = adafruit_led_animation.rainbow.Rainbow(pixel_wing_vertical, speed=0.1, period=2)
42+
rainbow_v = adafruit_led_animation.rainbow.Rainbow(
43+
pixel_wing_vertical, speed=0.1, period=2
44+
)
4345
rainbow_chase_h = adafruit_led_animation.rainbow.RainbowChase(
4446
pixel_wing_horizontal, speed=0.1, size=3, spacing=3
4547
)

0 commit comments

Comments
 (0)