comparison CSP2/CSP2_env/env-d9b9114564458d9d-741b3de822f2aaca6c6caa4325c4afce/lib/python3.8/site-packages/tqdm/auto.py @ 68:5028fdace37b

planemo upload commit 2e9511a184a1ca667c7be0c6321a36dc4e3d116d
author jpayne
date Tue, 18 Mar 2025 16:23:26 -0400
parents
children
comparison
equal deleted inserted replaced
67:0e9998148a16 68:5028fdace37b
1 """
2 Enables multiple commonly used features.
3
4 Method resolution order:
5
6 - `tqdm.autonotebook` without import warnings
7 - `tqdm.asyncio`
8 - `tqdm.std` base class
9
10 Usage:
11 >>> from tqdm.auto import trange, tqdm
12 >>> for i in trange(10):
13 ... ...
14 """
15 import warnings
16
17 from .std import TqdmExperimentalWarning
18
19 with warnings.catch_warnings():
20 warnings.simplefilter("ignore", category=TqdmExperimentalWarning)
21 from .autonotebook import tqdm as notebook_tqdm
22
23 from .asyncio import tqdm as asyncio_tqdm
24 from .std import tqdm as std_tqdm
25
26 if notebook_tqdm != std_tqdm:
27 class tqdm(notebook_tqdm, asyncio_tqdm): # pylint: disable=inconsistent-mro
28 pass
29 else:
30 tqdm = asyncio_tqdm
31
32
33 def trange(*args, **kwargs):
34 """
35 A shortcut for `tqdm.auto.tqdm(range(*args), **kwargs)`.
36 """
37 return tqdm(range(*args), **kwargs)
38
39
40 __all__ = ["tqdm", "trange"]