Akuli and srittau: Remove Python 2 branches from Python 3 stubs (#5461)

* run script and do some manual changes (Akuli)

* do the whole thing manually (srittau)

* merge changes (Akuli)

Co-authored-by: Sebastian Rittau <srittau@rittau.biz>
This commit is contained in:
Akuli
2021-05-15 15:33:39 +03:00
committed by GitHub
parent b0ef85288d
commit 17dcea4a68
106 changed files with 1539 additions and 3275 deletions

View File

@@ -58,10 +58,9 @@ class IMAP4:
def create(self, mailbox: str) -> _CommandResults: ...
def delete(self, mailbox: str) -> _CommandResults: ...
def deleteacl(self, mailbox: str, who: str) -> _CommandResults: ...
if sys.version_info >= (3, 5):
def enable(self, capability: str) -> _CommandResults: ...
def __enter__(self) -> IMAP4: ...
def __exit__(self, t: Optional[Type[BaseException]], v: Optional[BaseException], tb: Optional[TracebackType]) -> None: ...
def enable(self, capability: str) -> _CommandResults: ...
def __enter__(self) -> IMAP4: ...
def __exit__(self, t: Optional[Type[BaseException]], v: Optional[BaseException], tb: Optional[TracebackType]) -> None: ...
def expunge(self) -> _CommandResults: ...
def fetch(self, message_set: str, message_parts: str) -> Tuple[str, _AnyResponseData]: ...
def getacl(self, mailbox: str) -> _CommandResults: ...
@@ -85,8 +84,7 @@ class IMAP4:
def setannotation(self, *args: str) -> _CommandResults: ...
def setquota(self, root: str, limits: str) -> _CommandResults: ...
def sort(self, sort_criteria: str, charset: str, *search_criteria: str) -> _CommandResults: ...
if sys.version_info >= (3,):
def starttls(self, ssl_context: Optional[Any] = ...) -> Tuple[Literal["OK"], List[None]]: ...
def starttls(self, ssl_context: Optional[Any] = ...) -> Tuple[Literal["OK"], List[None]]: ...
def status(self, mailbox: str, names: str) -> _CommandResults: ...
def store(self, message_set: str, command: str, flags: str) -> _CommandResults: ...
def subscribe(self, mailbox: str) -> _CommandResults: ...
@@ -111,7 +109,7 @@ class IMAP4_SSL(IMAP4):
ssl_context: Optional[SSLContext] = ...,
timeout: Optional[float] = ...,
) -> None: ...
elif sys.version_info >= (3, 3):
else:
def __init__(
self,
host: str = ...,
@@ -120,10 +118,6 @@ class IMAP4_SSL(IMAP4):
certfile: Optional[str] = ...,
ssl_context: Optional[SSLContext] = ...,
) -> None: ...
else:
def __init__(
self, host: str = ..., port: int = ..., keyfile: Optional[str] = ..., certfile: Optional[str] = ...
) -> None: ...
host: str = ...
port: int = ...
sock: _socket = ...