mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-21 03:11:16 +08:00
Complete stubtest and fix Any subclassing in tqdm (#9525)
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
# Cannot import in stubtest
|
||||
tqdm.__main__
|
||||
# disco-py fails to install through pip and is an archived project
|
||||
tqdm.contrib.discord
|
||||
|
||||
# Metaclass differs:
|
||||
tqdm.rich.FractionColumn
|
||||
tqdm.rich.RateColumn
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
version = "4.64.*"
|
||||
|
||||
[tool.stubtest]
|
||||
ignore_missing_stub = false
|
||||
extras = ["slack", "telegram"]
|
||||
|
||||
@@ -1,13 +1,20 @@
|
||||
from _typeshed import Incomplete, SupportsWrite
|
||||
from abc import ABC, abstractmethod
|
||||
from collections.abc import Iterable, Mapping
|
||||
from typing import Any, Generic, NoReturn, TypeVar, overload
|
||||
from typing_extensions import TypeAlias
|
||||
from typing import Generic, NoReturn, TypeVar, overload
|
||||
|
||||
from .std import tqdm as std_tqdm
|
||||
|
||||
__all__ = ["tqdm_rich", "trrange", "tqdm", "trange"]
|
||||
|
||||
_ProgressColumn: TypeAlias = Any # Actually rich.progress.ProgressColumn
|
||||
# Actually rich.progress.ProgressColumn
|
||||
class _ProgressColumn(ABC):
|
||||
max_refresh: float | None
|
||||
def __init__(self, table_column: Incomplete | None = ...) -> None: ...
|
||||
def get_table_column(self) -> Incomplete: ...
|
||||
def __call__(self, task: Incomplete) -> Incomplete: ...
|
||||
@abstractmethod
|
||||
def render(self, task: Incomplete) -> Incomplete: ...
|
||||
|
||||
class FractionColumn(_ProgressColumn):
|
||||
unit_scale: bool
|
||||
|
||||
Reference in New Issue
Block a user