-
-
Notifications
You must be signed in to change notification settings - Fork 106
Expand file tree
/
Copy path__init__.py
More file actions
57 lines (53 loc) · 1.31 KB
/
Copy path__init__.py
File metadata and controls
57 lines (53 loc) · 1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
"""Parallel execution with progress bars.
Private implementation package behind the public ``progressbar.map`` /
``imap`` / ``amap`` / ``run`` / ``Pool`` family. The package is private
(underscored) because the public surface includes a ``parallel``
*decorator* exported as ``progressbar.parallel`` -- a public
``progressbar/parallel.py`` module would clobber that attribute on
``import progressbar.parallel``.
Public names are re-exported lazily from ``progressbar/__init__.py``;
star-import-unsafe ones (``map``, ``imap``, ``gather``, ...) resolve
through the namespace only and stay out of ``progressbar.__all__``.
"""
from ._async import (
AsyncPool,
aimap,
aimap_unordered,
amap,
gather,
)
from ._common import current_task_bar
from ._decorator import (
ParallelFunction,
parallel,
)
from ._shell import run
from ._sync import (
Pool,
as_completed,
imap,
imap_unordered,
map, # noqa: A004 - intentional builtin name, namespaced use only
process_map,
starmap,
thread_map,
)
__all__ = [
'AsyncPool',
'ParallelFunction',
'Pool',
'aimap',
'aimap_unordered',
'amap',
'as_completed',
'current_task_bar',
'gather',
'imap',
'imap_unordered',
'map',
'parallel',
'process_map',
'run',
'starmap',
'thread_map',
]