这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Internal
* Improve pull request template lint commands.
* Complete typehinting the non-test codebase.
* Modernization: conversion to f-strings.
* Modernization: remove more Python 2 compatibility logic.


1.37.1 (2025/07/28)
Expand Down
6 changes: 2 additions & 4 deletions mycli/packages/toolkit/history.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,8 @@ def add() -> None:
history_with_timestamp.append((string, timestamp))

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")

with open(self.filename, 'r', encoding='utf-8') as f:
for line in f:
if line.startswith("#"):
# Extract timestamp
timestamp = line[2:].strip()
Expand Down