mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-23 19:41:51 +08:00
clean python 3 specific stuff from stdlib/@python2 stubs (#5451)
This commit is contained in:
@@ -31,12 +31,8 @@ class IMAP4:
|
||||
welcome: bytes = ...
|
||||
capabilities: Tuple[str] = ...
|
||||
PROTOCOL_VERSION: str = ...
|
||||
if sys.version_info >= (3, 9):
|
||||
def __init__(self, host: str = ..., port: int = ..., timeout: Optional[float] = ...) -> None: ...
|
||||
def open(self, host: str = ..., port: int = ..., timeout: Optional[float] = ...) -> None: ...
|
||||
else:
|
||||
def __init__(self, host: str = ..., port: int = ...) -> None: ...
|
||||
def open(self, host: str = ..., port: int = ...) -> None: ...
|
||||
def __init__(self, host: str = ..., port: int = ...) -> None: ...
|
||||
def open(self, host: str = ..., port: int = ...) -> None: ...
|
||||
def __getattr__(self, attr: str) -> Any: ...
|
||||
host: str = ...
|
||||
port: int = ...
|
||||
@@ -58,10 +54,6 @@ 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 expunge(self) -> _CommandResults: ...
|
||||
def fetch(self, message_set: str, message_parts: str) -> Tuple[str, _AnyResponseData]: ...
|
||||
def getacl(self, mailbox: str) -> _CommandResults: ...
|
||||
@@ -85,54 +77,25 @@ 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 status(self, mailbox: str, names: str) -> _CommandResults: ...
|
||||
def store(self, message_set: str, command: str, flags: str) -> _CommandResults: ...
|
||||
def subscribe(self, mailbox: str) -> _CommandResults: ...
|
||||
def thread(self, threading_algorithm: str, charset: str, *search_criteria: str) -> _CommandResults: ...
|
||||
def uid(self, command: str, *args: str) -> _CommandResults: ...
|
||||
def unsubscribe(self, mailbox: str) -> _CommandResults: ...
|
||||
if sys.version_info >= (3, 9):
|
||||
def unselect(self) -> _CommandResults: ...
|
||||
def xatom(self, name: str, *args: str) -> _CommandResults: ...
|
||||
def print_log(self) -> None: ...
|
||||
|
||||
class IMAP4_SSL(IMAP4):
|
||||
keyfile: str = ...
|
||||
certfile: str = ...
|
||||
if sys.version_info >= (3, 9):
|
||||
def __init__(
|
||||
self,
|
||||
host: str = ...,
|
||||
port: int = ...,
|
||||
keyfile: Optional[str] = ...,
|
||||
certfile: Optional[str] = ...,
|
||||
ssl_context: Optional[SSLContext] = ...,
|
||||
timeout: Optional[float] = ...,
|
||||
) -> None: ...
|
||||
elif sys.version_info >= (3, 3):
|
||||
def __init__(
|
||||
self,
|
||||
host: str = ...,
|
||||
port: int = ...,
|
||||
keyfile: Optional[str] = ...,
|
||||
certfile: Optional[str] = ...,
|
||||
ssl_context: Optional[SSLContext] = ...,
|
||||
) -> None: ...
|
||||
else:
|
||||
def __init__(
|
||||
self, host: str = ..., port: int = ..., keyfile: Optional[str] = ..., certfile: Optional[str] = ...
|
||||
) -> None: ...
|
||||
def __init__(self, host: str = ..., port: int = ..., keyfile: Optional[str] = ..., certfile: Optional[str] = ...) -> None: ...
|
||||
host: str = ...
|
||||
port: int = ...
|
||||
sock: _socket = ...
|
||||
sslobj: SSLSocket = ...
|
||||
file: IO[Any] = ...
|
||||
if sys.version_info >= (3, 9):
|
||||
def open(self, host: str = ..., port: Optional[int] = ..., timeout: Optional[float] = ...) -> None: ...
|
||||
else:
|
||||
def open(self, host: str = ..., port: Optional[int] = ...) -> None: ...
|
||||
def open(self, host: str = ..., port: Optional[int] = ...) -> None: ...
|
||||
def read(self, size: int) -> bytes: ...
|
||||
def readline(self) -> bytes: ...
|
||||
def send(self, data: bytes) -> None: ...
|
||||
@@ -150,10 +113,7 @@ class IMAP4_stream(IMAP4):
|
||||
process: subprocess.Popen[bytes] = ...
|
||||
writefile: IO[Any] = ...
|
||||
readfile: IO[Any] = ...
|
||||
if sys.version_info >= (3, 9):
|
||||
def open(self, host: Optional[str] = ..., port: Optional[int] = ..., timeout: Optional[float] = ...) -> None: ...
|
||||
else:
|
||||
def open(self, host: Optional[str] = ..., port: Optional[int] = ...) -> None: ...
|
||||
def open(self, host: Optional[str] = ..., port: Optional[int] = ...) -> None: ...
|
||||
def read(self, size: int) -> bytes: ...
|
||||
def readline(self) -> bytes: ...
|
||||
def send(self, data: bytes) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user