mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 21:14:48 +08:00
Big diff: Use new "|" union syntax (#5872)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import socket
|
||||
import ssl
|
||||
from typing import Any, BinaryIO, Dict, List, Optional, Pattern, Tuple, overload
|
||||
from typing import Any, BinaryIO, Dict, List, Pattern, Tuple, overload
|
||||
|
||||
_LongResp = Tuple[bytes, List[bytes], int]
|
||||
|
||||
@@ -25,7 +25,7 @@ class POP3:
|
||||
def user(self, user: str) -> bytes: ...
|
||||
def pass_(self, pswd: str) -> bytes: ...
|
||||
def stat(self) -> Tuple[int, int]: ...
|
||||
def list(self, which: Optional[Any] = ...) -> _LongResp: ...
|
||||
def list(self, which: Any | None = ...) -> _LongResp: ...
|
||||
def retr(self, which: Any) -> _LongResp: ...
|
||||
def dele(self, which: Any) -> bytes: ...
|
||||
def noop(self) -> bytes: ...
|
||||
@@ -42,17 +42,17 @@ class POP3:
|
||||
def uidl(self, which: Any) -> bytes: ...
|
||||
def utf8(self) -> bytes: ...
|
||||
def capa(self) -> Dict[str, List[str]]: ...
|
||||
def stls(self, context: Optional[ssl.SSLContext] = ...) -> bytes: ...
|
||||
def stls(self, context: ssl.SSLContext | None = ...) -> bytes: ...
|
||||
|
||||
class POP3_SSL(POP3):
|
||||
def __init__(
|
||||
self,
|
||||
host: str,
|
||||
port: int = ...,
|
||||
keyfile: Optional[str] = ...,
|
||||
certfile: Optional[str] = ...,
|
||||
keyfile: str | None = ...,
|
||||
certfile: str | None = ...,
|
||||
timeout: float = ...,
|
||||
context: Optional[ssl.SSLContext] = ...,
|
||||
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: ...
|
||||
|
||||
Reference in New Issue
Block a user