mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 05:24:52 +08:00
Add more defaults to the stdlib (#9606)
Continuing work towards #8988. The first five commits were created using stubdefaulter on various Python versions; the following commits were all created manually by me to fix various problems. The main things this adds that weren't present in #9501 are: - Defaults in Windows-only modules and Windows-only branches (because I'm running a Windows machine) - Defaults in non-py311 branches - Defaults for float parameters - Defaults for overloads
This commit is contained in:
@@ -48,7 +48,7 @@ if sys.version_info < (3, 11):
|
||||
_need_ssldata: bool
|
||||
_handshake_cb: Callable[[BaseException | None], None] | None
|
||||
_shutdown_cb: Callable[[], None] | None
|
||||
def __init__(self, context: ssl.SSLContext, server_side: bool, server_hostname: str | None = ...) -> None: ...
|
||||
def __init__(self, context: ssl.SSLContext, server_side: bool, server_hostname: str | None = None) -> None: ...
|
||||
@property
|
||||
def context(self) -> ssl.SSLContext: ...
|
||||
@property
|
||||
@@ -57,11 +57,11 @@ if sys.version_info < (3, 11):
|
||||
def need_ssldata(self) -> bool: ...
|
||||
@property
|
||||
def wrapped(self) -> bool: ...
|
||||
def do_handshake(self, callback: Callable[[BaseException | None], object] | None = ...) -> list[bytes]: ...
|
||||
def shutdown(self, callback: Callable[[], object] | None = ...) -> list[bytes]: ...
|
||||
def do_handshake(self, callback: Callable[[BaseException | None], object] | None = None) -> list[bytes]: ...
|
||||
def shutdown(self, callback: Callable[[], object] | None = None) -> list[bytes]: ...
|
||||
def feed_eof(self) -> None: ...
|
||||
def feed_ssldata(self, data: bytes, only_handshake: bool = ...) -> tuple[list[bytes], list[bytes]]: ...
|
||||
def feed_appdata(self, data: bytes, offset: int = ...) -> tuple[list[bytes], int]: ...
|
||||
def feed_ssldata(self, data: bytes, only_handshake: bool = False) -> tuple[list[bytes], list[bytes]]: ...
|
||||
def feed_appdata(self, data: bytes, offset: int = 0) -> tuple[list[bytes], int]: ...
|
||||
|
||||
class _SSLProtocolTransport(transports._FlowControlMixin, transports.Transport):
|
||||
|
||||
@@ -131,10 +131,10 @@ class SSLProtocol(_SSLProtocolBase):
|
||||
app_protocol: protocols.BaseProtocol,
|
||||
sslcontext: ssl.SSLContext,
|
||||
waiter: futures.Future[Any],
|
||||
server_side: bool = ...,
|
||||
server_hostname: str | None = ...,
|
||||
call_connection_made: bool = ...,
|
||||
ssl_handshake_timeout: int | None = ...,
|
||||
server_side: bool = False,
|
||||
server_hostname: str | None = None,
|
||||
call_connection_made: bool = True,
|
||||
ssl_handshake_timeout: int | None = None,
|
||||
) -> None: ...
|
||||
|
||||
def _set_app_protocol(self, app_protocol: protocols.BaseProtocol) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user