MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / reset

Method reset

pager_lib/tqdm/notebook.py:287–305  ·  view source on GitHub ↗

Resets to 0 iterations for repeated use. Consider combining with `leave=True`. Parameters ---------- total : int or float, optional. Total to use for the new bar.

(self, total=None)

Source from the content-addressed store, hash-verified

285 pass
286
287 def reset(self, total=None):
288 """
289 Resets to 0 iterations for repeated use.
290
291 Consider combining with `leave=True`.
292
293 Parameters
294 ----------
295 total : int or float, optional. Total to use for the new bar.
296 """
297 if self.disable:
298 return super().reset(total=total)
299 _, pbar, _ = self.container.children
300 pbar.bar_style = ''
301 if total is not None:
302 pbar.max = total
303 if not self.total and self.ncols is None: # no longer unknown total
304 pbar.layout.width = None # reset width
305 return super().reset(total=total)
306
307
308def tnrange(*args, **kwargs):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected