@@ -158,7 +158,9 @@ def get_marked_files(modified_files, staged_files):
158158 staged_checkbox = Checkbox (staged_files_show , [True ] * len (staged_files_show ))
159159
160160 unstaged_files = [file for file in modified_files if file [1 ].strip () != "" ]
161- unstaged_files_show = [f'{ file [1 ] if file [1 ]!= "?" else "U" } { file [0 ]} ' for file in unstaged_files ]
161+ unstaged_files_show = [
162+ f'{ file [1 ] if file [1 ]!= "?" else "U" } { file [0 ]} ' for file in unstaged_files
163+ ]
162164 unstaged_checkbox = Checkbox (unstaged_files_show , [False ] * len (unstaged_files_show ))
163165
164166 # Create a Form with both Checkbox instances
@@ -197,7 +199,9 @@ def rebuild_stage_list(staged_select_files, unstaged_select_files):
197199 None
198200 """
199201 # 获取当前所有staged文件
200- current_staged_files = subprocess .check_output (["git" , "diff" , "--name-only" , "--cached" ], text = True ).splitlines ()
202+ current_staged_files = subprocess .check_output (
203+ ["git" , "diff" , "--name-only" , "--cached" ], text = True
204+ ).splitlines ()
201205
202206 # 添加unstaged_select_files中的文件到staged
203207 for file in unstaged_select_files :
@@ -207,7 +211,7 @@ def rebuild_stage_list(staged_select_files, unstaged_select_files):
207211 user_selected_files = staged_select_files + unstaged_select_files
208212 files_to_unstage = [file for file in current_staged_files if file not in user_selected_files ]
209213 for file in files_to_unstage :
210- subprocess .check_output (["git" , "reset" , file ])
214+ subprocess .check_output (["git" , "reset" , file ])
211215
212216
213217def get_diff ():
0 commit comments