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

@@ -225,7 +225,12 @@ class SSLContext:
def load_verify_locations(
self, cafile: StrPath | None = ..., capath: StrPath | None = ..., cadata: Text | 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 set_default_verify_paths(self) -> None: ...
def set_ciphers(self, __cipherlist: str) -> None: ...
def set_alpn_protocols(self, alpn_protocols: Iterable[str]) -> None: ...