Skip to content

Commit 87e0e61

Browse files
committed
Fix issue Not able to turn off progress bars
Github issue #174
1 parent 3b07d63 commit 87e0e61

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pandarallel/progress_bars.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ def is_notebook_lab() -> bool:
5555

5656
class ProgressBarsConsole(ProgressBars):
5757
def __init__(self, maxs: List[int], show: bool) -> None:
58+
self.__show = show
5859
self.__bars = [[0, max] for max in maxs]
5960
self.__width = self.__get_width()
6061

@@ -103,6 +104,9 @@ def update(self, values: List[int]) -> None:
103104
Positional arguments:
104105
values - The new values of each bar
105106
"""
107+
if not self.__show:
108+
return
109+
106110
for index, value in enumerate(values):
107111
self.__bars[index][0] = value
108112

0 commit comments

Comments
 (0)