mirror of
https://github.com/esphome/esphome.git
synced 2026-08-31 01:56:01 +00:00
Merge branch 'esp8266-native-shared-helpers' into esp8266-arduino-toolchain
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