MCPcopy Create free account
hub / github.com/YesianRohn/TextSSR / EmptyTqdm

Class EmptyTqdm

diffusers/src/diffusers/utils/logging.py:282–303  ·  view source on GitHub ↗

Dummy tqdm which doesn't do anything.

Source from the content-addressed store, hash-verified

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

Callers 1

__call__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected