mirror of
https://github.com/esphome/esphome.git
synced 2024-11-10 01:07:45 +01:00
Simplify initializing glyph_data (#1970)
Make it easier to read the initialization with zeros, no loop required.
This commit is contained in:
parent
964ab65497
commit
d604321f37
1 changed files with 1 additions and 1 deletions
|
@ -110,7 +110,7 @@ async def to_code(config):
|
|||
_, (offset_x, offset_y) = font.font.getsize(glyph)
|
||||
width, height = mask.size
|
||||
width8 = ((width + 7) // 8) * 8
|
||||
glyph_data = [0 for _ in range(height * width8 // 8)] # noqa: F812
|
||||
glyph_data = [0] * (height * width8 // 8)
|
||||
for y in range(height):
|
||||
for x in range(width):
|
||||
if not mask.getpixel((x, y)):
|
||||
|
|
Loading…
Reference in a new issue