MCPcopy Create free account
hub / github.com/TencentARC/BrushNet / EmptyTqdm

Class EmptyTqdm

src/diffusers/utils/logging.py:280–301  ·  view source on GitHub ↗

Dummy tqdm which doesn't do anything.

Source from the content-addressed store, hash-verified

278
279
280class EmptyTqdm:
281 """Dummy tqdm which doesn't do anything."""
282
283 def __init__(self, *args, **kwargs): # pylint: disable=unused-argument
284 self._iterator = args[0] if args else None
285
286 def __iter__(self):
287 return iter(self._iterator)
288
289 def __getattr__(self, _):
290 """Return empty function."""
291
292 def empty_fn(*args, **kwargs): # pylint: disable=unused-argument
293 return
294
295 return empty_fn
296
297 def __enter__(self):
298 return self
299
300 def __exit__(self, type_, value, traceback):
301 return
302
303
304class _tqdm_cls:

Callers 1

__call__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected