mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-20 07:19:46 +08:00
Consistently use Generic as the last base class (#10610)
This commit is contained in:
@@ -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]
|
||||
|
||||
@@ -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__(
|
||||
|
||||
@@ -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__(
|
||||
|
||||
@@ -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__(
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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: ...
|
||||
|
||||
@@ -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]
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user