We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7a4a434 commit 78a58e2Copy full SHA for 78a58e2
1 file changed
progressbar/widgets.py
@@ -272,6 +272,9 @@ class Timer(FormatLabel, TimeSensitiveWidgetBase):
272
'''WidgetBase which displays the elapsed seconds.'''
273
274
def __init__(self, format='Elapsed Time: %(elapsed)s', **kwargs):
275
+ if '%s' in format and '%(elapsed)s' not in format:
276
+ format = format.replace('%s', '%(elapsed)s')
277
+
278
FormatLabel.__init__(self, format=format, **kwargs)
279
TimeSensitiveWidgetBase.__init__(self, **kwargs)
280
@@ -373,6 +376,9 @@ def __init__(
373
376
format_NA='ETA: N/A',
374
377
**kwargs):
375
378
379
+ if '%s' in format and '%(eta)s' not in format:
380
+ format = format.replace('%s', '%(eta)s')
381
382
Timer.__init__(self, **kwargs)
383
self.format_not_started = format_not_started
384
self.format_finished = format_finished
0 commit comments