mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-10-04 19:28:50 +08:00
Add @type_check_only to stub-only private classes in stdlib (#14512)
This commit is contained in:
1 parent
dde70aeecd
commit
622df68c1c
61 files changed
+188
-51
No files matched your search
@@ -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