pyallel 1.2.7__tar.gz → 1.2.8__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.
- {pyallel-1.2.7 → pyallel-1.2.8}/PKG-INFO +1 -1
- {pyallel-1.2.7 → pyallel-1.2.8}/pyproject.toml +1 -1
- {pyallel-1.2.7 → pyallel-1.2.8}/src/pyallel/printer.py +17 -6
- {pyallel-1.2.7 → pyallel-1.2.8}/LICENSE +0 -0
- {pyallel-1.2.7 → pyallel-1.2.8}/README.md +0 -0
- {pyallel-1.2.7 → pyallel-1.2.8}/src/pyallel/__init__.py +0 -0
- {pyallel-1.2.7 → pyallel-1.2.8}/src/pyallel/colours.py +0 -0
- {pyallel-1.2.7 → pyallel-1.2.8}/src/pyallel/constants.py +0 -0
- {pyallel-1.2.7 → pyallel-1.2.8}/src/pyallel/errors.py +0 -0
- {pyallel-1.2.7 → pyallel-1.2.8}/src/pyallel/main.py +0 -0
- {pyallel-1.2.7 → pyallel-1.2.8}/src/pyallel/parser.py +0 -0
- {pyallel-1.2.7 → pyallel-1.2.8}/src/pyallel/process.py +0 -0
- {pyallel-1.2.7 → pyallel-1.2.8}/src/pyallel/process_group.py +0 -0
- {pyallel-1.2.7 → pyallel-1.2.8}/src/pyallel/process_group_manager.py +0 -0
- {pyallel-1.2.7 → pyallel-1.2.8}/src/pyallel/py.typed +0 -0
|
@@ -23,9 +23,12 @@ class Printer:
|
|
|
23
23
|
end: str = "\n",
|
|
24
24
|
truncate: bool = False,
|
|
25
25
|
) -> None:
|
|
26
|
+
truncate_num = 0
|
|
26
27
|
prefix = self._prefix if include_prefix else ""
|
|
28
|
+
if prefix:
|
|
29
|
+
truncate_num = 6
|
|
27
30
|
if truncate:
|
|
28
|
-
columns = constants.COLUMNS() -
|
|
31
|
+
columns = constants.COLUMNS() - truncate_num
|
|
29
32
|
if get_num_lines(line, columns) > 1:
|
|
30
33
|
line = truncate_line(line, columns)
|
|
31
34
|
print(f"{prefix}{line}", end=end, flush=True)
|
|
@@ -79,8 +82,7 @@ class Printer:
|
|
|
79
82
|
lines = output.data.splitlines(keepends=True)
|
|
80
83
|
|
|
81
84
|
if tail_output:
|
|
82
|
-
|
|
83
|
-
output_lines = output.lines - status_lines
|
|
85
|
+
output_lines = output.lines - 1
|
|
84
86
|
lines = lines[-output_lines:]
|
|
85
87
|
|
|
86
88
|
for line in lines:
|
|
@@ -136,14 +138,23 @@ class Printer:
|
|
|
136
138
|
if not icon:
|
|
137
139
|
msg += "..."
|
|
138
140
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
+
timer = ""
|
|
141
142
|
if include_timer:
|
|
142
143
|
end = output.process.end
|
|
143
144
|
if not output.process.end:
|
|
144
145
|
end = time.perf_counter()
|
|
145
146
|
elapsed = end - output.process.start
|
|
146
|
-
|
|
147
|
+
timer = f"({format_time_taken(elapsed)})"
|
|
148
|
+
|
|
149
|
+
command = output.process.command
|
|
150
|
+
if get_num_lines(output.process.command) > 1:
|
|
151
|
+
columns = constants.COLUMNS() - (len(msg) + len(timer) + 9)
|
|
152
|
+
command = truncate_line(command, columns)
|
|
153
|
+
|
|
154
|
+
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}"
|
|
155
|
+
|
|
156
|
+
if timer:
|
|
157
|
+
out += f" {self._colours.dim_on}{timer}{self._colours.dim_off}"
|
|
147
158
|
|
|
148
159
|
return out
|
|
149
160
|
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|