mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 12:44:28 +08:00
Use PEP 570 syntax in stdlib (#11250)
This commit is contained in:
@@ -98,14 +98,14 @@ else:
|
||||
|
||||
_create_default_https_context: Callable[..., SSLContext]
|
||||
|
||||
def RAND_bytes(__n: int) -> bytes: ...
|
||||
def RAND_bytes(n: int, /) -> bytes: ...
|
||||
|
||||
if sys.version_info < (3, 12):
|
||||
def RAND_pseudo_bytes(__n: int) -> tuple[bytes, bool]: ...
|
||||
def RAND_pseudo_bytes(n: int, /) -> tuple[bytes, bool]: ...
|
||||
|
||||
def RAND_status() -> bool: ...
|
||||
def RAND_egd(path: str) -> None: ...
|
||||
def RAND_add(__string: str | ReadableBuffer, __entropy: float) -> None: ...
|
||||
def RAND_add(string: str | ReadableBuffer, entropy: float, /) -> None: ...
|
||||
|
||||
if sys.version_info < (3, 12):
|
||||
def match_hostname(cert: _PeerCertRetDictType, hostname: str) -> None: ...
|
||||
@@ -422,12 +422,12 @@ class SSLContext:
|
||||
def get_ca_certs(self, binary_form: bool = False) -> Any: ...
|
||||
def get_ciphers(self) -> list[_Cipher]: ...
|
||||
def set_default_verify_paths(self) -> None: ...
|
||||
def set_ciphers(self, __cipherlist: str) -> None: ...
|
||||
def set_ciphers(self, cipherlist: str, /) -> None: ...
|
||||
def set_alpn_protocols(self, alpn_protocols: Iterable[str]) -> None: ...
|
||||
def set_npn_protocols(self, npn_protocols: Iterable[str]) -> None: ...
|
||||
def set_servername_callback(self, server_name_callback: _SrvnmeCbType | None) -> None: ...
|
||||
def load_dh_params(self, __path: str) -> None: ...
|
||||
def set_ecdh_curve(self, __name: str) -> None: ...
|
||||
def load_dh_params(self, path: str, /) -> None: ...
|
||||
def set_ecdh_curve(self, name: str, /) -> None: ...
|
||||
def wrap_socket(
|
||||
self,
|
||||
sock: socket.socket,
|
||||
@@ -481,8 +481,8 @@ class SSLObject:
|
||||
class MemoryBIO:
|
||||
pending: int
|
||||
eof: bool
|
||||
def read(self, __size: int = -1) -> bytes: ...
|
||||
def write(self, __b: ReadableBuffer) -> int: ...
|
||||
def read(self, size: int = -1, /) -> bytes: ...
|
||||
def write(self, b: ReadableBuffer, /) -> int: ...
|
||||
def write_eof(self) -> None: ...
|
||||
|
||||
@final
|
||||
@@ -497,7 +497,7 @@ class SSLSession:
|
||||
def time(self) -> int: ...
|
||||
@property
|
||||
def timeout(self) -> int: ...
|
||||
def __eq__(self, __value: object) -> bool: ...
|
||||
def __eq__(self, value: object, /) -> bool: ...
|
||||
|
||||
class SSLErrorNumber(enum.IntEnum):
|
||||
SSL_ERROR_EOF: int
|
||||
|
||||
Reference in New Issue
Block a user