Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b50ebaf

Browse files
authored
Tighten return type of OpenSSL Connection.get_protocol_name() (#5972)
The method always returns a str. See implementation at: https://github.com/pyca/pyopenssl/blob/30e82d4ba5e3817a77e212540477da701460e988/src/OpenSSL/SSL.py#L2420-L2430 If version were ever None, it would raise an exception on the .decode() line.
1 parent 3dbaf34 commit b50ebaf

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

stubs/pyOpenSSL/OpenSSL/SSL.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ class Connection(object):
131131
def get_peer_cert_chain(self) -> list[X509]: ...
132132
def get_alpn_proto_negotiated(self) -> bytes: ...
133133
def get_cipher_name(self) -> str | None: ...
134-
def get_protocol_version_name(self) -> str | None: ...
134+
def get_protocol_version_name(self) -> str: ...
135135
def get_shutdown(self) -> int: ...
136136
def get_app_data(self) -> Any: ...
137137
def set_app_data(self, data: Any) -> None: ...

0 commit comments

Comments
 (0)