mirror of
https://github.com/esphome/esphome.git
synced 2026-10-05 18:41:32 +00:00
Note the upstream spelling in the format_bar citation
This commit is contained in:
@@ -4,7 +4,11 @@ from __future__ import annotations
|
||||
|
||||
|
||||
def format_bar(used: int, total: int) -> str:
|
||||
"""Match PlatformIO's ``_format_availale_bytes`` (pioupload.py) exactly."""
|
||||
"""Match PlatformIO's ``_format_availale_bytes`` (pioupload.py) exactly.
|
||||
|
||||
The upstream helper's name really is spelled that way; keep the citation
|
||||
verbatim so it stays greppable in the PlatformIO source.
|
||||
"""
|
||||
pct_raw = used / total if total else 0
|
||||
blocks = 10
|
||||
filled = min(int(round(blocks * pct_raw)), blocks)
|
||||
|
||||
Reference in New Issue
Block a user