Big diff: Use new "|" union syntax (#5872)

This commit is contained in:
Akuli
2021-08-08 12:05:21 +03:00
committed by GitHub
parent b9adb7a874
commit ee487304d7
578 changed files with 8080 additions and 8966 deletions

View File

@@ -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: ...