Skip to content

Commit f618f73

Browse files
committed
Make progressbar create a newline on stop
1 parent af86c53 commit f618f73

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

nalpy/console_utils/progressbar.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,10 @@ def update(self, message: str, progress: float, _min: float = 0.0, _max: float =
5454
_console_utils.reset_attributes()
5555
print(empty, self._style.bar_suffix, suffix, sep="", end="")
5656

57-
def stop(self) -> None:
57+
def stop(self, *, end: str | None = "\n") -> None:
5858
"""Resets the cursor visibility if it was modified."""
5959
if self._cursor_hidden:
6060
_console_utils.cursor_show()
6161
self._cursor_hidden = False
62+
63+
print(end=end)

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ authors = [
99
]
1010
requires-python = ">=3.11"
1111
description = "An experimental portable package for different types of projects."
12-
version = "0.3.3"
12+
version = "0.3.4"
1313
dynamic = ["readme"]
1414

1515
[tool.setuptools.dynamic]

0 commit comments

Comments
 (0)