mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-08-02 22:18:28 +08:00
Mark stub-only private symbols as @type_check_only in third-party stubs (#14545)
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Callable
|
||||
from typing import ClassVar
|
||||
from typing import ClassVar, type_check_only
|
||||
from typing_extensions import Self
|
||||
|
||||
__all__ = ["TqdmCallback"]
|
||||
|
||||
# dask.callbacks.Callback
|
||||
@type_check_only
|
||||
class _Callback:
|
||||
active: ClassVar[set[tuple[Callable[..., Incomplete] | None, ...]]]
|
||||
def __init__(
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from _typeshed import Incomplete, SupportsWrite
|
||||
from abc import ABC, abstractmethod
|
||||
from collections.abc import Iterable, Mapping
|
||||
from typing import NoReturn, TypeVar, overload
|
||||
from typing import NoReturn, TypeVar, overload, type_check_only
|
||||
|
||||
from .std import tqdm as std_tqdm
|
||||
|
||||
@@ -10,6 +10,7 @@ __all__ = ["tqdm_rich", "trrange", "tqdm", "trange"]
|
||||
_T = TypeVar("_T")
|
||||
|
||||
# Actually rich.progress.ProgressColumn
|
||||
@type_check_only
|
||||
class _ProgressColumn(ABC):
|
||||
max_refresh: float | None
|
||||
def __init__(self, table_column: Incomplete | None = ...) -> None: ...
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Callable, Mapping
|
||||
from re import Pattern
|
||||
from typing import Protocol, TypeVar
|
||||
from typing import Protocol, TypeVar, type_check_only
|
||||
from typing_extensions import ParamSpec
|
||||
|
||||
CUR_OS: str
|
||||
@@ -15,6 +15,7 @@ class FormatReplace:
|
||||
def __init__(self, replace: str = "") -> None: ...
|
||||
def __format__(self, _) -> str: ...
|
||||
|
||||
@type_check_only
|
||||
class _Has__Comparable(Protocol):
|
||||
_comparable: Incomplete
|
||||
|
||||
|
||||
Reference in New Issue
Block a user