poplib.POP3_SSL.stls unconditionally raises an exception (#7191)

Source code here: 0ae4019179/Lib/poplib.py (L460)

We have to keep the method in the stub, as it's overriding a method in the superclass that doesn't unconditionally raise.
This commit is contained in:
Alex Waygood
2022-02-16 15:02:00 +00:00
committed by GitHub
parent a599af5c74
commit fef3a71459

View File

@@ -1,6 +1,6 @@
import socket
import ssl
from typing import Any, BinaryIO, Pattern, overload
from typing import Any, BinaryIO, NoReturn, Pattern, overload
from typing_extensions import Literal
_LongResp = tuple[bytes, list[bytes], int]
@@ -59,4 +59,4 @@ class POP3_SSL(POP3):
context: ssl.SSLContext | None = ...,
) -> None: ...
# "context" is actually the last argument, but that breaks LSP and it doesn't really matter because all the arguments are ignored
def stls(self, context: Any = ..., keyfile: Any = ..., certfile: Any = ...) -> bytes: ...
def stls(self, context: Any = ..., keyfile: Any = ..., certfile: Any = ...) -> NoReturn: ...