mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-08-03 06:28:28 +08:00
Add @type_check_only to stub-only private classes in stdlib (#14512)
This commit is contained in:
@@ -9,7 +9,7 @@ from re import Pattern
|
||||
from socket import SocketKind, socket
|
||||
from threading import Thread
|
||||
from types import TracebackType
|
||||
from typing import Any, ClassVar, Final, Protocol, TypeVar
|
||||
from typing import Any, ClassVar, Final, Protocol, TypeVar, type_check_only
|
||||
from typing_extensions import Self
|
||||
|
||||
_T = TypeVar("_T")
|
||||
@@ -225,6 +225,7 @@ class HTTPHandler(Handler):
|
||||
def mapLogRecord(self, record: LogRecord) -> dict[str, Any]: ...
|
||||
def getConnection(self, host: str, secure: bool) -> http.client.HTTPConnection: ... # undocumented
|
||||
|
||||
@type_check_only
|
||||
class _QueueLike(Protocol[_T]):
|
||||
def get(self) -> _T: ...
|
||||
def put_nowait(self, item: _T, /) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user