Skip to content

Commit

Permalink
clean output cleaning (meta)
Browse files Browse the repository at this point in the history
  • Loading branch information
casperdcl committed Jan 26, 2020
1 parent c6c8b80 commit eb05f8b
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions dvc/progress.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,15 @@ def update_to(self, current, total=None):
def close(self):
if self.desc_persist is not None:
self.set_description_str(self.desc_persist, refresh=False)
# remove ETA (either zero or unknown)
self.bar_format = self.bar_format.replace("<??:??", "").replace(
"<{remaining}", ""
)
for fmt in [
"<??:??", # unknown ETA
"<{remaining}", # 00:00 ETA
]:
self.bar_format = self.bar_format.replace(fmt, "")
for fmt in [
"|{bar:10}|", # completed progressbar
]:
self.bar_format = self.bar_format.replace(fmt, " ")
super().close()

@property
Expand Down

0 comments on commit eb05f8b

Please sign in to comment.