pyallel 2.0.2__tar.gz → 2.0.4__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,9 +1,9 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: pyallel
3
- Version: 2.0.2
3
+ Version: 2.0.4
4
4
  Summary: Run and handle the output of multiple executables in pyallel (as in parallel)
5
- Home-page: https://github.com/Danthewaann/pyallel
6
5
  License: MIT
6
+ License-File: LICENSE
7
7
  Keywords: parallel,command,runner,executable,shell,terminal
8
8
  Author: Daniel Black
9
9
  Author-email: danielcrblack@gmail.com
@@ -19,6 +19,8 @@ Classifier: Programming Language :: Python :: 3.10
19
19
  Classifier: Programming Language :: Python :: 3.11
20
20
  Classifier: Programming Language :: Python :: 3.12
21
21
  Classifier: Programming Language :: Python :: 3.13
22
+ Classifier: Programming Language :: Python :: 3.14
23
+ Project-URL: Homepage, https://github.com/Danthewaann/pyallel
22
24
  Project-URL: Repository, https://github.com/Danthewaann/pyallel
23
25
  Description-Content-Type: text/markdown
24
26
 
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "pyallel"
3
- version = "2.0.2"
3
+ version = "2.0.4"
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"
@@ -41,11 +41,11 @@ class ConsolePrinter:
41
41
  columns = columns or constants.COLUMNS()
42
42
  if prefix:
43
43
  truncate_num = 6
44
- if truncate:
44
+ if prefix and truncate:
45
45
  columns = columns - truncate_num
46
46
  if self.get_num_lines(line, columns) > 1:
47
47
  line = self.truncate_line(line, columns)
48
- print(f"{prefix}{line}", end=end, flush=flush)
48
+ print(f"{self._colours.reset_colour}{prefix}{line}", end=end, flush=flush)
49
49
 
50
50
  def generate_process_output(
51
51
  self,
@@ -108,8 +108,10 @@ class ConsolePrinter:
108
108
  output: ProcessOutput,
109
109
  include_progress: bool = True,
110
110
  include_timer: bool | None = None,
111
+ columns: int | None = None,
111
112
  ) -> str:
112
113
  include_timer = include_timer if include_timer is not None else self._timer
114
+ columns = columns or constants.COLUMNS()
113
115
 
114
116
  passed = None
115
117
  icon = ""
@@ -143,11 +145,11 @@ class ConsolePrinter:
143
145
  timer = f"({self.format_time_taken(elapsed)})"
144
146
 
145
147
  command = output.process.command
146
- if self.get_num_lines(output.process.command) > 1:
147
- columns = constants.COLUMNS() - (len(msg) + len(timer) + 9)
148
- command = self.truncate_line(command, columns)
149
-
150
148
  out = f"{self._colours.white_bold}[{self._colours.reset_colour}{self._colours.blue_bold}{command}{self._colours.reset_colour}{self._colours.white_bold}]{self._colours.reset_colour}{colour} {msg} {icon}{self._colours.reset_colour}"
149
+ if self.get_num_lines(out, columns) > 1:
150
+ columns = columns - (len(msg) + len(timer) + 9)
151
+ command = self.truncate_line(command, columns)
152
+ out = f"{self._colours.white_bold}[{self._colours.reset_colour}{self._colours.blue_bold}{command}{self._colours.reset_colour}{self._colours.white_bold}]{self._colours.reset_colour}{colour} {msg} {icon}{self._colours.reset_colour}"
151
153
 
152
154
  if timer:
153
155
  out += f" {self._colours.dim_on}{timer}{self._colours.dim_off}"
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