File tree Expand file tree Collapse file tree 1 file changed +11
-7
lines changed
Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -151,16 +151,20 @@ def run(args: str | list[str], cd: PathLike | None = None) -> None:
151151 result = subprocess .run (args )
152152 else :
153153 result = subprocess .run (args )
154-
154+
155155 elapsed_time = time .perf_counter () - start_time
156156 h , rem = divmod (elapsed_time , 3600 )
157157 m , s = divmod (rem , 60 )
158-
159- time_str = " " .join (part for part in [
160- f"{ int (h )} h" if h >= 1 else "" ,
161- f"{ int (m )} m" if m >= 1 or h >= 1 else "" ,
162- f"{ int (s )} s"
163- ] if part )
158+
159+ time_str = " " .join (
160+ part
161+ for part in [
162+ f"{ int (h )} h" if h >= 1 else "" ,
163+ f"{ int (m )} m" if m >= 1 or h >= 1 else "" ,
164+ f"{ int (s )} s" ,
165+ ]
166+ if part
167+ )
164168
165169 print (f">> Command finished ({ time_str } ): { cmd } \n " )
166170
You can’t perform that action at this time.
0 commit comments