diff options
author | lazmond3 <moikilo00@gmail.com> | 2024-08-07 08:53:19 +0900 |
---|---|---|
committer | lazmond3 <moikilo00@gmail.com> | 2024-08-07 08:53:19 +0900 |
commit | b21dfbfc39654cf08f8d00900fdeda1604b6974c (patch) | |
tree | f9d9dff3503712332939bccedf710021444f9ca0 | |
parent | a8495bdd822608fa507502cfe226358adcb72d2e (diff) |
Remove redundant method definition load_history_strings
-rw-r--r-- | mycli/packages/toolkit/history.py | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/mycli/packages/toolkit/history.py b/mycli/packages/toolkit/history.py index d171715..75f4a5a 100644 --- a/mycli/packages/toolkit/history.py +++ b/mycli/packages/toolkit/history.py @@ -15,29 +15,6 @@ class FileHistoryWithTimestamp(FileHistory): self.filename = filename super().__init__(filename) - def load_history_strings(self) -> Iterable[str]: - strings: list[str] = [] - lines: list[str] = [] - - def add() -> None: - if lines: - string = "".join(lines)[:-1] - strings.append(string) - - if os.path.exists(self.filename): - with open(self.filename, "rb") as f: - for line_bytes in f: - line = line_bytes.decode("utf-8", errors="replace") - if line.startswith("+"): - lines.append(line[1:]) - else: - add() - lines = [] - - add() - - return reversed(strings) - def load_history_with_timestamp(self) -> List[Tuple[str, str]]: """ Load history entries along with their timestamps. |