Skip to content

Commit b9f066e

Browse files
committed
Linted
1 parent 58b28d3 commit b9f066e

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

examples/dotstar_image_paint.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@
3737
HEIGHT = IMG.size[1]
3838
print("%dx%d pixels" % IMG.size)
3939

40-
if HEIGHT > NUMPIXELS:
41-
HEIGHT = NUMPIXELS
40+
HEIGHT = min(HEIGHT, NUMPIXELS)
4241

4342
# Calculate gamma correction table, makes mid-range colors look 'right':
4443
GAMMA = bytearray(256)

examples/dotstar_image_pov.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,7 @@
4141
HEIGHT = IMG.size[1]
4242
print("%dx%d pixels" % IMG.size)
4343

44-
if HEIGHT > NUMPIXELS:
45-
HEIGHT = NUMPIXELS
44+
HEIGHT = min(HEIGHT, NUMPIXELS)
4645

4746
# Calculate gamma correction table, makes mid-range colors look 'right':
4847
GAMMA = bytearray(256)

0 commit comments

Comments
 (0)