mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-07-29 03:06:43 +08:00
Add @type_check_only to stub-only private classes in stdlib (#14512)
This commit is contained in:
@@ -3,7 +3,7 @@ import sys
|
||||
from _typeshed import ReadableBuffer, StrPath
|
||||
from collections.abc import Awaitable, Callable, Iterable, Sequence, Sized
|
||||
from types import ModuleType
|
||||
from typing import Any, Protocol, SupportsIndex
|
||||
from typing import Any, Protocol, SupportsIndex, type_check_only
|
||||
from typing_extensions import Self, TypeAlias
|
||||
|
||||
from . import events, protocols, transports
|
||||
@@ -25,6 +25,7 @@ else:
|
||||
|
||||
_ClientConnectedCallback: TypeAlias = Callable[[StreamReader, StreamWriter], Awaitable[None] | None]
|
||||
|
||||
@type_check_only
|
||||
class _ReaduntilBuffer(ReadableBuffer, Sized, Protocol): ...
|
||||
|
||||
if sys.version_info >= (3, 10):
|
||||
|
||||
Reference in New Issue
Block a user