Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
else:
k0 = 0
if is_unicode_standard_output() and not force_ascii:
block_chars = [" ", "▁", "▂", "▃", "▄", "▅", "▆", "▇", "█"]
left_seven_eighths = "▉"
else:
block_chars = [" ", "*", "*", "*", "*", "*", "*", "*", "*"]
left_seven_eighths = "*"
# print text matrix
out = []
for row in _flip(matrix):
# Cut off trailing zeros
r = _trim_trailing_zeros(row)
c = [block_chars[item] for item in r]
# add grid lines
for i in xgrid:
# print(row[xgrid])
pos = (i - k0) * bar_width - 1
if row[pos] == 8 and (pos + 1 == len(row) or row[pos + 1] > 0):
c[pos] = left_seven_eighths
out.append("".join(c))
return out