From 25f3f1c98e759110051e8614016e32be07e73045 Mon Sep 17 00:00:00 2001 From: KG Date: Sat, 23 Sep 2023 18:07:10 -0400 Subject: [PATCH] Include first token in hex output --- tivars/types/tokenized.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tivars/types/tokenized.py b/tivars/types/tokenized.py index 7bd2bdd..ea103bb 100644 --- a/tivars/types/tokenized.py +++ b/tivars/types/tokenized.py @@ -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)