mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-07-19 14:40:30 +08:00
Add @type_check_only to stub-only private classes in stdlib (#14512)
This commit is contained in:
+3
-1
@@ -12,7 +12,7 @@ from ssl import (
|
||||
SSLWantWriteError as SSLWantWriteError,
|
||||
SSLZeroReturnError as SSLZeroReturnError,
|
||||
)
|
||||
from typing import Any, ClassVar, Literal, TypedDict, final, overload
|
||||
from typing import Any, ClassVar, Literal, TypedDict, final, overload, type_check_only
|
||||
from typing_extensions import NotRequired, Self, TypeAlias
|
||||
|
||||
_PasswordType: TypeAlias = Callable[[], str | bytes | bytearray] | str | bytes | bytearray
|
||||
@@ -20,6 +20,7 @@ _PCTRTT: TypeAlias = tuple[tuple[str, str], ...]
|
||||
_PCTRTTT: TypeAlias = tuple[_PCTRTT, ...]
|
||||
_PeerCertRetDictType: TypeAlias = dict[str, str | _PCTRTTT | _PCTRTT]
|
||||
|
||||
@type_check_only
|
||||
class _Cipher(TypedDict):
|
||||
aead: bool
|
||||
alg_bits: int
|
||||
@@ -33,6 +34,7 @@ class _Cipher(TypedDict):
|
||||
strength_bits: int
|
||||
symmetric: str
|
||||
|
||||
@type_check_only
|
||||
class _CertInfo(TypedDict):
|
||||
subject: tuple[tuple[tuple[str, str], ...], ...]
|
||||
issuer: tuple[tuple[tuple[str, str], ...], ...]
|
||||
|
||||
Reference in New Issue
Block a user