mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 04:54:47 +08:00
add (overwrite with) mypy stubs, if available
This commit is contained in:
23
stdlib/3/email/__init__.pyi
Normal file
23
stdlib/3/email/__init__.pyi
Normal file
@@ -0,0 +1,23 @@
|
||||
# Stubs for email (Python 3.4)
|
||||
#
|
||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
||||
|
||||
def message_from_string(s, *args, **kws): ...
|
||||
def message_from_bytes(s, *args, **kws): ...
|
||||
def message_from_file(fp, *args, **kws): ...
|
||||
def message_from_binary_file(fp, *args, **kws): ...
|
||||
|
||||
# Names in __all__ with no definition:
|
||||
# base64mime
|
||||
# charset
|
||||
# encoders
|
||||
# errors
|
||||
# feedparser
|
||||
# generator
|
||||
# header
|
||||
# iterators
|
||||
# message
|
||||
# mime
|
||||
# parser
|
||||
# quoprimime
|
||||
# utils
|
||||
397
stdlib/3/email/_header_value_parser.pyi
Normal file
397
stdlib/3/email/_header_value_parser.pyi
Normal file
@@ -0,0 +1,397 @@
|
||||
# Stubs for email._header_value_parser (Python 3.4)
|
||||
#
|
||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
||||
|
||||
from typing import Any
|
||||
|
||||
WSP = ... # type: Any
|
||||
CFWS_LEADER = ... # type: Any
|
||||
SPECIALS = ... # type: Any
|
||||
ATOM_ENDS = ... # type: Any
|
||||
DOT_ATOM_ENDS = ... # type: Any
|
||||
PHRASE_ENDS = ... # type: Any
|
||||
TSPECIALS = ... # type: Any
|
||||
TOKEN_ENDS = ... # type: Any
|
||||
ASPECIALS = ... # type: Any
|
||||
ATTRIBUTE_ENDS = ... # type: Any
|
||||
EXTENDED_ATTRIBUTE_ENDS = ... # type: Any
|
||||
|
||||
def quote_string(value): ...
|
||||
|
||||
class _Folded:
|
||||
maxlen = ... # type: Any
|
||||
policy = ... # type: Any
|
||||
lastlen = ... # type: Any
|
||||
stickyspace = ... # type: Any
|
||||
firstline = ... # type: Any
|
||||
done = ... # type: Any
|
||||
current = ... # type: Any
|
||||
def __init__(self, maxlen, policy): ...
|
||||
def newline(self): ...
|
||||
def finalize(self): ...
|
||||
def append(self, stoken): ...
|
||||
def append_if_fits(self, token, stoken=None): ...
|
||||
|
||||
class TokenList(list):
|
||||
token_type = ... # type: Any
|
||||
defects = ... # type: Any
|
||||
def __init__(self, *args, **kw): ...
|
||||
@property
|
||||
def value(self): ...
|
||||
@property
|
||||
def all_defects(self): ...
|
||||
@property
|
||||
def parts(self): ...
|
||||
def startswith_fws(self): ...
|
||||
def pop_leading_fws(self): ...
|
||||
def pop_trailing_ws(self): ...
|
||||
@property
|
||||
def has_fws(self): ...
|
||||
def has_leading_comment(self): ...
|
||||
@property
|
||||
def comments(self): ...
|
||||
def fold(self, policy): ...
|
||||
def as_encoded_word(self, charset): ...
|
||||
def cte_encode(self, charset, policy): ...
|
||||
def pprint(self, indent=''): ...
|
||||
def ppstr(self, indent=''): ...
|
||||
|
||||
class WhiteSpaceTokenList(TokenList):
|
||||
@property
|
||||
def value(self): ...
|
||||
@property
|
||||
def comments(self): ...
|
||||
|
||||
class UnstructuredTokenList(TokenList):
|
||||
token_type = ... # type: Any
|
||||
def cte_encode(self, charset, policy): ...
|
||||
|
||||
class Phrase(TokenList):
|
||||
token_type = ... # type: Any
|
||||
def cte_encode(self, charset, policy): ...
|
||||
|
||||
class Word(TokenList):
|
||||
token_type = ... # type: Any
|
||||
|
||||
class CFWSList(WhiteSpaceTokenList):
|
||||
token_type = ... # type: Any
|
||||
def has_leading_comment(self): ...
|
||||
|
||||
class Atom(TokenList):
|
||||
token_type = ... # type: Any
|
||||
|
||||
class Token(TokenList):
|
||||
token_type = ... # type: Any
|
||||
|
||||
class EncodedWord(TokenList):
|
||||
token_type = ... # type: Any
|
||||
cte = ... # type: Any
|
||||
charset = ... # type: Any
|
||||
lang = ... # type: Any
|
||||
@property
|
||||
def encoded(self): ...
|
||||
|
||||
class QuotedString(TokenList):
|
||||
token_type = ... # type: Any
|
||||
@property
|
||||
def content(self): ...
|
||||
@property
|
||||
def quoted_value(self): ...
|
||||
@property
|
||||
def stripped_value(self): ...
|
||||
|
||||
class BareQuotedString(QuotedString):
|
||||
token_type = ... # type: Any
|
||||
@property
|
||||
def value(self): ...
|
||||
|
||||
class Comment(WhiteSpaceTokenList):
|
||||
token_type = ... # type: Any
|
||||
def quote(self, value): ...
|
||||
@property
|
||||
def content(self): ...
|
||||
@property
|
||||
def comments(self): ...
|
||||
|
||||
class AddressList(TokenList):
|
||||
token_type = ... # type: Any
|
||||
@property
|
||||
def addresses(self): ...
|
||||
@property
|
||||
def mailboxes(self): ...
|
||||
@property
|
||||
def all_mailboxes(self): ...
|
||||
|
||||
class Address(TokenList):
|
||||
token_type = ... # type: Any
|
||||
@property
|
||||
def display_name(self): ...
|
||||
@property
|
||||
def mailboxes(self): ...
|
||||
@property
|
||||
def all_mailboxes(self): ...
|
||||
|
||||
class MailboxList(TokenList):
|
||||
token_type = ... # type: Any
|
||||
@property
|
||||
def mailboxes(self): ...
|
||||
@property
|
||||
def all_mailboxes(self): ...
|
||||
|
||||
class GroupList(TokenList):
|
||||
token_type = ... # type: Any
|
||||
@property
|
||||
def mailboxes(self): ...
|
||||
@property
|
||||
def all_mailboxes(self): ...
|
||||
|
||||
class Group(TokenList):
|
||||
token_type = ... # type: Any
|
||||
@property
|
||||
def mailboxes(self): ...
|
||||
@property
|
||||
def all_mailboxes(self): ...
|
||||
@property
|
||||
def display_name(self): ...
|
||||
|
||||
class NameAddr(TokenList):
|
||||
token_type = ... # type: Any
|
||||
@property
|
||||
def display_name(self): ...
|
||||
@property
|
||||
def local_part(self): ...
|
||||
@property
|
||||
def domain(self): ...
|
||||
@property
|
||||
def route(self): ...
|
||||
@property
|
||||
def addr_spec(self): ...
|
||||
|
||||
class AngleAddr(TokenList):
|
||||
token_type = ... # type: Any
|
||||
@property
|
||||
def local_part(self): ...
|
||||
@property
|
||||
def domain(self): ...
|
||||
@property
|
||||
def route(self): ...
|
||||
@property
|
||||
def addr_spec(self): ...
|
||||
|
||||
class ObsRoute(TokenList):
|
||||
token_type = ... # type: Any
|
||||
@property
|
||||
def domains(self): ...
|
||||
|
||||
class Mailbox(TokenList):
|
||||
token_type = ... # type: Any
|
||||
@property
|
||||
def display_name(self): ...
|
||||
@property
|
||||
def local_part(self): ...
|
||||
@property
|
||||
def domain(self): ...
|
||||
@property
|
||||
def route(self): ...
|
||||
@property
|
||||
def addr_spec(self): ...
|
||||
|
||||
class InvalidMailbox(TokenList):
|
||||
token_type = ... # type: Any
|
||||
@property
|
||||
def display_name(self): ...
|
||||
local_part = ... # type: Any
|
||||
|
||||
class Domain(TokenList):
|
||||
token_type = ... # type: Any
|
||||
@property
|
||||
def domain(self): ...
|
||||
|
||||
class DotAtom(TokenList):
|
||||
token_type = ... # type: Any
|
||||
|
||||
class DotAtomText(TokenList):
|
||||
token_type = ... # type: Any
|
||||
|
||||
class AddrSpec(TokenList):
|
||||
token_type = ... # type: Any
|
||||
@property
|
||||
def local_part(self): ...
|
||||
@property
|
||||
def domain(self): ...
|
||||
@property
|
||||
def value(self): ...
|
||||
@property
|
||||
def addr_spec(self): ...
|
||||
|
||||
class ObsLocalPart(TokenList):
|
||||
token_type = ... # type: Any
|
||||
|
||||
class DisplayName(Phrase):
|
||||
token_type = ... # type: Any
|
||||
@property
|
||||
def display_name(self): ...
|
||||
@property
|
||||
def value(self): ...
|
||||
|
||||
class LocalPart(TokenList):
|
||||
token_type = ... # type: Any
|
||||
@property
|
||||
def value(self): ...
|
||||
@property
|
||||
def local_part(self): ...
|
||||
|
||||
class DomainLiteral(TokenList):
|
||||
token_type = ... # type: Any
|
||||
@property
|
||||
def domain(self): ...
|
||||
@property
|
||||
def ip(self): ...
|
||||
|
||||
class MIMEVersion(TokenList):
|
||||
token_type = ... # type: Any
|
||||
major = ... # type: Any
|
||||
minor = ... # type: Any
|
||||
|
||||
class Parameter(TokenList):
|
||||
token_type = ... # type: Any
|
||||
sectioned = ... # type: Any
|
||||
extended = ... # type: Any
|
||||
charset = ... # type: Any
|
||||
@property
|
||||
def section_number(self): ...
|
||||
@property
|
||||
def param_value(self): ...
|
||||
|
||||
class InvalidParameter(Parameter):
|
||||
token_type = ... # type: Any
|
||||
|
||||
class Attribute(TokenList):
|
||||
token_type = ... # type: Any
|
||||
@property
|
||||
def stripped_value(self): ...
|
||||
|
||||
class Section(TokenList):
|
||||
token_type = ... # type: Any
|
||||
number = ... # type: Any
|
||||
|
||||
class Value(TokenList):
|
||||
token_type = ... # type: Any
|
||||
@property
|
||||
def stripped_value(self): ...
|
||||
|
||||
class MimeParameters(TokenList):
|
||||
token_type = ... # type: Any
|
||||
@property
|
||||
def params(self): ...
|
||||
|
||||
class ParameterizedHeaderValue(TokenList):
|
||||
@property
|
||||
def params(self): ...
|
||||
@property
|
||||
def parts(self): ...
|
||||
|
||||
class ContentType(ParameterizedHeaderValue):
|
||||
token_type = ... # type: Any
|
||||
maintype = ... # type: Any
|
||||
subtype = ... # type: Any
|
||||
|
||||
class ContentDisposition(ParameterizedHeaderValue):
|
||||
token_type = ... # type: Any
|
||||
content_disposition = ... # type: Any
|
||||
|
||||
class ContentTransferEncoding(TokenList):
|
||||
token_type = ... # type: Any
|
||||
cte = ... # type: Any
|
||||
|
||||
class HeaderLabel(TokenList):
|
||||
token_type = ... # type: Any
|
||||
|
||||
class Header(TokenList):
|
||||
token_type = ... # type: Any
|
||||
|
||||
class Terminal(str):
|
||||
token_type = ... # type: Any
|
||||
defects = ... # type: Any
|
||||
def __new__(cls, value, token_type): ...
|
||||
@property
|
||||
def all_defects(self): ...
|
||||
def cte_encode(self, charset, policy): ...
|
||||
def pop_trailing_ws(self): ...
|
||||
def pop_leading_fws(self): ...
|
||||
@property
|
||||
def comments(self): ...
|
||||
def has_leading_comment(self): ...
|
||||
def __getnewargs__(self): ...
|
||||
|
||||
class WhiteSpaceTerminal(Terminal):
|
||||
@property
|
||||
def value(self): ...
|
||||
def startswith_fws(self): ...
|
||||
has_fws = ... # type: Any
|
||||
|
||||
class ValueTerminal(Terminal):
|
||||
@property
|
||||
def value(self): ...
|
||||
def startswith_fws(self): ...
|
||||
has_fws = ... # type: Any
|
||||
def as_encoded_word(self, charset): ...
|
||||
|
||||
class EWWhiteSpaceTerminal(WhiteSpaceTerminal):
|
||||
@property
|
||||
def value(self): ...
|
||||
@property
|
||||
def encoded(self): ...
|
||||
has_fws = ... # type: Any
|
||||
|
||||
DOT = ... # type: Any
|
||||
ListSeparator = ... # type: Any
|
||||
RouteComponentMarker = ... # type: Any
|
||||
|
||||
def get_fws(value): ...
|
||||
def get_encoded_word(value): ...
|
||||
def get_unstructured(value): ...
|
||||
def get_qp_ctext(value): ...
|
||||
def get_qcontent(value): ...
|
||||
def get_atext(value): ...
|
||||
def get_bare_quoted_string(value): ...
|
||||
def get_comment(value): ...
|
||||
def get_cfws(value): ...
|
||||
def get_quoted_string(value): ...
|
||||
def get_atom(value): ...
|
||||
def get_dot_atom_text(value): ...
|
||||
def get_dot_atom(value): ...
|
||||
def get_word(value): ...
|
||||
def get_phrase(value): ...
|
||||
def get_local_part(value): ...
|
||||
def get_obs_local_part(value): ...
|
||||
def get_dtext(value): ...
|
||||
def get_domain_literal(value): ...
|
||||
def get_domain(value): ...
|
||||
def get_addr_spec(value): ...
|
||||
def get_obs_route(value): ...
|
||||
def get_angle_addr(value): ...
|
||||
def get_display_name(value): ...
|
||||
def get_name_addr(value): ...
|
||||
def get_mailbox(value): ...
|
||||
def get_invalid_mailbox(value, endchars): ...
|
||||
def get_mailbox_list(value): ...
|
||||
def get_group_list(value): ...
|
||||
def get_group(value): ...
|
||||
def get_address(value): ...
|
||||
def get_address_list(value): ...
|
||||
def parse_mime_version(value): ...
|
||||
def get_invalid_parameter(value): ...
|
||||
def get_ttext(value): ...
|
||||
def get_token(value): ...
|
||||
def get_attrtext(value): ...
|
||||
def get_attribute(value): ...
|
||||
def get_extended_attrtext(value): ...
|
||||
def get_extended_attribute(value): ...
|
||||
def get_section(value): ...
|
||||
def get_value(value): ...
|
||||
def get_parameter(value): ...
|
||||
def parse_mime_parameters(value): ...
|
||||
def parse_content_type_header(value): ...
|
||||
def parse_content_disposition_header(value): ...
|
||||
def parse_content_transfer_encoding_header(value): ...
|
||||
44
stdlib/3/email/_parseaddr.pyi
Normal file
44
stdlib/3/email/_parseaddr.pyi
Normal file
@@ -0,0 +1,44 @@
|
||||
# Stubs for email._parseaddr (Python 3.4)
|
||||
#
|
||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
||||
|
||||
from typing import Any
|
||||
|
||||
def parsedate_tz(data): ...
|
||||
def parsedate(data): ...
|
||||
def mktime_tz(data): ...
|
||||
def quote(str): ...
|
||||
|
||||
class AddrlistClass:
|
||||
specials = ... # type: Any
|
||||
pos = ... # type: Any
|
||||
LWS = ... # type: Any
|
||||
CR = ... # type: Any
|
||||
FWS = ... # type: Any
|
||||
atomends = ... # type: Any
|
||||
phraseends = ... # type: Any
|
||||
field = ... # type: Any
|
||||
commentlist = ... # type: 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=True): ...
|
||||
def getquote(self): ...
|
||||
def getcomment(self): ...
|
||||
def getdomainliteral(self): ...
|
||||
def getatom(self, atomends=None): ...
|
||||
def getphraselist(self): ...
|
||||
|
||||
class AddressList(AddrlistClass):
|
||||
addresslist = ... # type: 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): ...
|
||||
34
stdlib/3/email/_policybase.pyi
Normal file
34
stdlib/3/email/_policybase.pyi
Normal file
@@ -0,0 +1,34 @@
|
||||
# Stubs for email._policybase (Python 3.4)
|
||||
#
|
||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
||||
|
||||
from typing import Any
|
||||
|
||||
class _PolicyBase:
|
||||
def __init__(self, **kw): ...
|
||||
def clone(self, **kw): ...
|
||||
def __setattr__(self, name, value): ...
|
||||
def __add__(self, other): ...
|
||||
|
||||
class Policy(_PolicyBase):
|
||||
raise_on_defect = ... # type: Any
|
||||
linesep = ... # type: Any
|
||||
cte_type = ... # type: Any
|
||||
max_line_length = ... # type: Any
|
||||
def handle_defect(self, obj, defect): ...
|
||||
def register_defect(self, obj, defect): ...
|
||||
def header_max_count(self, name): ...
|
||||
def header_source_parse(self, sourcelines): ...
|
||||
def header_store_parse(self, name, value): ...
|
||||
def header_fetch_parse(self, name, value): ...
|
||||
def fold(self, name, value): ...
|
||||
def fold_binary(self, name, value): ...
|
||||
|
||||
class Compat32(Policy):
|
||||
def header_source_parse(self, sourcelines): ...
|
||||
def header_store_parse(self, name, value): ...
|
||||
def header_fetch_parse(self, name, value): ...
|
||||
def fold(self, name, value): ...
|
||||
def fold_binary(self, name, value): ...
|
||||
|
||||
compat32 = ... # type: Any
|
||||
13
stdlib/3/email/base64mime.pyi
Normal file
13
stdlib/3/email/base64mime.pyi
Normal file
@@ -0,0 +1,13 @@
|
||||
# Stubs for email.base64mime (Python 3.4)
|
||||
#
|
||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
||||
|
||||
from typing import Any
|
||||
|
||||
def header_length(bytearray): ...
|
||||
def header_encode(header_bytes, charset=''): ...
|
||||
def body_encode(s, maxlinelen=76, eol=...): ...
|
||||
def decode(string): ...
|
||||
|
||||
body_decode = ... # type: Any
|
||||
decodestring = ... # type: Any
|
||||
25
stdlib/3/email/charset.pyi
Normal file
25
stdlib/3/email/charset.pyi
Normal file
@@ -0,0 +1,25 @@
|
||||
# Stubs for email.charset (Python 3.4)
|
||||
#
|
||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
||||
|
||||
from typing import Any
|
||||
|
||||
def add_charset(charset, header_enc=None, body_enc=None, output_charset=None): ...
|
||||
def add_alias(alias, canonical): ...
|
||||
def add_codec(charset, codecname): ...
|
||||
|
||||
class Charset:
|
||||
input_charset = ... # type: Any
|
||||
header_encoding = ... # type: Any
|
||||
body_encoding = ... # type: Any
|
||||
output_charset = ... # type: Any
|
||||
input_codec = ... # type: Any
|
||||
output_codec = ... # type: Any
|
||||
def __init__(self, input_charset=...): ...
|
||||
def __eq__(self, other): ...
|
||||
def __ne__(self, other): ...
|
||||
def get_body_encoding(self): ...
|
||||
def get_output_charset(self): ...
|
||||
def header_encode(self, string): ...
|
||||
def header_encode_lines(self, string, maxlengths): ...
|
||||
def body_encode(self, string): ...
|
||||
27
stdlib/3/email/contentmanager.pyi
Normal file
27
stdlib/3/email/contentmanager.pyi
Normal file
@@ -0,0 +1,27 @@
|
||||
# Stubs for email.contentmanager (Python 3.4)
|
||||
#
|
||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
||||
|
||||
from typing import Any
|
||||
|
||||
class ContentManager:
|
||||
get_handlers = ... # type: Any
|
||||
set_handlers = ... # type: Any
|
||||
def __init__(self): ...
|
||||
def add_get_handler(self, key, handler): ...
|
||||
def get_content(self, msg, *args, **kw): ...
|
||||
def add_set_handler(self, typekey, handler): ...
|
||||
def set_content(self, msg, obj, *args, **kw): ...
|
||||
|
||||
raw_data_manager = ... # type: Any
|
||||
|
||||
def get_text_content(msg, errors=''): ...
|
||||
def get_non_text_content(msg): ...
|
||||
def get_message_content(msg): ...
|
||||
def get_and_fixup_unknown_message_content(msg): ...
|
||||
def set_text_content(msg, string, subtype='', charset='', cte=None, disposition=None,
|
||||
filename=None, cid=None, params=None, headers=None): ...
|
||||
def set_message_content(msg, message, subtype='', cte=None, disposition=None, filename=None,
|
||||
cid=None, params=None, headers=None): ...
|
||||
def set_bytes_content(msg, data, maintype, subtype, cte='', disposition=None, filename=None,
|
||||
cid=None, params=None, headers=None): ...
|
||||
8
stdlib/3/email/encoders.pyi
Normal file
8
stdlib/3/email/encoders.pyi
Normal file
@@ -0,0 +1,8 @@
|
||||
# Stubs for email.encoders (Python 3.4)
|
||||
#
|
||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
||||
|
||||
def encode_base64(msg): ...
|
||||
def encode_quopri(msg): ...
|
||||
def encode_7or8bit(msg): ...
|
||||
def encode_noop(msg): ...
|
||||
44
stdlib/3/email/errors.pyi
Normal file
44
stdlib/3/email/errors.pyi
Normal file
@@ -0,0 +1,44 @@
|
||||
# Stubs for email.errors (Python 3.4)
|
||||
#
|
||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
||||
|
||||
from typing import Any
|
||||
|
||||
class MessageError(Exception): ...
|
||||
class MessageParseError(MessageError): ...
|
||||
class HeaderParseError(MessageParseError): ...
|
||||
class BoundaryError(MessageParseError): ...
|
||||
class MultipartConversionError(MessageError, TypeError): ...
|
||||
class CharsetError(MessageError): ...
|
||||
|
||||
class MessageDefect(ValueError):
|
||||
line = ... # type: Any
|
||||
def __init__(self, line=None): ...
|
||||
|
||||
class NoBoundaryInMultipartDefect(MessageDefect): ...
|
||||
class StartBoundaryNotFoundDefect(MessageDefect): ...
|
||||
class CloseBoundaryNotFoundDefect(MessageDefect): ...
|
||||
class FirstHeaderLineIsContinuationDefect(MessageDefect): ...
|
||||
class MisplacedEnvelopeHeaderDefect(MessageDefect): ...
|
||||
class MissingHeaderBodySeparatorDefect(MessageDefect): ...
|
||||
|
||||
MalformedHeaderDefect = ... # type: Any
|
||||
|
||||
class MultipartInvariantViolationDefect(MessageDefect): ...
|
||||
class InvalidMultipartContentTransferEncodingDefect(MessageDefect): ...
|
||||
class UndecodableBytesDefect(MessageDefect): ...
|
||||
class InvalidBase64PaddingDefect(MessageDefect): ...
|
||||
class InvalidBase64CharactersDefect(MessageDefect): ...
|
||||
|
||||
class HeaderDefect(MessageDefect):
|
||||
def __init__(self, *args, **kw): ...
|
||||
|
||||
class InvalidHeaderDefect(HeaderDefect): ...
|
||||
class HeaderMissingRequiredValue(HeaderDefect): ...
|
||||
|
||||
class NonPrintableDefect(HeaderDefect):
|
||||
non_printables = ... # type: Any
|
||||
def __init__(self, non_printables): ...
|
||||
|
||||
class ObsoleteHeaderDefect(HeaderDefect): ...
|
||||
class NonASCIILocalPartDefect(HeaderDefect): ...
|
||||
26
stdlib/3/email/feedparser.pyi
Normal file
26
stdlib/3/email/feedparser.pyi
Normal file
@@ -0,0 +1,26 @@
|
||||
# Stubs for email.feedparser (Python 3.4)
|
||||
#
|
||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
||||
|
||||
from typing import Any
|
||||
|
||||
class BufferedSubFile:
|
||||
def __init__(self): ...
|
||||
def push_eof_matcher(self, pred): ...
|
||||
def pop_eof_matcher(self): ...
|
||||
def close(self): ...
|
||||
def readline(self): ...
|
||||
def unreadline(self, line): ...
|
||||
def push(self, data): ...
|
||||
def pushlines(self, lines): ...
|
||||
def __iter__(self): ...
|
||||
def __next__(self): ...
|
||||
|
||||
class FeedParser:
|
||||
policy = ... # type: Any
|
||||
def __init__(self, _factory=None, *, policy=...): ...
|
||||
def feed(self, data): ...
|
||||
def close(self): ...
|
||||
|
||||
class BytesFeedParser(FeedParser):
|
||||
def feed(self, data): ...
|
||||
19
stdlib/3/email/generator.pyi
Normal file
19
stdlib/3/email/generator.pyi
Normal file
@@ -0,0 +1,19 @@
|
||||
# Stubs for email.generator (Python 3.4)
|
||||
#
|
||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
||||
|
||||
from typing import Any
|
||||
|
||||
class Generator:
|
||||
maxheaderlen = ... # type: Any
|
||||
policy = ... # type: Any
|
||||
def __init__(self, outfp, mangle_from_=True, maxheaderlen=None, *, policy=None): ...
|
||||
def write(self, s): ...
|
||||
def flatten(self, msg, unixfrom=False, linesep=None): ...
|
||||
def clone(self, fp): ...
|
||||
|
||||
class BytesGenerator(Generator):
|
||||
def write(self, s): ...
|
||||
|
||||
class DecodedGenerator(Generator):
|
||||
def __init__(self, outfp, mangle_from_=True, maxheaderlen=78, fmt=None): ...
|
||||
29
stdlib/3/email/header.pyi
Normal file
29
stdlib/3/email/header.pyi
Normal file
@@ -0,0 +1,29 @@
|
||||
# Stubs for email.header (Python 3.4)
|
||||
#
|
||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
||||
|
||||
def decode_header(header): ...
|
||||
def make_header(decoded_seq, maxlinelen=None, header_name=None, continuation_ws=''): ...
|
||||
|
||||
class Header:
|
||||
def __init__(self, s=None, charset=None, maxlinelen=None, header_name=None,
|
||||
continuation_ws='', errors=''): ...
|
||||
def __eq__(self, other): ...
|
||||
def __ne__(self, other): ...
|
||||
def append(self, s, charset=None, errors=''): ...
|
||||
def encode(self, splitchars='', maxlinelen=None, linesep=''): ...
|
||||
|
||||
class _ValueFormatter:
|
||||
def __init__(self, headerlen, maxlen, continuation_ws, splitchars): ...
|
||||
def newline(self): ...
|
||||
def add_transition(self): ...
|
||||
def feed(self, fws, string, charset): ...
|
||||
|
||||
class _Accumulator(list):
|
||||
def __init__(self, initial_size=0): ...
|
||||
def push(self, fws, string): ...
|
||||
def pop_from(self, i=0): ...
|
||||
def __len__(self): ...
|
||||
def reset(self, startval=None): ...
|
||||
def is_onlyws(self): ...
|
||||
def part_count(self): ...
|
||||
133
stdlib/3/email/headerregistry.pyi
Normal file
133
stdlib/3/email/headerregistry.pyi
Normal file
@@ -0,0 +1,133 @@
|
||||
# Stubs for email.headerregistry (Python 3.4)
|
||||
#
|
||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
||||
|
||||
from typing import Any
|
||||
|
||||
class Address:
|
||||
def __init__(self, display_name='', username='', domain='', addr_spec=None): ...
|
||||
@property
|
||||
def display_name(self): ...
|
||||
@property
|
||||
def username(self): ...
|
||||
@property
|
||||
def domain(self): ...
|
||||
@property
|
||||
def addr_spec(self): ...
|
||||
def __eq__(self, other): ...
|
||||
|
||||
class Group:
|
||||
def __init__(self, display_name=None, addresses=None): ...
|
||||
@property
|
||||
def display_name(self): ...
|
||||
@property
|
||||
def addresses(self): ...
|
||||
def __eq__(self, other): ...
|
||||
|
||||
class BaseHeader(str):
|
||||
def __new__(cls, name, value): ...
|
||||
def init(self, name, parse_tree, defects): ...
|
||||
@property
|
||||
def name(self): ...
|
||||
@property
|
||||
def defects(self): ...
|
||||
def __reduce__(self): ...
|
||||
def fold(self, policy): ...
|
||||
|
||||
class UnstructuredHeader:
|
||||
max_count = ... # type: Any
|
||||
value_parser = ... # type: Any
|
||||
@classmethod
|
||||
def parse(cls, value, kwds): ...
|
||||
|
||||
class UniqueUnstructuredHeader(UnstructuredHeader):
|
||||
max_count = ... # type: Any
|
||||
|
||||
class DateHeader:
|
||||
max_count = ... # type: Any
|
||||
value_parser = ... # type: Any
|
||||
@classmethod
|
||||
def parse(cls, value, kwds): ...
|
||||
def init(self, *args, **kw): ...
|
||||
@property
|
||||
def datetime(self): ...
|
||||
|
||||
class UniqueDateHeader(DateHeader):
|
||||
max_count = ... # type: Any
|
||||
|
||||
class AddressHeader:
|
||||
max_count = ... # type: Any
|
||||
@staticmethod
|
||||
def value_parser(value): ...
|
||||
@classmethod
|
||||
def parse(cls, value, kwds): ...
|
||||
def init(self, *args, **kw): ...
|
||||
@property
|
||||
def groups(self): ...
|
||||
@property
|
||||
def addresses(self): ...
|
||||
|
||||
class UniqueAddressHeader(AddressHeader):
|
||||
max_count = ... # type: Any
|
||||
|
||||
class SingleAddressHeader(AddressHeader):
|
||||
@property
|
||||
def address(self): ...
|
||||
|
||||
class UniqueSingleAddressHeader(SingleAddressHeader):
|
||||
max_count = ... # type: Any
|
||||
|
||||
class MIMEVersionHeader:
|
||||
max_count = ... # type: Any
|
||||
value_parser = ... # type: Any
|
||||
@classmethod
|
||||
def parse(cls, value, kwds): ...
|
||||
def init(self, *args, **kw): ...
|
||||
@property
|
||||
def major(self): ...
|
||||
@property
|
||||
def minor(self): ...
|
||||
@property
|
||||
def version(self): ...
|
||||
|
||||
class ParameterizedMIMEHeader:
|
||||
max_count = ... # type: Any
|
||||
@classmethod
|
||||
def parse(cls, value, kwds): ...
|
||||
def init(self, *args, **kw): ...
|
||||
@property
|
||||
def params(self): ...
|
||||
|
||||
class ContentTypeHeader(ParameterizedMIMEHeader):
|
||||
value_parser = ... # type: Any
|
||||
def init(self, *args, **kw): ...
|
||||
@property
|
||||
def maintype(self): ...
|
||||
@property
|
||||
def subtype(self): ...
|
||||
@property
|
||||
def content_type(self): ...
|
||||
|
||||
class ContentDispositionHeader(ParameterizedMIMEHeader):
|
||||
value_parser = ... # type: Any
|
||||
def init(self, *args, **kw): ...
|
||||
@property
|
||||
def content_disposition(self): ...
|
||||
|
||||
class ContentTransferEncodingHeader:
|
||||
max_count = ... # type: Any
|
||||
value_parser = ... # type: Any
|
||||
@classmethod
|
||||
def parse(cls, value, kwds): ...
|
||||
def init(self, *args, **kw): ...
|
||||
@property
|
||||
def cte(self): ...
|
||||
|
||||
class HeaderRegistry:
|
||||
registry = ... # type: Any
|
||||
base_class = ... # type: Any
|
||||
default_class = ... # type: Any
|
||||
def __init__(self, base_class=..., default_class=..., use_default_map=True): ...
|
||||
def map_to_type(self, name, cls): ...
|
||||
def __getitem__(self, name): ...
|
||||
def __call__(self, name, value): ...
|
||||
7
stdlib/3/email/iterators.pyi
Normal file
7
stdlib/3/email/iterators.pyi
Normal file
@@ -0,0 +1,7 @@
|
||||
# Stubs for email.iterators (Python 3.4)
|
||||
#
|
||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
||||
|
||||
def walk(self): ...
|
||||
def body_line_iterator(msg, decode=False): ...
|
||||
def typed_subpart_iterator(msg, maintype='', subtype=None): ...
|
||||
74
stdlib/3/email/message.pyi
Normal file
74
stdlib/3/email/message.pyi
Normal file
@@ -0,0 +1,74 @@
|
||||
# Stubs for email.message (Python 3.4)
|
||||
#
|
||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
||||
|
||||
from typing import Any
|
||||
|
||||
class Message:
|
||||
policy = ... # type: Any
|
||||
preamble = ... # type: Any
|
||||
defects = ... # type: Any
|
||||
def __init__(self, policy=...): ...
|
||||
def as_string(self, unixfrom=False, maxheaderlen=0, policy=None): ...
|
||||
def __bytes__(self): ...
|
||||
def as_bytes(self, unixfrom=False, policy=None): ...
|
||||
def is_multipart(self): ...
|
||||
def set_unixfrom(self, unixfrom): ...
|
||||
def get_unixfrom(self): ...
|
||||
def attach(self, payload): ...
|
||||
def get_payload(self, i=None, decode=False): ...
|
||||
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): ...
|
||||
def __delitem__(self, name): ...
|
||||
def __contains__(self, name): ...
|
||||
def __iter__(self): ...
|
||||
def keys(self): ...
|
||||
def values(self): ...
|
||||
def items(self): ...
|
||||
def get(self, name, failobj=None): ...
|
||||
def set_raw(self, name, value): ...
|
||||
def raw_items(self): ...
|
||||
def get_all(self, name, failobj=None): ...
|
||||
def add_header(self, _name, _value, **_params): ...
|
||||
def replace_header(self, _name, _value): ...
|
||||
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): ...
|
||||
def get_params(self, failobj=None, header='', unquote=True): ...
|
||||
def get_param(self, param, failobj=None, header='', unquote=True): ...
|
||||
def set_param(self, param, value, header='', requote=True, charset=None, language='',
|
||||
replace=False): ...
|
||||
def del_param(self, param, header='', requote=True): ...
|
||||
def set_type(self, type, header='', requote=True): ...
|
||||
def get_filename(self, failobj=None): ...
|
||||
def get_boundary(self, failobj=None): ...
|
||||
def set_boundary(self, boundary): ...
|
||||
def get_content_charset(self, failobj=None): ...
|
||||
def get_charsets(self, failobj=None): ...
|
||||
|
||||
class MIMEPart(Message):
|
||||
def __init__(self, policy=None): ...
|
||||
@property
|
||||
def is_attachment(self): ...
|
||||
def get_body(self, preferencelist=...): ...
|
||||
def iter_attachments(self): ...
|
||||
def iter_parts(self): ...
|
||||
def get_content(self, *args, *, content_manager=None, **kw): ...
|
||||
def set_content(self, *args, *, content_manager=None, **kw): ...
|
||||
def make_related(self, boundary=None): ...
|
||||
def make_alternative(self, boundary=None): ...
|
||||
def make_mixed(self, boundary=None): ...
|
||||
def add_related(self, *args, **kw): ...
|
||||
def add_alternative(self, *args, **kw): ...
|
||||
def add_attachment(self, *args, **kw): ...
|
||||
def clear(self): ...
|
||||
def clear_content(self): ...
|
||||
|
||||
class EmailMessage(MIMEPart):
|
||||
def set_content(self, *args, **kw): ...
|
||||
4
stdlib/3/email/mime/__init__.pyi
Normal file
4
stdlib/3/email/mime/__init__.pyi
Normal file
@@ -0,0 +1,4 @@
|
||||
# Stubs for email.mime (Python 3.4)
|
||||
#
|
||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
||||
|
||||
8
stdlib/3/email/mime/application.pyi
Normal file
8
stdlib/3/email/mime/application.pyi
Normal file
@@ -0,0 +1,8 @@
|
||||
# Stubs for email.mime.application (Python 3.4)
|
||||
#
|
||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
||||
|
||||
from email.mime.nonmultipart import MIMENonMultipart
|
||||
|
||||
class MIMEApplication(MIMENonMultipart):
|
||||
def __init__(self, _data, _subtype='', _encoder=..., **_params): ...
|
||||
8
stdlib/3/email/mime/audio.pyi
Normal file
8
stdlib/3/email/mime/audio.pyi
Normal file
@@ -0,0 +1,8 @@
|
||||
# Stubs for email.mime.audio (Python 3.4)
|
||||
#
|
||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
||||
|
||||
from email.mime.nonmultipart import MIMENonMultipart
|
||||
|
||||
class MIMEAudio(MIMENonMultipart):
|
||||
def __init__(self, _audiodata, _subtype=None, _encoder=..., **_params): ...
|
||||
8
stdlib/3/email/mime/base.pyi
Normal file
8
stdlib/3/email/mime/base.pyi
Normal file
@@ -0,0 +1,8 @@
|
||||
# Stubs for email.mime.base (Python 3.4)
|
||||
#
|
||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
||||
|
||||
from email import message
|
||||
|
||||
class MIMEBase(message.Message):
|
||||
def __init__(self, _maintype, _subtype, **_params): ...
|
||||
8
stdlib/3/email/mime/image.pyi
Normal file
8
stdlib/3/email/mime/image.pyi
Normal file
@@ -0,0 +1,8 @@
|
||||
# Stubs for email.mime.image (Python 3.4)
|
||||
#
|
||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
||||
|
||||
from email.mime.nonmultipart import MIMENonMultipart
|
||||
|
||||
class MIMEImage(MIMENonMultipart):
|
||||
def __init__(self, _imagedata, _subtype=None, _encoder=..., **_params): ...
|
||||
8
stdlib/3/email/mime/message.pyi
Normal file
8
stdlib/3/email/mime/message.pyi
Normal file
@@ -0,0 +1,8 @@
|
||||
# Stubs for email.mime.message (Python 3.4)
|
||||
#
|
||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
||||
|
||||
from email.mime.nonmultipart import MIMENonMultipart
|
||||
|
||||
class MIMEMessage(MIMENonMultipart):
|
||||
def __init__(self, _msg, _subtype=''): ...
|
||||
8
stdlib/3/email/mime/multipart.pyi
Normal file
8
stdlib/3/email/mime/multipart.pyi
Normal file
@@ -0,0 +1,8 @@
|
||||
# Stubs for email.mime.multipart (Python 3.4)
|
||||
#
|
||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
||||
|
||||
from email.mime.base import MIMEBase
|
||||
|
||||
class MIMEMultipart(MIMEBase):
|
||||
def __init__(self, _subtype='', boundary=None, _subparts=None, **_params): ...
|
||||
8
stdlib/3/email/mime/nonmultipart.pyi
Normal file
8
stdlib/3/email/mime/nonmultipart.pyi
Normal file
@@ -0,0 +1,8 @@
|
||||
# Stubs for email.mime.nonmultipart (Python 3.4)
|
||||
#
|
||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
||||
|
||||
from email.mime.base import MIMEBase
|
||||
|
||||
class MIMENonMultipart(MIMEBase):
|
||||
def attach(self, payload): ...
|
||||
8
stdlib/3/email/mime/text.pyi
Normal file
8
stdlib/3/email/mime/text.pyi
Normal file
@@ -0,0 +1,8 @@
|
||||
# Stubs for email.mime.text (Python 3.4)
|
||||
#
|
||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
||||
|
||||
from email.mime.nonmultipart import MIMENonMultipart
|
||||
|
||||
class MIMEText(MIMENonMultipart):
|
||||
def __init__(self, _text, _subtype='', _charset=None): ...
|
||||
29
stdlib/3/email/parser.pyi
Normal file
29
stdlib/3/email/parser.pyi
Normal file
@@ -0,0 +1,29 @@
|
||||
# Stubs for email.parser (Python 3.4)
|
||||
#
|
||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
||||
|
||||
from typing import Any
|
||||
import email.feedparser
|
||||
|
||||
FeedParser = email.feedparser.FeedParser
|
||||
BytesFeedParser = email.feedparser.BytesFeedParser
|
||||
|
||||
class Parser:
|
||||
policy = ... # type: Any
|
||||
def __init__(self, _class=None, *, policy=...): ...
|
||||
def parse(self, fp, headersonly=False): ...
|
||||
def parsestr(self, text, headersonly=False): ...
|
||||
|
||||
class HeaderParser(Parser):
|
||||
def parse(self, fp, headersonly=True): ...
|
||||
def parsestr(self, text, headersonly=True): ...
|
||||
|
||||
class BytesParser:
|
||||
parser = ... # type: Any
|
||||
def __init__(self, *args, **kw): ...
|
||||
def parse(self, fp, headersonly=False): ...
|
||||
def parsebytes(self, text, headersonly=False): ...
|
||||
|
||||
class BytesHeaderParser(BytesParser):
|
||||
def parse(self, fp, headersonly=True): ...
|
||||
def parsebytes(self, text, headersonly=True): ...
|
||||
26
stdlib/3/email/policy.pyi
Normal file
26
stdlib/3/email/policy.pyi
Normal file
@@ -0,0 +1,26 @@
|
||||
# Stubs for email.policy (Python 3.4)
|
||||
#
|
||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
||||
|
||||
from typing import Any
|
||||
import email._policybase
|
||||
|
||||
Policy = email._policybase.Policy
|
||||
Compat32 = email._policybase.Compat32
|
||||
|
||||
class EmailPolicy(Policy):
|
||||
refold_source = ... # type: Any
|
||||
header_factory = ... # type: Any
|
||||
content_manager = ... # type: Any
|
||||
def __init__(self, **kw): ...
|
||||
def header_max_count(self, name): ...
|
||||
def header_source_parse(self, sourcelines): ...
|
||||
def header_store_parse(self, name, value): ...
|
||||
def header_fetch_parse(self, name, value): ...
|
||||
def fold(self, name, value): ...
|
||||
def fold_binary(self, name, value): ...
|
||||
|
||||
default = ... # type: Any
|
||||
strict = ... # type: Any
|
||||
SMTP = ... # type: Any
|
||||
HTTP = ... # type: Any
|
||||
18
stdlib/3/email/quoprimime.pyi
Normal file
18
stdlib/3/email/quoprimime.pyi
Normal file
@@ -0,0 +1,18 @@
|
||||
# Stubs for email.quoprimime (Python 3.4)
|
||||
#
|
||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
||||
|
||||
from typing import Any
|
||||
|
||||
def header_length(bytearray): ...
|
||||
def body_length(bytearray): ...
|
||||
def unquote(s): ...
|
||||
def quote(c): ...
|
||||
def header_encode(header_bytes, charset=''): ...
|
||||
def body_encode(body, maxlinelen=76, eol=...): ...
|
||||
def decode(encoded, eol=...): ...
|
||||
|
||||
body_decode = ... # type: Any
|
||||
decodestring = ... # type: Any
|
||||
|
||||
def header_decode(s): ...
|
||||
22
stdlib/3/email/utils.pyi
Normal file
22
stdlib/3/email/utils.pyi
Normal file
@@ -0,0 +1,22 @@
|
||||
# Stubs for email.utils (Python 3.4)
|
||||
#
|
||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
||||
|
||||
import email._parseaddr
|
||||
|
||||
mktime_tz = email._parseaddr.mktime_tz
|
||||
parsedate = email._parseaddr.parsedate
|
||||
parsedate_tz = email._parseaddr.parsedate_tz
|
||||
|
||||
def formataddr(pair, charset=''): ...
|
||||
def getaddresses(fieldvalues): ...
|
||||
def formatdate(timeval=None, localtime=False, usegmt=False): ...
|
||||
def format_datetime(dt, usegmt=False): ...
|
||||
def make_msgid(idstring=None, domain=None): ...
|
||||
def parsedate_to_datetime(data): ...
|
||||
def parseaddr(addr): ...
|
||||
def unquote(str): ...
|
||||
def decode_rfc2231(s): ...
|
||||
def encode_rfc2231(s, charset=None, language=None): ...
|
||||
def decode_params(params): ...
|
||||
def collapse_rfc2231_value(value, errors='', fallback_charset=''): ...
|
||||
Reference in New Issue
Block a user