style: format all Python files with Black
Apply Black formatter to the entire codebase for consistent code style. Co-Authored-By: Claude (glm-5) <noreply@anthropic.com>
This commit is contained in:
@@ -20,7 +20,7 @@ class ProgressDialog:
|
||||
title: str = "处理中...",
|
||||
message: str = "请稍候",
|
||||
can_cancel: bool = True,
|
||||
on_cancel: Optional[Callable] = None
|
||||
on_cancel: Optional[Callable] = None,
|
||||
):
|
||||
"""
|
||||
初始化进度对话框
|
||||
@@ -66,11 +66,7 @@ class ProgressDialog:
|
||||
self.message_label.pack(pady=(20, 10), padx=20)
|
||||
|
||||
# 进度条
|
||||
self.progress = ttk.Progressbar(
|
||||
self.dialog,
|
||||
mode='indeterminate',
|
||||
length=360
|
||||
)
|
||||
self.progress = ttk.Progressbar(self.dialog, mode="indeterminate", length=360)
|
||||
self.progress.pack(pady=10, padx=20)
|
||||
self.progress.start(10)
|
||||
|
||||
@@ -80,9 +76,7 @@ class ProgressDialog:
|
||||
button_frame.pack(pady=10)
|
||||
|
||||
self.cancel_button = ttk.Button(
|
||||
button_frame,
|
||||
text="取消",
|
||||
command=self._on_cancel
|
||||
button_frame, text="取消", command=self._on_cancel
|
||||
)
|
||||
self.cancel_button.pack()
|
||||
|
||||
@@ -106,8 +100,8 @@ class ProgressDialog:
|
||||
value: 当前进度值
|
||||
maximum: 最大值
|
||||
"""
|
||||
self.progress.config(mode='determinate', maximum=maximum)
|
||||
self.progress['value'] = value
|
||||
self.progress.config(mode="determinate", maximum=maximum)
|
||||
self.progress["value"] = value
|
||||
self.dialog.update_idletasks()
|
||||
|
||||
def close(self):
|
||||
|
||||
Reference in New Issue
Block a user