--- a/src/eric7/CodeFormatting/BlackFormattingDialog.py Tue Aug 23 16:20:08 2022 +0200 +++ b/src/eric7/CodeFormatting/BlackFormattingDialog.py Tue Aug 23 16:21:07 2022 +0200 @@ -274,7 +274,7 @@ # Submit tasks (initially two times the number of processes) tasks = len(files) - initialTasks = 2 * NumberOfProcesses + initialTasks = min(2 * NumberOfProcesses, tasks) for _ in range(initialTasks): file = files.pop(0) relSrc = self.__project.getRelativePath(str(file)) if self.__project else ""