Skip to content

Commit 0764f9f

Browse files
authored
tqdm: Add __all__ to __init__.pyi and submodules (#8308)
Fixes #8307
1 parent ed0b3a4 commit 0764f9f

23 files changed

+73
-0
lines changed

stubs/tqdm/tqdm/__init__.pyi

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,27 @@ from .std import (
1515
tqdm as tqdm,
1616
trange as trange,
1717
)
18+
from .version import __version__ as __version__
19+
20+
__all__ = [
21+
"tqdm",
22+
"tqdm_gui",
23+
"trange",
24+
"tgrange",
25+
"tqdm_pandas",
26+
"tqdm_notebook",
27+
"tnrange",
28+
"main",
29+
"TMonitor",
30+
"TqdmTypeError",
31+
"TqdmKeyError",
32+
"TqdmWarning",
33+
"TqdmDeprecationWarning",
34+
"TqdmExperimentalWarning",
35+
"TqdmMonitorWarning",
36+
"TqdmSynchronisationWarning",
37+
"__version__",
38+
]
1839

1940
def tqdm_notebook(*args, **kwargs) -> tqdm_notebook_cls[Incomplete]: ...
2041
def tnrange(*args, **kwargs) -> tqdm_notebook_cls[int]: ...

stubs/tqdm/tqdm/_monitor.pyi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
from _typeshed import Incomplete
22
from threading import Thread
33

4+
__all__ = ["TMonitor", "TqdmSynchronisationWarning"]
5+
46
class TqdmSynchronisationWarning(RuntimeWarning): ...
57

68
class TMonitor(Thread):

stubs/tqdm/tqdm/_tqdm_pandas.pyi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1+
__all__ = ["tqdm_pandas"]
2+
13
def tqdm_pandas(tclass, **tqdm_kwargs) -> None: ...

stubs/tqdm/tqdm/asyncio.pyi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ from typing import Generic, NoReturn, TypeVar, overload
44

55
from .std import tqdm as std_tqdm
66

7+
__all__ = ["tqdm_asyncio", "tarange", "tqdm", "trange"]
8+
79
_T = TypeVar("_T")
810

911
class tqdm_asyncio(Generic[_T], std_tqdm[_T]):

stubs/tqdm/tqdm/auto.pyi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
from .asyncio import tqdm as tqdm, trange as trange
2+
3+
__all__ = ["tqdm", "trange"]

stubs/tqdm/tqdm/autonotebook.pyi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
from .std import tqdm as tqdm, trange as trange
2+
3+
__all__ = ["tqdm", "trange"]

stubs/tqdm/tqdm/cli.pyi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
from collections.abc import Sequence
22

3+
__all__ = ["main"]
4+
35
def main(fp=..., argv: Sequence[str] | None = ...) -> None: ...

stubs/tqdm/tqdm/contrib/__init__.pyi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ from collections.abc import Callable, Generator
33

44
from ..utils import ObjectWrapper
55

6+
__all__ = ["tenumerate", "tzip", "tmap"]
7+
68
class DummyTqdmFile(ObjectWrapper):
79
def __init__(self, wrapped) -> None: ...
810
def write(self, x, nolock: bool = ...) -> None: ...

stubs/tqdm/tqdm/contrib/bells.pyi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
from ..auto import tqdm as tqdm, trange as trange
2+
3+
__all__ = ["tqdm", "trange"]
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1+
__all__ = ["thread_map", "process_map"]
2+
13
def thread_map(fn, *iterables, **tqdm_kwargs): ...
24
def process_map(fn, *iterables, **tqdm_kwargs): ...

stubs/tqdm/tqdm/contrib/discord.pyi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ from typing import Generic, NoReturn, TypeVar, overload
55
from ..auto import tqdm as tqdm_auto
66
from .utils_worker import MonoWorker
77

8+
__all__ = ["DiscordIO", "tqdm_discord", "tdrange", "tqdm", "trange"]
9+
810
class DiscordIO(MonoWorker):
911
text: Incomplete
1012
message: Incomplete

stubs/tqdm/tqdm/contrib/itertools.pyi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
from _typeshed import Incomplete
22
from collections.abc import Generator, Iterable
33

4+
__all__ = ["product"]
5+
46
def product(*iterables: Iterable[Incomplete], **tqdm_kwargs) -> Generator[Incomplete, None, None]: ...

stubs/tqdm/tqdm/contrib/slack.pyi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ from typing import Generic, NoReturn, TypeVar, overload
55
from ..auto import tqdm as tqdm_auto
66
from .utils_worker import MonoWorker
77

8+
__all__ = ["SlackIO", "tqdm_slack", "tsrange", "tqdm", "trange"]
9+
810
class SlackIO(MonoWorker):
911
client: Incomplete
1012
text: Incomplete

stubs/tqdm/tqdm/contrib/telegram.pyi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ from typing import Generic, NoReturn, TypeVar, overload
55
from ..auto import tqdm as tqdm_auto
66
from .utils_worker import MonoWorker
77

8+
__all__ = ["TelegramIO", "tqdm_telegram", "ttgrange", "tqdm", "trange"]
9+
810
class TelegramIO(MonoWorker):
911
API: str
1012
token: Incomplete

stubs/tqdm/tqdm/contrib/utils_worker.pyi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ from concurrent.futures import Future, ThreadPoolExecutor
55
from typing import TypeVar
66
from typing_extensions import ParamSpec
77

8+
__all__ = ["MonoWorker"]
9+
810
_P = ParamSpec("_P")
911
_R = TypeVar("_R")
1012

stubs/tqdm/tqdm/dask.pyi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ from _typeshed import Incomplete
22
from typing import Any
33
from typing_extensions import TypeAlias
44

5+
__all__ = ["TqdmCallback"]
6+
57
_Callback: TypeAlias = Any # Actually dask.callbacks.Callback
68

79
class TqdmCallback(_Callback):

stubs/tqdm/tqdm/gui.pyi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ from typing import Generic, NoReturn, TypeVar, overload
44

55
from .std import tqdm as std_tqdm
66

7+
__all__ = ["tqdm_gui", "tgrange", "tqdm", "trange"]
8+
79
_T = TypeVar("_T")
810

911
class tqdm_gui(Generic[_T], std_tqdm[_T]):

stubs/tqdm/tqdm/keras.pyi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ from _typeshed import Incomplete
22
from typing import Any
33
from typing_extensions import TypeAlias
44

5+
__all__ = ["TqdmCallback"]
6+
57
_Callback: TypeAlias = Any # Actually tensorflow.keras.callbacks.Callback
68

79
class TqdmCallback(_Callback):

stubs/tqdm/tqdm/notebook.pyi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ from typing import Generic, NoReturn, TypeVar, overload
44

55
from .std import tqdm as std_tqdm, trange as trange
66

7+
__all__ = ["tqdm_notebook", "tnrange", "tqdm", "trange"]
8+
79
_T = TypeVar("_T")
810

911
class tqdm_notebook(Generic[_T], std_tqdm[_T]):

stubs/tqdm/tqdm/rich.pyi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ from typing_extensions import TypeAlias
55

66
from .std import tqdm as std_tqdm
77

8+
__all__ = ["tqdm_rich", "trrange", "tqdm", "trange"]
9+
810
_ProgressColumn: TypeAlias = Any # Actually rich.progress.ProgressColumn
911

1012
class FractionColumn(_ProgressColumn):

stubs/tqdm/tqdm/std.pyi

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,17 @@ from typing_extensions import Literal
66

77
from .utils import Comparable
88

9+
__all__ = [
10+
"tqdm",
11+
"trange",
12+
"TqdmTypeError",
13+
"TqdmKeyError",
14+
"TqdmWarning",
15+
"TqdmExperimentalWarning",
16+
"TqdmDeprecationWarning",
17+
"TqdmMonitorWarning",
18+
]
19+
920
class TqdmTypeError(TypeError): ...
1021
class TqdmKeyError(KeyError): ...
1122

stubs/tqdm/tqdm/tk.pyi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ from typing import Generic, NoReturn, TypeVar, overload
44

55
from .std import tqdm as std_tqdm
66

7+
__all__ = ["tqdm_tk", "ttkrange", "tqdm", "trange"]
8+
79
_T = TypeVar("_T")
810

911
class tqdm_tk(Generic[_T], std_tqdm[_T]):

stubs/tqdm/tqdm/version.pyi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__version__: str

0 commit comments

Comments
 (0)