more pipe removal

This commit is contained in:
Casper da Costa-Luis 2021-01-10 14:41:36 +00:00 committed by GitHub
parent 13ccf1d5f5
commit 6fb8cc8e1c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 3 deletions

View File

@ -143,9 +143,8 @@ class tqdm_tk(std_tqdm): # pragma: no cover
d['ncols'] = None
text = self.format_meter(**d)
# fixup only default bar format
if self.bar_format == "{l_bar}{r_bar}":
text = text.replace("||", "", 1)
self._tk_text_var.set(text)
self._tk_text_var.set(
text.replace("||", "", 1) if "{l_bar}{r_bar}" in self.bar_format else text)
if not self._tk_dispatching:
self._tk_window.update()