Skip to content

Commit

Permalink
fix(progress): remove end string on progress bar
Browse files Browse the repository at this point in the history
moved percent string before progress bar and fixed rjust
  • Loading branch information
mdsanima committed Jun 28, 2021
1 parent 9c712b8 commit 4abf6df
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/mdsanima_dev/utils/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,11 @@ def progress_conf(self, percent: int, width: int) -> str:
perc = str(percent) + '%'

self.mds('\r' + self.txt_first.upper(), self.txt_first_clr, ' ')
self.mds(perc.rjust(4), self.percent_clr, '')
self.mds('[', self.bar_sten_clr, '')
self.mds(s_start, self.bar_clr, '')
self.mds(s_end, self.bar_clr, '')
self.mds(']', self.bar_sten_clr, '')
self.mds(' ' + perc, self.percent_clr, '')

def progress_bar(self, width: int, speed: int) -> str:
"""
Expand All @@ -160,4 +160,4 @@ def progress_bar(self, width: int, speed: int) -> str:
for i in range(101):
self.progress_conf(i, width)
sleep(speed)
self.mds(' ' + self.txt_end.upper(), self.txt_end_clr)
#self.mds(' ' + self.txt_end.upper(), self.txt_end_clr)

0 comments on commit 4abf6df

Please sign in to comment.