apply black and isort (#4287)

* apply black and isort

* move some type ignores
This commit is contained in:
Jelle Zijlstra
2020-06-28 13:31:00 -07:00
committed by GitHub
parent fe58699ca5
commit 5d553c9584
800 changed files with 13875 additions and 10332 deletions

View File

@@ -1,8 +1,11 @@
def base64_len(s: bytes) -> int: ...
def header_encode(header, charset=..., keep_eols=..., maxlinelen=..., eol=...): ...
def encode(s, binary=..., maxlinelen=..., eol=...): ...
body_encode = encode
encodestring = encode
def decode(s, convert_eols=...): ...
body_decode = decode
decodestring = decode

View File

@@ -11,7 +11,6 @@ class BufferedSubFile:
def __iter__(self): ...
def next(self): ...
class FeedParser:
def __init__(self, _factory=...) -> None: ...
def feed(self, data) -> None: ...

View File

@@ -4,6 +4,5 @@ class Generator:
def flatten(self, msg, unixfrom: bool = ...) -> None: ...
def clone(self, fp): ...
class DecodedGenerator(Generator):
def __init__(self, outfp, mangle_from_: bool = ..., maxheaderlen: int = ..., fmt=...) -> None: ...

View File

@@ -2,8 +2,7 @@ def decode_header(header): ...
def make_header(decoded_seq, maxlinelen=..., header_name=..., continuation_ws=...): ...
class Header:
def __init__(self, s=..., charset=..., maxlinelen=..., header_name=..., continuation_ws=...,
errors=...) -> None: ...
def __init__(self, s=..., charset=..., maxlinelen=..., header_name=..., continuation_ws=..., errors=...) -> None: ...
def __unicode__(self): ...
def __eq__(self, other): ...
def __ne__(self, other): ...

View File

@@ -1,11 +1,11 @@
# Stubs for email.mime.application
from typing import Callable, Optional, Tuple, Union
from email.mime.nonmultipart import MIMENonMultipart
from typing import Callable, Optional, Tuple, Union
_ParamsType = Union[str, None, Tuple[str, Optional[str], str]]
class MIMEApplication(MIMENonMultipart):
def __init__(self, _data: bytes, _subtype: str = ...,
_encoder: Callable[[MIMEApplication], None] = ...,
**_params: _ParamsType) -> None: ...
def __init__(
self, _data: bytes, _subtype: str = ..., _encoder: Callable[[MIMEApplication], None] = ..., **_params: _ParamsType
) -> None: ...

View File

@@ -1,5 +1,4 @@
from email.mime.nonmultipart import MIMENonMultipart
class MIMEAudio(MIMENonMultipart):
def __init__(self, _audiodata, _subtype=..., _encoder=..., **_params) -> None: ...

View File

@@ -1,5 +1,4 @@
from email.mime.nonmultipart import MIMENonMultipart
class MIMEImage(MIMENonMultipart):
def __init__(self, _imagedata, _subtype=..., _encoder=..., **_params) -> None: ...

View File

@@ -1,5 +1,4 @@
from email.mime.nonmultipart import MIMENonMultipart
class MIMEMessage(MIMENonMultipart):
def __init__(self, _msg, _subtype=...) -> None: ...

View File

@@ -1,9 +1,11 @@
from email._parseaddr import AddressList as _AddressList
from email._parseaddr import mktime_tz as mktime_tz
from email._parseaddr import parsedate as _parsedate
from email._parseaddr import parsedate_tz as _parsedate_tz
from email._parseaddr import (
AddressList as _AddressList,
mktime_tz as mktime_tz,
parsedate as _parsedate,
parsedate_tz as _parsedate_tz,
)
from quopri import decodestring as _qdecode
from typing import Optional, Any
from typing import Any, Optional
def formataddr(pair): ...
def getaddresses(fieldvalues): ...