超级Ruff
This commit is contained in:
@@ -828,7 +828,7 @@ class LogViewer:
|
||||
parts, tags = self.formatter.format_log_entry(log_entry)
|
||||
line_text = " ".join(parts)
|
||||
log_lines.append(line_text)
|
||||
|
||||
|
||||
with open(filename, "w", encoding="utf-8") as f:
|
||||
f.write("\n".join(log_lines))
|
||||
messagebox.showinfo("导出成功", f"日志已导出到: {filename}")
|
||||
@@ -1188,15 +1188,16 @@ class LogViewer:
|
||||
line_count += 1
|
||||
except json.JSONDecodeError:
|
||||
continue
|
||||
|
||||
|
||||
# 如果发现了新模块,在主线程中更新模块集合
|
||||
if new_modules:
|
||||
|
||||
def update_modules():
|
||||
self.modules.update(new_modules)
|
||||
self.update_module_list()
|
||||
|
||||
|
||||
self.root.after(0, update_modules)
|
||||
|
||||
|
||||
return new_entries
|
||||
|
||||
def append_new_logs(self, new_entries):
|
||||
@@ -1424,4 +1425,3 @@ def main():
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user