MCPcopy Create free account
hub / github.com/tensorflow/datasets / EmptyTqdm

Class EmptyTqdm

tensorflow_datasets/core/utils/tqdm_utils.py:58–79  ·  view source on GitHub ↗

Dummy tqdm which doesn't do anything.

Source from the content-addressed store, hash-verified

56
57
58class EmptyTqdm(object):
59 """Dummy tqdm which doesn't do anything."""
60
61 def __init__(self, *args, **kwargs): # pylint: disable=unused-argument
62 self._iterator = args[0] if args else None
63
64 def __iter__(self):
65 return iter(self._iterator)
66
67 def __getattr__(self, _):
68 """Return empty function."""
69
70 def empty_fn(*args, **kwargs): # pylint: disable=unused-argument
71 return
72
73 return empty_fn
74
75 def __enter__(self):
76 return self
77
78 def __exit__(self, type_, value, traceback):
79 return
80
81
82_active = True

Callers 2

tqdmFunction · 0.85
async_tqdmFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected