Skip to content

Commit adaa007

Browse files
committed
DRYer
1 parent dc888a8 commit adaa007

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

kitty/child.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -423,11 +423,10 @@ def background_processes(self) -> list[ProcessDesc]:
423423
sid = session_id(gmap.get(foreground_process_group_id, ()))
424424
if sid < 0:
425425
return []
426-
ans = []
426+
ans: list[ProcessDesc] = []
427427
for grp_id, pids in gmap.items():
428428
if grp_id != foreground_process_group_id and session_id(pids) == sid:
429-
for pid in pids:
430-
ans.append(self.process_desc(pid))
429+
ans.extend(map(self.process_desc, pids))
431430
return ans
432431
except Exception:
433432
return []

0 commit comments

Comments
 (0)