diff --git a/stubs/tqdm/@tests/stubtest_allowlist.txt b/stubs/tqdm/@tests/stubtest_allowlist.txt index b142ecf1f..d27720207 100644 --- a/stubs/tqdm/@tests/stubtest_allowlist.txt +++ b/stubs/tqdm/@tests/stubtest_allowlist.txt @@ -1,4 +1,2 @@ # Cannot import in stubtest tqdm.__main__ -# disco-py fails to install through pip and is an archived project -tqdm.contrib.discord diff --git a/stubs/tqdm/METADATA.toml b/stubs/tqdm/METADATA.toml index b24cf310c..fddf4c03e 100644 --- a/stubs/tqdm/METADATA.toml +++ b/stubs/tqdm/METADATA.toml @@ -1,5 +1,6 @@ -version = "4.66.*" +version = "4.67.*" upstream_repository = "https://github.com/tqdm/tqdm" +requires = ["types-requests"] [tool.stubtest] extras = ["slack", "telegram"] diff --git a/stubs/tqdm/tqdm/contrib/discord.pyi b/stubs/tqdm/tqdm/contrib/discord.pyi index b60753658..20f141c3a 100644 --- a/stubs/tqdm/tqdm/contrib/discord.pyi +++ b/stubs/tqdm/tqdm/contrib/discord.pyi @@ -1,17 +1,28 @@ from _typeshed import Incomplete, SupportsWrite from collections.abc import Iterable, Mapping +from concurrent.futures import Future from typing import NoReturn, TypeVar, overload +from requests import Session + from ..auto import tqdm as tqdm_auto from .utils_worker import MonoWorker __all__ = ["DiscordIO", "tqdm_discord", "tdrange", "tqdm", "trange"] class DiscordIO(MonoWorker): - text: Incomplete + API: str = "https://discord.com/api/v10" + UA: str = ... + channel_id: Incomplete message: Incomplete + session: Session + text: Incomplete + token: Incomplete def __init__(self, token, channel_id) -> None: ... def write(self, s): ... + def delete(self) -> Future[Incomplete]: ... + @property + def message_id(self): ... _T = TypeVar("_T") @@ -79,8 +90,8 @@ class tqdm_discord(tqdm_auto[_T]): gui: bool = ..., **kwargs, ) -> None: ... - def display( - self, msg: str | None = ..., pos: int | None = ..., close: bool = ..., bar_style=..., check_delay: bool = ... + def display( # type: ignore[override] + self, *, msg: str | None = ..., pos: int | None = ..., close: bool = ..., bar_style=..., check_delay: bool = ... ) -> None: ... def clear(self, *args, **kwargs) -> None: ...