Skip to content

Commit bbaf1bc

Browse files
author
Margaret Matocha
committed
Ran black, deleted debug print statement
1 parent b15657a commit bbaf1bc

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

adafruit_display_shapes/rect.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,11 @@ def __init__(self, x, y, width, height, *, fill=None, outline=None, stroke=1):
6969
for w in range(width):
7070
for line in range(stroke):
7171
self._bitmap[w, line] = 1
72-
self._bitmap[w, height - line] = 1
72+
self._bitmap[w, height - 1 - line] = 1
7373
for _h in range(height):
7474
for line in range(stroke):
7575
self._bitmap[line, _h] = 1
76-
self._bitmap[width - line, _h] = 1
76+
self._bitmap[width - 1 - line, _h] = 1
7777

7878
if fill is not None:
7979
self._palette[0] = fill

adafruit_display_shapes/sparkline.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ def update(self):
139139
self.y_top = self.y_max
140140

141141
if len(self._spark_list) > 2:
142-
xpitch = (self.width-1) / (
142+
xpitch = (self.width - 1) / (
143143
len(self._spark_list) - 1
144144
) # this is a float, only make int when plotting the line
145145

examples/display_shapes_sparkline_ticks.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -157,13 +157,12 @@
157157

158158
total_ticks = 10
159159

160-
for i in range(total_ticks+1):
160+
for i in range(total_ticks + 1):
161161
x_start = sparkline1.x - 5
162162
x_end = sparkline1.x
163163
y_both = int(round(sparkline1.y + (i * (chart_height) / (total_ticks))))
164-
if y_both > sparkline1.y+chart_height-1:
165-
y_both = sparkline1.y+chart_height-1
166-
print('y_both: {}, i: {}'.format(y_both, i))
164+
if y_both > sparkline1.y + chart_height - 1:
165+
y_both = sparkline1.y + chart_height - 1
167166
my_group.append(Line(x_start, y_both, x_end, y_both, color=line_color))
168167

169168

0 commit comments

Comments
 (0)