mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-10 05:51:52 +08:00
Re-organize directory structure (#4971)
See discussion in #2491 Co-authored-by: Ivan Levkivskyi <ilevkivskyi@dropbox.com>
This commit is contained in:
4
stdlib/@python2/email/MIMEText.pyi
Normal file
4
stdlib/@python2/email/MIMEText.pyi
Normal file
@@ -0,0 +1,4 @@
|
||||
from email.mime.nonmultipart import MIMENonMultipart
|
||||
|
||||
class MIMEText(MIMENonMultipart):
|
||||
def __init__(self, _text, _subtype=..., _charset=...) -> None: ...
|
||||
6
stdlib/@python2/email/__init__.pyi
Normal file
6
stdlib/@python2/email/__init__.pyi
Normal file
@@ -0,0 +1,6 @@
|
||||
from typing import IO, Any, AnyStr
|
||||
|
||||
def message_from_string(s: AnyStr, *args, **kwargs): ...
|
||||
def message_from_bytes(s: str, *args, **kwargs): ...
|
||||
def message_from_file(fp: IO[AnyStr], *args, **kwargs): ...
|
||||
def message_from_binary_file(fp: IO[str], *args, **kwargs): ...
|
||||
40
stdlib/@python2/email/_parseaddr.pyi
Normal file
40
stdlib/@python2/email/_parseaddr.pyi
Normal file
@@ -0,0 +1,40 @@
|
||||
from typing import Any, Optional
|
||||
|
||||
def parsedate_tz(data): ...
|
||||
def parsedate(data): ...
|
||||
def mktime_tz(data): ...
|
||||
def quote(str): ...
|
||||
|
||||
class AddrlistClass:
|
||||
specials: Any
|
||||
pos: Any
|
||||
LWS: Any
|
||||
CR: Any
|
||||
FWS: Any
|
||||
atomends: Any
|
||||
phraseends: Any
|
||||
field: Any
|
||||
commentlist: Any
|
||||
def __init__(self, field): ...
|
||||
def gotonext(self): ...
|
||||
def getaddrlist(self): ...
|
||||
def getaddress(self): ...
|
||||
def getrouteaddr(self): ...
|
||||
def getaddrspec(self): ...
|
||||
def getdomain(self): ...
|
||||
def getdelimited(self, beginchar, endchars, allowcomments: bool = ...): ...
|
||||
def getquote(self): ...
|
||||
def getcomment(self): ...
|
||||
def getdomainliteral(self): ...
|
||||
def getatom(self, atomends: Optional[Any] = ...): ...
|
||||
def getphraselist(self): ...
|
||||
|
||||
class AddressList(AddrlistClass):
|
||||
addresslist: Any
|
||||
def __init__(self, field): ...
|
||||
def __len__(self): ...
|
||||
def __add__(self, other): ...
|
||||
def __iadd__(self, other): ...
|
||||
def __sub__(self, other): ...
|
||||
def __isub__(self, other): ...
|
||||
def __getitem__(self, index): ...
|
||||
11
stdlib/@python2/email/base64mime.pyi
Normal file
11
stdlib/@python2/email/base64mime.pyi
Normal file
@@ -0,0 +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
|
||||
26
stdlib/@python2/email/charset.pyi
Normal file
26
stdlib/@python2/email/charset.pyi
Normal file
@@ -0,0 +1,26 @@
|
||||
def add_charset(charset, header_enc=..., body_enc=..., output_charset=...) -> None: ...
|
||||
def add_alias(alias, canonical) -> None: ...
|
||||
def add_codec(charset, codecname) -> None: ...
|
||||
|
||||
QP: int # undocumented
|
||||
BASE64: int # undocumented
|
||||
SHORTEST: int # undocumented
|
||||
|
||||
class Charset:
|
||||
input_charset = ...
|
||||
header_encoding = ...
|
||||
body_encoding = ...
|
||||
output_charset = ...
|
||||
input_codec = ...
|
||||
output_codec = ...
|
||||
def __init__(self, input_charset=...) -> None: ...
|
||||
def __eq__(self, other): ...
|
||||
def __ne__(self, other): ...
|
||||
def get_body_encoding(self): ...
|
||||
def convert(self, s): ...
|
||||
def to_splittable(self, s): ...
|
||||
def from_splittable(self, ustr, to_output: bool = ...): ...
|
||||
def get_output_charset(self): ...
|
||||
def encoded_header_len(self, s): ...
|
||||
def header_encode(self, s, convert: bool = ...): ...
|
||||
def body_encode(self, s, convert: bool = ...): ...
|
||||
4
stdlib/@python2/email/encoders.pyi
Normal file
4
stdlib/@python2/email/encoders.pyi
Normal file
@@ -0,0 +1,4 @@
|
||||
def encode_base64(msg) -> None: ...
|
||||
def encode_quopri(msg) -> None: ...
|
||||
def encode_7or8bit(msg) -> None: ...
|
||||
def encode_noop(msg) -> None: ...
|
||||
17
stdlib/@python2/email/feedparser.pyi
Normal file
17
stdlib/@python2/email/feedparser.pyi
Normal file
@@ -0,0 +1,17 @@
|
||||
class BufferedSubFile:
|
||||
def __init__(self) -> None: ...
|
||||
def push_eof_matcher(self, pred) -> None: ...
|
||||
def pop_eof_matcher(self): ...
|
||||
def close(self) -> None: ...
|
||||
def readline(self): ...
|
||||
def unreadline(self, line) -> None: ...
|
||||
def push(self, data): ...
|
||||
def pushlines(self, lines) -> None: ...
|
||||
def is_closed(self): ...
|
||||
def __iter__(self): ...
|
||||
def next(self): ...
|
||||
|
||||
class FeedParser:
|
||||
def __init__(self, _factory=...) -> None: ...
|
||||
def feed(self, data) -> None: ...
|
||||
def close(self): ...
|
||||
8
stdlib/@python2/email/generator.pyi
Normal file
8
stdlib/@python2/email/generator.pyi
Normal file
@@ -0,0 +1,8 @@
|
||||
class Generator:
|
||||
def __init__(self, outfp, mangle_from_: bool = ..., maxheaderlen: int = ...) -> None: ...
|
||||
def write(self, s) -> None: ...
|
||||
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: ...
|
||||
10
stdlib/@python2/email/header.pyi
Normal file
10
stdlib/@python2/email/header.pyi
Normal file
@@ -0,0 +1,10 @@
|
||||
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 __unicode__(self): ...
|
||||
def __eq__(self, other): ...
|
||||
def __ne__(self, other): ...
|
||||
def append(self, s, charset=..., errors=...) -> None: ...
|
||||
def encode(self, splitchars=...): ...
|
||||
5
stdlib/@python2/email/iterators.pyi
Normal file
5
stdlib/@python2/email/iterators.pyi
Normal file
@@ -0,0 +1,5 @@
|
||||
from typing import Any, Generator
|
||||
|
||||
def walk(self) -> Generator[Any, Any, Any]: ...
|
||||
def body_line_iterator(msg, decode: bool = ...) -> Generator[Any, Any, Any]: ...
|
||||
def typed_subpart_iterator(msg, maintype=..., subtype=...) -> Generator[Any, Any, Any]: ...
|
||||
45
stdlib/@python2/email/message.pyi
Normal file
45
stdlib/@python2/email/message.pyi
Normal file
@@ -0,0 +1,45 @@
|
||||
from typing import Any, Generator
|
||||
|
||||
class Message:
|
||||
preamble = ...
|
||||
epilogue = ...
|
||||
defects = ...
|
||||
def __init__(self): ...
|
||||
def as_string(self, unixfrom=...): ...
|
||||
def is_multipart(self) -> bool: ...
|
||||
def set_unixfrom(self, unixfrom) -> None: ...
|
||||
def get_unixfrom(self): ...
|
||||
def attach(self, payload) -> None: ...
|
||||
def get_payload(self, i=..., decode: bool = ...): ...
|
||||
def set_payload(self, payload, charset=...) -> None: ...
|
||||
def set_charset(self, charset): ...
|
||||
def get_charset(self): ...
|
||||
def __len__(self): ...
|
||||
def __getitem__(self, name): ...
|
||||
def __setitem__(self, name, val) -> None: ...
|
||||
def __delitem__(self, name) -> None: ...
|
||||
def __contains__(self, name): ...
|
||||
def has_key(self, name) -> bool: ...
|
||||
def keys(self): ...
|
||||
def values(self): ...
|
||||
def items(self): ...
|
||||
def get(self, name, failobj=...): ...
|
||||
def get_all(self, name, failobj=...): ...
|
||||
def add_header(self, _name, _value, **_params) -> None: ...
|
||||
def replace_header(self, _name, _value) -> None: ...
|
||||
def get_content_type(self): ...
|
||||
def get_content_maintype(self): ...
|
||||
def get_content_subtype(self): ...
|
||||
def get_default_type(self): ...
|
||||
def set_default_type(self, ctype) -> None: ...
|
||||
def get_params(self, failobj=..., header=..., unquote: bool = ...): ...
|
||||
def get_param(self, param, failobj=..., header=..., unquote: bool = ...): ...
|
||||
def set_param(self, param, value, header=..., requote: bool = ..., charset=..., language=...) -> None: ...
|
||||
def del_param(self, param, header=..., requote: bool = ...): ...
|
||||
def set_type(self, type, header=..., requote: bool = ...): ...
|
||||
def get_filename(self, failobj=...): ...
|
||||
def get_boundary(self, failobj=...): ...
|
||||
def set_boundary(self, boundary) -> None: ...
|
||||
def get_content_charset(self, failobj=...): ...
|
||||
def get_charsets(self, failobj=...): ...
|
||||
def walk(self) -> Generator[Any, Any, Any]: ...
|
||||
0
stdlib/@python2/email/mime/__init__.pyi
Normal file
0
stdlib/@python2/email/mime/__init__.pyi
Normal file
9
stdlib/@python2/email/mime/application.pyi
Normal file
9
stdlib/@python2/email/mime/application.pyi
Normal file
@@ -0,0 +1,9 @@
|
||||
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: ...
|
||||
4
stdlib/@python2/email/mime/audio.pyi
Normal file
4
stdlib/@python2/email/mime/audio.pyi
Normal file
@@ -0,0 +1,4 @@
|
||||
from email.mime.nonmultipart import MIMENonMultipart
|
||||
|
||||
class MIMEAudio(MIMENonMultipart):
|
||||
def __init__(self, _audiodata, _subtype=..., _encoder=..., **_params) -> None: ...
|
||||
4
stdlib/@python2/email/mime/base.pyi
Normal file
4
stdlib/@python2/email/mime/base.pyi
Normal file
@@ -0,0 +1,4 @@
|
||||
from email import message
|
||||
|
||||
class MIMEBase(message.Message):
|
||||
def __init__(self, _maintype, _subtype, **_params) -> None: ...
|
||||
4
stdlib/@python2/email/mime/image.pyi
Normal file
4
stdlib/@python2/email/mime/image.pyi
Normal file
@@ -0,0 +1,4 @@
|
||||
from email.mime.nonmultipart import MIMENonMultipart
|
||||
|
||||
class MIMEImage(MIMENonMultipart):
|
||||
def __init__(self, _imagedata, _subtype=..., _encoder=..., **_params) -> None: ...
|
||||
4
stdlib/@python2/email/mime/message.pyi
Normal file
4
stdlib/@python2/email/mime/message.pyi
Normal file
@@ -0,0 +1,4 @@
|
||||
from email.mime.nonmultipart import MIMENonMultipart
|
||||
|
||||
class MIMEMessage(MIMENonMultipart):
|
||||
def __init__(self, _msg, _subtype=...) -> None: ...
|
||||
4
stdlib/@python2/email/mime/multipart.pyi
Normal file
4
stdlib/@python2/email/mime/multipart.pyi
Normal file
@@ -0,0 +1,4 @@
|
||||
from email.mime.base import MIMEBase
|
||||
|
||||
class MIMEMultipart(MIMEBase):
|
||||
def __init__(self, _subtype=..., boundary=..., _subparts=..., **_params) -> None: ...
|
||||
4
stdlib/@python2/email/mime/nonmultipart.pyi
Normal file
4
stdlib/@python2/email/mime/nonmultipart.pyi
Normal file
@@ -0,0 +1,4 @@
|
||||
from email.mime.base import MIMEBase
|
||||
|
||||
class MIMENonMultipart(MIMEBase):
|
||||
def attach(self, payload): ...
|
||||
4
stdlib/@python2/email/mime/text.pyi
Normal file
4
stdlib/@python2/email/mime/text.pyi
Normal file
@@ -0,0 +1,4 @@
|
||||
from email.mime.nonmultipart import MIMENonMultipart
|
||||
|
||||
class MIMEText(MIMENonMultipart):
|
||||
def __init__(self, _text, _subtype=..., _charset=...) -> None: ...
|
||||
10
stdlib/@python2/email/parser.pyi
Normal file
10
stdlib/@python2/email/parser.pyi
Normal file
@@ -0,0 +1,10 @@
|
||||
from .feedparser import FeedParser as FeedParser # not in __all__ but listed in documentation
|
||||
|
||||
class Parser:
|
||||
def __init__(self, *args, **kws) -> None: ...
|
||||
def parse(self, fp, headersonly: bool = ...): ...
|
||||
def parsestr(self, text, headersonly: bool = ...): ...
|
||||
|
||||
class HeaderParser(Parser):
|
||||
def parse(self, fp, headersonly: bool = ...): ...
|
||||
def parsestr(self, text, headersonly: bool = ...): ...
|
||||
18
stdlib/@python2/email/quoprimime.pyi
Normal file
18
stdlib/@python2/email/quoprimime.pyi
Normal file
@@ -0,0 +1,18 @@
|
||||
def header_quopri_check(c): ...
|
||||
def body_quopri_check(c): ...
|
||||
def header_quopri_len(s): ...
|
||||
def body_quopri_len(str): ...
|
||||
def unquote(s): ...
|
||||
def quote(c): ...
|
||||
def header_encode(header, charset: str = ..., keep_eols: bool = ..., maxlinelen: int = ..., eol=...): ...
|
||||
def encode(body, binary: bool = ..., maxlinelen: int = ..., eol=...): ...
|
||||
|
||||
body_encode = encode
|
||||
encodestring = encode
|
||||
|
||||
def decode(encoded, eol=...): ...
|
||||
|
||||
body_decode = decode
|
||||
decodestring = decode
|
||||
|
||||
def header_decode(s): ...
|
||||
21
stdlib/@python2/email/utils.pyi
Normal file
21
stdlib/@python2/email/utils.pyi
Normal file
@@ -0,0 +1,21 @@
|
||||
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 Any, Optional
|
||||
|
||||
def formataddr(pair): ...
|
||||
def getaddresses(fieldvalues): ...
|
||||
def formatdate(timeval: Optional[Any] = ..., localtime: bool = ..., usegmt: bool = ...): ...
|
||||
def make_msgid(idstring: Optional[Any] = ...): ...
|
||||
def parsedate(data): ...
|
||||
def parsedate_tz(data): ...
|
||||
def parseaddr(addr): ...
|
||||
def unquote(str): ...
|
||||
def decode_rfc2231(s): ...
|
||||
def encode_rfc2231(s, charset: Optional[Any] = ..., language: Optional[Any] = ...): ...
|
||||
def decode_params(params): ...
|
||||
def collapse_rfc2231_value(value, errors=..., fallback_charset=...): ...
|
||||
Reference in New Issue
Block a user