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:
@@ -21,7 +21,7 @@ class FileSelector(ttk.Frame):
|
||||
file_type: str = "file",
|
||||
file_types: list = None,
|
||||
initial_dir: str = "",
|
||||
on_change: Optional[Callable] = None
|
||||
on_change: Optional[Callable] = None,
|
||||
):
|
||||
"""
|
||||
初始化文件选择器
|
||||
@@ -64,15 +64,10 @@ class FileSelector(ttk.Frame):
|
||||
|
||||
if self.file_type == "file":
|
||||
path = filedialog.askopenfilename(
|
||||
title="选择文件",
|
||||
initialdir=current_path,
|
||||
filetypes=self.file_types
|
||||
title="选择文件", initialdir=current_path, filetypes=self.file_types
|
||||
)
|
||||
else: # directory
|
||||
path = filedialog.askdirectory(
|
||||
title="选择目录",
|
||||
initialdir=current_path
|
||||
)
|
||||
path = filedialog.askdirectory(title="选择目录", initialdir=current_path)
|
||||
|
||||
if path:
|
||||
self.entry_var.set(path)
|
||||
|
||||
Reference in New Issue
Block a user