mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-02-25 11:07:17 +08:00
apply black and isort (#4287)
* apply black and isort * move some type ignores
This commit is contained in:
@@ -2,8 +2,9 @@ import subprocess
|
||||
import sys
|
||||
import time
|
||||
from socket import socket as _socket
|
||||
from ssl import SSLSocket, SSLContext
|
||||
from typing import Any, Callable, Dict, IO, List, Optional, Pattern, Text, Tuple, Type, Union
|
||||
from ssl import SSLContext, SSLSocket
|
||||
from typing import IO, Any, Callable, Dict, List, Optional, Pattern, Text, Tuple, Type, Union
|
||||
|
||||
from typing_extensions import Literal
|
||||
|
||||
# TODO: Commands should use their actual return types, not this type alias.
|
||||
@@ -99,11 +100,28 @@ 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: ...
|
||||
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: ...
|
||||
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 = ...
|
||||
@@ -120,7 +138,6 @@ class IMAP4_SSL(IMAP4):
|
||||
def socket(self) -> _socket: ...
|
||||
def ssl(self) -> SSLSocket: ...
|
||||
|
||||
|
||||
class IMAP4_stream(IMAP4):
|
||||
command: str = ...
|
||||
def __init__(self, command: str) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user