mirror of
https://github.com/esphome/esphome.git
synced 2025-01-03 18:38:07 +01:00
[core] Fix minor formatting issues (#6738)
This commit is contained in:
parent
7d791cbdfb
commit
636037cec1
@ -65,7 +65,7 @@ def choose_prompt(options, purpose: str = None):
|
|||||||
f'Found multiple options{f" for {purpose}" if purpose else ""}, please choose one:'
|
f'Found multiple options{f" for {purpose}" if purpose else ""}, please choose one:'
|
||||||
)
|
)
|
||||||
for i, (desc, _) in enumerate(options):
|
for i, (desc, _) in enumerate(options):
|
||||||
safe_print(f" [{i+1}] {desc}")
|
safe_print(f" [{i + 1}] {desc}")
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
opt = input("(number): ")
|
opt = input("(number): ")
|
||||||
|
@ -157,7 +157,7 @@ async def to_code(config):
|
|||||||
pixels = list(frame.getdata())
|
pixels = list(frame.getdata())
|
||||||
if len(pixels) != height * width:
|
if len(pixels) != height * width:
|
||||||
raise core.EsphomeError(
|
raise core.EsphomeError(
|
||||||
f"Unexpected number of pixels in {path} frame {frameIndex}: ({len(pixels)} != {height*width})"
|
f"Unexpected number of pixels in {path} frame {frameIndex}: ({len(pixels)} != {height * width})"
|
||||||
)
|
)
|
||||||
for pix, a in pixels:
|
for pix, a in pixels:
|
||||||
if transparent:
|
if transparent:
|
||||||
@ -180,7 +180,7 @@ async def to_code(config):
|
|||||||
pixels = list(frame.getdata())
|
pixels = list(frame.getdata())
|
||||||
if len(pixels) != height * width:
|
if len(pixels) != height * width:
|
||||||
raise core.EsphomeError(
|
raise core.EsphomeError(
|
||||||
f"Unexpected number of pixels in {path} frame {frameIndex}: ({len(pixels)} != {height*width})"
|
f"Unexpected number of pixels in {path} frame {frameIndex}: ({len(pixels)} != {height * width})"
|
||||||
)
|
)
|
||||||
for pix in pixels:
|
for pix in pixels:
|
||||||
data[pos] = pix[0]
|
data[pos] = pix[0]
|
||||||
@ -203,7 +203,7 @@ async def to_code(config):
|
|||||||
pixels = list(frame.getdata())
|
pixels = list(frame.getdata())
|
||||||
if len(pixels) != height * width:
|
if len(pixels) != height * width:
|
||||||
raise core.EsphomeError(
|
raise core.EsphomeError(
|
||||||
f"Unexpected number of pixels in {path} frame {frameIndex}: ({len(pixels)} != {height*width})"
|
f"Unexpected number of pixels in {path} frame {frameIndex}: ({len(pixels)} != {height * width})"
|
||||||
)
|
)
|
||||||
for r, g, b, a in pixels:
|
for r, g, b, a in pixels:
|
||||||
if transparent:
|
if transparent:
|
||||||
@ -232,7 +232,7 @@ async def to_code(config):
|
|||||||
pixels = list(frame.getdata())
|
pixels = list(frame.getdata())
|
||||||
if len(pixels) != height * width:
|
if len(pixels) != height * width:
|
||||||
raise core.EsphomeError(
|
raise core.EsphomeError(
|
||||||
f"Unexpected number of pixels in {path} frame {frameIndex}: ({len(pixels)} != {height*width})"
|
f"Unexpected number of pixels in {path} frame {frameIndex}: ({len(pixels)} != {height * width})"
|
||||||
)
|
)
|
||||||
for r, g, b, a in pixels:
|
for r, g, b, a in pixels:
|
||||||
R = r >> 3
|
R = r >> 3
|
||||||
|
Loading…
Reference in New Issue
Block a user