We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 98c525d commit d1dd6dfCopy full SHA for d1dd6df
src/pms/core/reader.py
@@ -15,7 +15,6 @@
15
from contextlib import contextmanager
16
from csv import DictReader
17
from pathlib import Path
18
-from textwrap import wrap
19
from typing import Literal, NamedTuple, overload
20
21
from loguru import logger
@@ -46,9 +45,9 @@ class RawData(NamedTuple):
46
45
def hex(self) -> str:
47
return self.data.hex()
48
49
- def hexdump(self, line: int | None = None) -> str:
50
- offset = time if line is None else line * len(self.data)
51
- hex = " ".join(wrap(self.data.hex(), 2)) # raw.hex(" ") in python3.8+
+ def hexdump(self, line: int) -> str:
+ offset = line * len(self.data)
+ hex = self.data.hex(" ")
52
dump = self.data.translate(HEXDUMP_TABLE).decode()
53
return f"{offset:08x}: {hex} {dump}"
54
0 commit comments