Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tools/sizes.py: Change Unicode box-drawing chars to that of double version #8573

Merged
merged 2 commits into from
May 17, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions tools/sizes.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,9 @@ def safe_prefix(n, length):

def prefix(n, length):
if n == length:
return "└──"
return "╚══"

return "├──"
return "╠══"


def filter_segments(segments):
Expand Down Expand Up @@ -159,7 +159,10 @@ def main():
number, used, segments = filter_segments(segments)

print(f". {group:<8}, used {used} / {total} bytes ({percentage(used, total)})")
print("| SEGMENT BYTES DESCRIPTION")
try:
print("║ SEGMENT BYTES DESCRIPTION")
except UnicodeEncodeError:
print("| SEGMENT BYTES DESCRIPTION")
for n, segment, size in segments:
try:
print(f"{prefix(n, number)} ", end="")
Expand Down