Add precise overloads for SSLContext.get_ca_certs (#7933)

This commit is contained in:
Amy Pircher
2022-05-23 17:06:09 -07:00
committed by GitHub
parent b4518bfb2b
commit 8a07787f48
2 changed files with 12 additions and 2 deletions

View File

@@ -412,7 +412,12 @@ class SSLContext:
def load_verify_locations(
self, cafile: StrOrBytesPath | None = ..., capath: StrOrBytesPath | None = ..., cadata: str | bytes | None = ...
) -> None: ...
def get_ca_certs(self, binary_form: bool = ...) -> list[_PeerCertRetDictType] | list[bytes]: ...
@overload
def get_ca_certs(self, binary_form: Literal[False] = ...) -> list[_PeerCertRetDictType]: ...
@overload
def get_ca_certs(self, binary_form: Literal[True]) -> list[bytes]: ...
@overload
def get_ca_certs(self, binary_form: bool = ...) -> Any: ...
def get_ciphers(self) -> list[_Cipher]: ...
def set_default_verify_paths(self) -> None: ...
def set_ciphers(self, __cipherlist: str) -> None: ...