File tree Expand file tree Collapse file tree 2 files changed +3
-8
lines changed
Expand file tree Collapse file tree 2 files changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -133,13 +133,9 @@ async def async_check_uncommitted_changes(file_list: list[str]) -> bool:
133133 stdout = asyncio .subprocess .PIPE ,
134134 )
135135 stdout , _ = await process .communicate ()
136- files_uncommitted : list [str ] = [file_ for item in stdout .decode ().split ('\n ' )
137- if (file_ := item .strip ())]
138- for file_ in file_list :
139- for uncommited in files_uncommitted :
140- if file_ == uncommited :
141- return False
142- return True
136+ files_uncommitted : set [str ] = {file_ for item in stdout .decode ().split ('\n ' )
137+ if (file_ := item .strip ())}
138+ return not any (True for file_ in file_list if file_ in files_uncommitted )
143139
144140
145141async def async_check_changes (file_list : list [str ]) -> list [str ]:
Original file line number Diff line number Diff line change 22
33from python_typing_update .const import version_str
44
5-
65with open ('requirements.txt' ) as fp :
76 requirements = [
87 line .strip ().split (' ' , 1 )[0 ] for line in fp .read ().splitlines ()
You can’t perform that action at this time.
0 commit comments