From b9f066e5b9dad08b98a00b628cb5db11ae31df34 Mon Sep 17 00:00:00 2001 From: dherrada Date: Wed, 19 May 2021 14:38:40 -0400 Subject: [PATCH] Linted --- examples/dotstar_image_paint.py | 3 +-- examples/dotstar_image_pov.py | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/examples/dotstar_image_paint.py b/examples/dotstar_image_paint.py index 83a5a02..98bd2e6 100644 --- a/examples/dotstar_image_paint.py +++ b/examples/dotstar_image_paint.py @@ -37,8 +37,7 @@ WIDTH = IMG.size[0] HEIGHT = IMG.size[1] print("%dx%d pixels" % IMG.size) -if HEIGHT > NUMPIXELS: - HEIGHT = NUMPIXELS +HEIGHT = min(HEIGHT, NUMPIXELS) # Calculate gamma correction table, makes mid-range colors look 'right': GAMMA = bytearray(256) diff --git a/examples/dotstar_image_pov.py b/examples/dotstar_image_pov.py index e785331..e379282 100644 --- a/examples/dotstar_image_pov.py +++ b/examples/dotstar_image_pov.py @@ -41,8 +41,7 @@ WIDTH = IMG.size[0] HEIGHT = IMG.size[1] print("%dx%d pixels" % IMG.size) -if HEIGHT > NUMPIXELS: - HEIGHT = NUMPIXELS +HEIGHT = min(HEIGHT, NUMPIXELS) # Calculate gamma correction table, makes mid-range colors look 'right': GAMMA = bytearray(256)