Skip to content

Commit

Permalink
find-unusual-characters: Show code point
Browse files Browse the repository at this point in the history
  • Loading branch information
acabal committed Feb 5, 2024
1 parent ff8bb50 commit 000d7c0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions se/commands/find_unusual_characters.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,12 +140,13 @@ def find_unusual_characters(plain_output: bool) -> int:

else:
table = Table(show_header=False, show_lines=True, box=box.HORIZONTALS)
table.add_column("Unusual character")
table.add_column("Character", style="bold", width=1, no_wrap=True)
table.add_column("Code point", style="dim", no_wrap=True)
table.add_column("Name")
table.add_column("Count", style="dim", no_wrap=True)

for unusual_character, unusual_character_name, unusual_character_count in lines:
table.add_row(unusual_character, unusual_character_name, f"({unusual_character_count})")
table.add_row(unusual_character, "U+{:04X}".format(ord(unusual_character)), unusual_character_name, f"({unusual_character_count})") # pylint: disable=consider-using-f-string

console.print(table)

Expand Down

0 comments on commit 000d7c0

Please sign in to comment.