mirror of https://github.com/tqdm/tqdm.git
add missing docstrings
This commit is contained in:
parent
6b34fe8e2d
commit
6e470484c9
|
@ -41,6 +41,7 @@ def FakeEvent():
|
||||||
event = Event() # not a class in py2 so can't inherit
|
event = Event() # not a class in py2 so can't inherit
|
||||||
|
|
||||||
def wait(timeout=None):
|
def wait(timeout=None):
|
||||||
|
"""uses Time.fake_sleep"""
|
||||||
if timeout is not None:
|
if timeout is not None:
|
||||||
Time.fake_sleep(timeout)
|
Time.fake_sleep(timeout)
|
||||||
return event.is_set()
|
return event.is_set()
|
||||||
|
@ -50,8 +51,10 @@ def FakeEvent():
|
||||||
|
|
||||||
|
|
||||||
def patch_sleep(func):
|
def patch_sleep(func):
|
||||||
|
"""Temporarily makes TMonitor use Time.fake_sleep"""
|
||||||
@wraps(func)
|
@wraps(func)
|
||||||
def inner(*args, **kwargs):
|
def inner(*args, **kwargs):
|
||||||
|
"""restores TMonitor on completion regardless of Exceptions"""
|
||||||
TMonitor._test["time"] = Time.time
|
TMonitor._test["time"] = Time.time
|
||||||
TMonitor._test["Event"] = FakeEvent
|
TMonitor._test["Event"] = FakeEvent
|
||||||
if tqdm.monitor:
|
if tqdm.monitor:
|
||||||
|
|
Loading…
Reference in New Issue