Skip to content

tqdm: Add all the __all__s #8308

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions stubs/tqdm/tqdm/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,27 @@ from .std import (
tqdm as tqdm,
trange as trange,
)
from .version import __version__ as __version__

__all__ = [
"tqdm",
"tqdm_gui",
"trange",
"tgrange",
"tqdm_pandas",
"tqdm_notebook",
"tnrange",
"main",
"TMonitor",
"TqdmTypeError",
"TqdmKeyError",
"TqdmWarning",
"TqdmDeprecationWarning",
"TqdmExperimentalWarning",
"TqdmMonitorWarning",
"TqdmSynchronisationWarning",
"__version__",
]

def tqdm_notebook(*args, **kwargs) -> tqdm_notebook_cls[Incomplete]: ...
def tnrange(*args, **kwargs) -> tqdm_notebook_cls[int]: ...
2 changes: 2 additions & 0 deletions stubs/tqdm/tqdm/_monitor.pyi
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
from _typeshed import Incomplete
from threading import Thread

__all__ = ["TMonitor", "TqdmSynchronisationWarning"]

class TqdmSynchronisationWarning(RuntimeWarning): ...

class TMonitor(Thread):
Expand Down
2 changes: 2 additions & 0 deletions stubs/tqdm/tqdm/_tqdm_pandas.pyi
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
__all__ = ["tqdm_pandas"]

def tqdm_pandas(tclass, **tqdm_kwargs) -> None: ...
2 changes: 2 additions & 0 deletions stubs/tqdm/tqdm/asyncio.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ from typing import Generic, NoReturn, TypeVar, overload

from .std import tqdm as std_tqdm

__all__ = ["tqdm_asyncio", "tarange", "tqdm", "trange"]

_T = TypeVar("_T")

class tqdm_asyncio(Generic[_T], std_tqdm[_T]):
Expand Down
2 changes: 2 additions & 0 deletions stubs/tqdm/tqdm/auto.pyi
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
from .asyncio import tqdm as tqdm, trange as trange

__all__ = ["tqdm", "trange"]
2 changes: 2 additions & 0 deletions stubs/tqdm/tqdm/autonotebook.pyi
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
from .std import tqdm as tqdm, trange as trange

__all__ = ["tqdm", "trange"]
2 changes: 2 additions & 0 deletions stubs/tqdm/tqdm/cli.pyi
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from collections.abc import Sequence

__all__ = ["main"]

def main(fp=..., argv: Sequence[str] | None = ...) -> None: ...
2 changes: 2 additions & 0 deletions stubs/tqdm/tqdm/contrib/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ from collections.abc import Callable, Generator

from ..utils import ObjectWrapper

__all__ = ["tenumerate", "tzip", "tmap"]

class DummyTqdmFile(ObjectWrapper):
def __init__(self, wrapped) -> None: ...
def write(self, x, nolock: bool = ...) -> None: ...
Expand Down
2 changes: 2 additions & 0 deletions stubs/tqdm/tqdm/contrib/bells.pyi
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
from ..auto import tqdm as tqdm, trange as trange

__all__ = ["tqdm", "trange"]
2 changes: 2 additions & 0 deletions stubs/tqdm/tqdm/contrib/concurrent.pyi
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
__all__ = ["thread_map", "process_map"]

def thread_map(fn, *iterables, **tqdm_kwargs): ...
def process_map(fn, *iterables, **tqdm_kwargs): ...
2 changes: 2 additions & 0 deletions stubs/tqdm/tqdm/contrib/discord.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ from typing import Generic, NoReturn, TypeVar, overload
from ..auto import tqdm as tqdm_auto
from .utils_worker import MonoWorker

__all__ = ["DiscordIO", "tqdm_discord", "tdrange", "tqdm", "trange"]

class DiscordIO(MonoWorker):
text: Incomplete
message: Incomplete
Expand Down
2 changes: 2 additions & 0 deletions stubs/tqdm/tqdm/contrib/itertools.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
from _typeshed import Incomplete
from collections.abc import Generator, Iterable

__all__ = ["product"]

def product(*iterables: Iterable[Incomplete], **tqdm_kwargs) -> Generator[Incomplete, None, None]: ...
2 changes: 2 additions & 0 deletions stubs/tqdm/tqdm/contrib/slack.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ from typing import Generic, NoReturn, TypeVar, overload
from ..auto import tqdm as tqdm_auto
from .utils_worker import MonoWorker

__all__ = ["SlackIO", "tqdm_slack", "tsrange", "tqdm", "trange"]

class SlackIO(MonoWorker):
client: Incomplete
text: Incomplete
Expand Down
2 changes: 2 additions & 0 deletions stubs/tqdm/tqdm/contrib/telegram.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ from typing import Generic, NoReturn, TypeVar, overload
from ..auto import tqdm as tqdm_auto
from .utils_worker import MonoWorker

__all__ = ["TelegramIO", "tqdm_telegram", "ttgrange", "tqdm", "trange"]

class TelegramIO(MonoWorker):
API: str
token: Incomplete
Expand Down
2 changes: 2 additions & 0 deletions stubs/tqdm/tqdm/contrib/utils_worker.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ from concurrent.futures import Future, ThreadPoolExecutor
from typing import TypeVar
from typing_extensions import ParamSpec

__all__ = ["MonoWorker"]

_P = ParamSpec("_P")
_R = TypeVar("_R")

Expand Down
2 changes: 2 additions & 0 deletions stubs/tqdm/tqdm/dask.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ from _typeshed import Incomplete
from typing import Any
from typing_extensions import TypeAlias

__all__ = ["TqdmCallback"]

_Callback: TypeAlias = Any # Actually dask.callbacks.Callback

class TqdmCallback(_Callback):
Expand Down
2 changes: 2 additions & 0 deletions stubs/tqdm/tqdm/gui.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ from typing import Generic, NoReturn, TypeVar, overload

from .std import tqdm as std_tqdm

__all__ = ["tqdm_gui", "tgrange", "tqdm", "trange"]

_T = TypeVar("_T")

class tqdm_gui(Generic[_T], std_tqdm[_T]):
Expand Down
2 changes: 2 additions & 0 deletions stubs/tqdm/tqdm/keras.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ from _typeshed import Incomplete
from typing import Any
from typing_extensions import TypeAlias

__all__ = ["TqdmCallback"]

_Callback: TypeAlias = Any # Actually tensorflow.keras.callbacks.Callback

class TqdmCallback(_Callback):
Expand Down
2 changes: 2 additions & 0 deletions stubs/tqdm/tqdm/notebook.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ from typing import Generic, NoReturn, TypeVar, overload

from .std import tqdm as std_tqdm, trange as trange

__all__ = ["tqdm_notebook", "tnrange", "tqdm", "trange"]

_T = TypeVar("_T")

class tqdm_notebook(Generic[_T], std_tqdm[_T]):
Expand Down
2 changes: 2 additions & 0 deletions stubs/tqdm/tqdm/rich.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ from typing_extensions import TypeAlias

from .std import tqdm as std_tqdm

__all__ = ["tqdm_rich", "trrange", "tqdm", "trange"]

_ProgressColumn: TypeAlias = Any # Actually rich.progress.ProgressColumn

class FractionColumn(_ProgressColumn):
Expand Down
11 changes: 11 additions & 0 deletions stubs/tqdm/tqdm/std.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,17 @@ from typing_extensions import Literal

from .utils import Comparable

__all__ = [
"tqdm",
"trange",
"TqdmTypeError",
"TqdmKeyError",
"TqdmWarning",
"TqdmExperimentalWarning",
"TqdmDeprecationWarning",
"TqdmMonitorWarning",
]

class TqdmTypeError(TypeError): ...
class TqdmKeyError(KeyError): ...

Expand Down
2 changes: 2 additions & 0 deletions stubs/tqdm/tqdm/tk.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ from typing import Generic, NoReturn, TypeVar, overload

from .std import tqdm as std_tqdm

__all__ = ["tqdm_tk", "ttkrange", "tqdm", "trange"]

_T = TypeVar("_T")

class tqdm_tk(Generic[_T], std_tqdm[_T]):
Expand Down
1 change: 1 addition & 0 deletions stubs/tqdm/tqdm/version.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__version__: str