Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
svartkanin committed May 15, 2024
1 parent b4b4e96 commit d5b4da4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions archinstall/lib/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ def log(
sys.stdout.flush()


def count_wchars(string: str) -> int:
def _count_wchars(string: str) -> int:
"Count the total number of wide characters contained in a string"
return sum(unicodedata.east_asian_width(c) in 'FW' for c in string)

Expand All @@ -345,7 +345,7 @@ def unicode_ljust(string: str, width: int, fillbyte: str = ' ') -> str:
>>> unicode_ljust('こんにちは', 15, '*')
'こんにちは*****'
"""
return string.ljust(width - count_wchars(string), fillbyte)
return string.ljust(width - _count_wchars(string), fillbyte)


def unicode_rjust(string: str, width: int, fillbyte: str = ' ') -> str:
Expand All @@ -359,4 +359,4 @@ def unicode_rjust(string: str, width: int, fillbyte: str = ' ') -> str:
>>> unicode_rjust('こんにちは', 15, '*')
'*****こんにちは'
"""
return string.rjust(width - count_wchars(string), fillbyte)
return string.rjust(width - _count_wchars(string), fillbyte)

0 comments on commit d5b4da4

Please sign in to comment.