Skip to content

Commit 786cd80

Browse files
committed
Resolving build CI errors
1 parent 1293a47 commit 786cd80

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

adafruit_led_animation/animation/pulse.py

+11-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,17 @@ class Pulse(Animation):
4343
"""
4444

4545
# pylint: disable=too-many-arguments
46-
def __init__(self, pixel_object, speed, color, period=5, breath=0, min_intensity=0, max_intensity=1, name=None):
46+
def __init__(
47+
self,
48+
pixel_object,
49+
speed,
50+
color,
51+
period=5,
52+
breath=0,
53+
min_intensity=0,
54+
max_intensity=1,
55+
name=None,
56+
):
4757
super().__init__(pixel_object, speed, color, name=name)
4858
self._period = period
4959
self.breath = breath

adafruit_led_animation/helper.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,10 @@ def pulse_generator(period: float, animation_object, dotstar_pwm=False):
344344
elif pos > (half_period - half_breath):
345345
intensity = animation_object.max_intensity
346346
else:
347-
intensity = animation_object.min_intensity + (((pos - half_breath) / (half_period - (half_breath * 2))) * (animation_object.max_intensity - animation_object.min_intensity))
347+
intensity = animation_object.min_intensity + (
348+
((pos - half_breath) / (half_period - (half_breath * 2)))
349+
* (animation_object.max_intensity - animation_object.min_intensity)
350+
)
348351
if dotstar_pwm:
349352
fill_color = (
350353
animation_object.color[0],

0 commit comments

Comments
 (0)