MCPcopy
hub / github.com/tqdm/tqdm / close

Method close

tqdm/notebook.py:272–284  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

270 # since this could be a shared bar which the user will `reset()`
271
272 def close(self):
273 if self.disable:
274 return
275 super().close()
276 # Try to detect if there was an error or KeyboardInterrupt
277 # in manual mode: if n < total, things probably got wrong
278 if self.total and self.n < self.total:
279 self.disp(bar_style='danger', check_delay=False)
280 else:
281 if self.leave:
282 self.disp(bar_style='success', check_delay=False)
283 else:
284 self.disp(close=True, check_delay=False)
285
286 def clear(self, *_, **__):
287 pass

Callers 1

displayMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected