Add @type_check_only to stub-only private classes in stdlib (#14512)

This commit is contained in:
Brian Schubert authored and GitHub committed 2025-08-03 10:13:16 +02:00
1 parent dde70aeecd
commit 622df68c1c
61 files changed
+188 -51

No files matched your search

+2 -1
View File
@@ -5,7 +5,7 @@ from builtins import list as _list # "list" conflicts with method name
from collections.abc import Callable, Container, Mapping, MutableMapping
from reprlib import Repr
from types import MethodType, ModuleType, TracebackType
from typing import IO, Any, AnyStr, Final, NoReturn, Protocol, TypeVar
from typing import IO, Any, AnyStr, Final, NoReturn, Protocol, TypeVar, type_check_only
from typing_extensions import TypeGuard, deprecated
__all__ = ["help"]
@@ -17,6 +17,7 @@ __date__: Final[str]
__version__: Final[str]
__credits__: Final[str]
@type_check_only
class _Pager(Protocol):
def __call__(self, text: str, title: str = "") -> None: ...