Skip to content

Commit

Permalink
Include first token in hex output
Browse files Browse the repository at this point in the history
  • Loading branch information
kg583 committed Sep 23, 2023
1 parent e883da9 commit 25f3f1c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tivars/types/tokenized.py
Original file line number Diff line number Diff line change
Expand Up @@ -385,13 +385,13 @@ def __format__(self, format_spec: str) -> str:
try:
match [*format_spec]:
case sep, *width if width:
return self.data[2:].hex(sep, int(''.join(width)))
return self.data.hex(sep, int(''.join(width)))

case sep, *_:
return self.data[2:].hex(sep)
return self.data.hex(sep)

case _:
return self.data[2:].hex()
return self.data.hex()

except TypeError:
return super().__format__(format_spec)
Expand Down

0 comments on commit 25f3f1c

Please sign in to comment.