pyallel 1.3.2__tar.gz → 1.3.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyallel
3
- Version: 1.3.2
3
+ Version: 1.3.3
4
4
  Summary: Run and handle the output of multiple executables in pyallel (as in parallel)
5
5
  Home-page: https://github.com/Danthewaann/pyallel
6
6
  License: MIT
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "pyallel"
3
- version = "1.3.2"
3
+ version = "1.3.3"
4
4
  description = "Run and handle the output of multiple executables in pyallel (as in parallel)"
5
5
  authors = ["Daniel Black <danielcrblack@gmail.com>"]
6
6
  license = "MIT"
@@ -304,6 +304,23 @@ def set_process_lines(
304
304
  # their terminal lines as normal and break out of the while loop
305
305
  for process_output in processes_with_excess_output:
306
306
  process_output.process.lines = allocated_process_lines
307
+ lines -= allocated_process_lines
308
+
309
+ # If there is any lines left, allocate them to the process that currently contains the most lines in its output, or
310
+ # allocate them to the first process if no process contains enough lines
311
+ if lines:
312
+ process_with_most_lines: ProcessOutput | None = None
313
+ most_lines = 0
314
+ for process_output in output.processes:
315
+ if process_output.process.lines > most_lines:
316
+ process_with_most_lines = process_output
317
+ most_lines = process_output.process.lines
318
+
319
+ if not process_with_most_lines:
320
+ output.processes[0].process.lines += lines
321
+ else:
322
+ process_with_most_lines.process.lines += lines
323
+
307
324
  break
308
325
 
309
326
 
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes