Consistently use Generic as the last base class (#10610)

This commit is contained in:
Nikita Sobolev
2023-08-28 11:16:54 +03:00
committed by GitHub
parent 3b9ab5e9b1
commit 2c1db00761
15 changed files with 17 additions and 17 deletions
+1 -1
View File
@@ -9,7 +9,7 @@ __all__ = ["tqdm_asyncio", "tarange", "tqdm", "trange"]
_T = TypeVar("_T")
class tqdm_asyncio(Generic[_T], std_tqdm[_T]):
class tqdm_asyncio(std_tqdm[_T], Generic[_T]):
iterable_awaitable: bool
iterable_next: Callable[[], _T | Awaitable[_T]]
iterable_iterator: Iterator[_T]
+1 -1
View File
@@ -15,7 +15,7 @@ class DiscordIO(MonoWorker):
_T = TypeVar("_T")
class tqdm_discord(Generic[_T], tqdm_auto[_T]):
class tqdm_discord(tqdm_auto[_T], Generic[_T]):
dio: Incomplete
@overload
def __init__(
+1 -1
View File
@@ -16,7 +16,7 @@ class SlackIO(MonoWorker):
_T = TypeVar("_T")
class tqdm_slack(Generic[_T], tqdm_auto[_T]):
class tqdm_slack(tqdm_auto[_T], Generic[_T]):
sio: Incomplete
@overload
def __init__(
+1 -1
View File
@@ -21,7 +21,7 @@ class TelegramIO(MonoWorker):
_T = TypeVar("_T")
class tqdm_telegram(Generic[_T], tqdm_auto[_T]):
class tqdm_telegram(tqdm_auto[_T], Generic[_T]):
tgio: Incomplete
@overload
def __init__(
+1 -1
View File
@@ -8,7 +8,7 @@ __all__ = ["tqdm_gui", "tgrange", "tqdm", "trange"]
_T = TypeVar("_T")
class tqdm_gui(Generic[_T], std_tqdm[_T]):
class tqdm_gui(std_tqdm[_T], Generic[_T]):
mpl: Incomplete
plt: Incomplete
toolbar: Incomplete
+1 -1
View File
@@ -8,7 +8,7 @@ __all__ = ["tqdm_notebook", "tnrange", "tqdm", "trange"]
_T = TypeVar("_T")
class tqdm_notebook(Generic[_T], std_tqdm[_T]):
class tqdm_notebook(std_tqdm[_T], Generic[_T]):
@staticmethod
def status_printer(
_: SupportsWrite[str] | None, total: float | None = None, desc: str | None = None, ncols: int | None = None
+1 -1
View File
@@ -33,7 +33,7 @@ class RateColumn(_ProgressColumn):
_T = TypeVar("_T")
class tqdm_rich(Generic[_T], std_tqdm[_T]):
class tqdm_rich(std_tqdm[_T], Generic[_T]):
def close(self) -> None: ...
def clear(self, *_, **__) -> None: ...
def display(self, *_, **__) -> None: ...
+1 -1
View File
@@ -31,7 +31,7 @@ class TqdmMonitorWarning(TqdmWarning, RuntimeWarning): ...
_T = TypeVar("_T")
class tqdm(Generic[_T], Iterable[_T], Comparable):
class tqdm(Iterable[_T], Comparable, Generic[_T]):
monitor_interval: ClassVar[int]
monitor: ClassVar[TMonitor | None]
+1 -1
View File
@@ -8,7 +8,7 @@ __all__ = ["tqdm_tk", "ttkrange", "tqdm", "trange"]
_T = TypeVar("_T")
class tqdm_tk(Generic[_T], std_tqdm[_T]):
class tqdm_tk(std_tqdm[_T], Generic[_T]):
@overload
def __init__(
self,