Still needs docstrings in new files.

This commit is contained in:
Kattni Rembor 2020-05-14 22:08:11 -04:00
parent 0dc75995a8
commit b0206e99dd
6 changed files with 18 additions and 14 deletions

View file

@ -401,7 +401,9 @@ class Pulse(Animation):
white = len(self.pixel_object[0]) > 3 and isinstance( white = len(self.pixel_object[0]) > 3 and isinstance(
self.pixel_object[0][-1], int self.pixel_object[0][-1], int
) )
from adafruit_led_animation.helper import pulse_generator # pylint: disable=import-outside-toplevel from adafruit_led_animation.helper import ( # pylint: disable=import-outside-toplevel
pulse_generator,
)
self._generator = pulse_generator(self._period, self, white) self._generator = pulse_generator(self._period, self, white)

View file

@ -1,8 +1,6 @@
from time import monotonic_ns
from adafruit_led_animation import NANOS_PER_SECOND
from adafruit_led_animation.animation import Animation, Chase, Comet from adafruit_led_animation.animation import Animation, Chase, Comet
from adafruit_led_animation.color import BLACK, colorwheel from adafruit_led_animation.color import BLACK, colorwheel
from . import NANOS_PER_SECOND, monotonic_ns
class Rainbow(Animation): class Rainbow(Animation):

View file

@ -1,8 +1,6 @@
import random import random
from time import monotonic_ns
from adafruit_led_animation import NANOS_PER_SECOND
from adafruit_led_animation.color import BLACK from adafruit_led_animation.color import BLACK
from . import NANOS_PER_SECOND, monotonic_ns
class AnimationSequence: class AnimationSequence:

View file

@ -1,8 +1,6 @@
import random import random
from time import monotonic_ns
from adafruit_led_animation import NANOS_PER_SECOND
from adafruit_led_animation.animation import Animation from adafruit_led_animation.animation import Animation
from . import NANOS_PER_SECOND, monotonic_ns
class Sparkle(Animation): class Sparkle(Animation):

View file

@ -26,11 +26,17 @@ blink = animation.Blink(pixels, speed=0.1, color=JADE)
comet = animation.Comet(pixels, speed=0.01, color=PURPLE, tail_length=10, bounce=True) comet = animation.Comet(pixels, speed=0.01, color=PURPLE, tail_length=10, bounce=True)
chase = animation.Chase(pixels, speed=0.1, size=3, spacing=6, color=WHITE) chase = animation.Chase(pixels, speed=0.1, size=3, spacing=6, color=WHITE)
pulse = animation.Pulse(pixels, speed=0.1, period=3, color=AMBER) pulse = animation.Pulse(pixels, speed=0.1, period=3, color=AMBER)
sparkle = adafruit_led_animation.sparkle.Sparkle(pixels, speed=0.1, color=PURPLE, num_sparkles=10) sparkle = adafruit_led_animation.sparkle.Sparkle(
pixels, speed=0.1, color=PURPLE, num_sparkles=10
)
solid = animation.Solid(pixels, color=JADE) solid = animation.Solid(pixels, color=JADE)
rainbow = adafruit_led_animation.rainbow.Rainbow(pixels, speed=0.1, period=2) rainbow = adafruit_led_animation.rainbow.Rainbow(pixels, speed=0.1, period=2)
sparkle_pulse = adafruit_led_animation.sparkle.SparklePulse(pixels, speed=0.1, period=3, color=JADE) sparkle_pulse = adafruit_led_animation.sparkle.SparklePulse(
rainbow_comet = adafruit_led_animation.rainbow.RainbowComet(pixels, speed=0.1, tail_length=7, bounce=True) pixels, speed=0.1, period=3, color=JADE
)
rainbow_comet = adafruit_led_animation.rainbow.RainbowComet(
pixels, speed=0.1, tail_length=7, bounce=True
)
rainbow_chase = adafruit_led_animation.rainbow.RainbowChase( rainbow_chase = adafruit_led_animation.rainbow.RainbowChase(
pixels, speed=0.1, size=3, spacing=2, wheel_step=8 pixels, speed=0.1, size=3, spacing=2, wheel_step=8
) )

View file

@ -39,7 +39,9 @@ rainbow_chase_v = adafruit_led_animation.rainbow.RainbowChase(
rainbow_comet_v = adafruit_led_animation.rainbow.RainbowComet( rainbow_comet_v = adafruit_led_animation.rainbow.RainbowComet(
pixel_wing_vertical, speed=0.1, tail_length=7, bounce=True pixel_wing_vertical, speed=0.1, tail_length=7, bounce=True
) )
rainbow_v = adafruit_led_animation.rainbow.Rainbow(pixel_wing_vertical, speed=0.1, period=2) rainbow_v = adafruit_led_animation.rainbow.Rainbow(
pixel_wing_vertical, speed=0.1, period=2
)
rainbow_chase_h = adafruit_led_animation.rainbow.RainbowChase( rainbow_chase_h = adafruit_led_animation.rainbow.RainbowChase(
pixel_wing_horizontal, speed=0.1, size=3, spacing=3 pixel_wing_horizontal, speed=0.1, size=3, spacing=3
) )