Skip to content

Commit 1654795

Browse files
committed
Use generator instead of disabling message
1 parent a6b1843 commit 1654795

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

examples/rgb_display_pillow_bonnet_buttons.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -156,12 +156,11 @@
156156
draw.ellipse((190, 40, 230, 80), outline=button_outline, fill=B_fill) # B button
157157

158158
# make a random color and print text
159-
# pylint: disable=consider-using-generator
160-
rcolor = tuple([int(x * 255) for x in hsv_to_rgb(random.random(), 1, 1)])
159+
rcolor = tuple(int(x * 255) for x in hsv_to_rgb(random.random(), 1, 1))
161160
draw.text((20, 150), "Hello World", font=fnt, fill=rcolor)
162-
rcolor = tuple([int(x * 255) for x in hsv_to_rgb(random.random(), 1, 1)])
161+
rcolor = tuple(int(x * 255) for x in hsv_to_rgb(random.random(), 1, 1))
163162
draw.text((20, 180), "Hello World", font=fnt, fill=rcolor)
164-
rcolor = tuple([int(x * 255) for x in hsv_to_rgb(random.random(), 1, 1)])
163+
rcolor = tuple(int(x * 255) for x in hsv_to_rgb(random.random(), 1, 1))
165164
draw.text((20, 210), "Hello World", font=fnt, fill=rcolor)
166165

167166
# Display the Image

0 commit comments

Comments
 (0)