mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-03-01 21:06:53 +08:00
apply black and isort (#4287)
* apply black and isort * move some type ignores
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
# Stubs for email (Python 3.4)
|
||||
|
||||
from typing import Callable, IO
|
||||
from email.message import Message
|
||||
from email.policy import Policy
|
||||
from typing import IO, Callable
|
||||
|
||||
def message_from_string(s: str, _class: Callable[[], Message] = ..., *, policy: Policy = ...) -> Message: ...
|
||||
def message_from_bytes(s: bytes, _class: Callable[[], Message] = ..., *, policy: Policy = ...) -> Message: ...
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Stubs for email.charset (Python 3.4)
|
||||
|
||||
from typing import List, Optional, Iterator, Any
|
||||
from typing import Any, Iterator, List, Optional
|
||||
|
||||
QP: int # undocumented
|
||||
BASE64: int # undocumented
|
||||
@@ -17,15 +17,14 @@ class Charset:
|
||||
def get_body_encoding(self) -> str: ...
|
||||
def get_output_charset(self) -> Optional[str]: ...
|
||||
def header_encode(self, string: str) -> str: ...
|
||||
def header_encode_lines(self, string: str,
|
||||
maxlengths: Iterator[int]) -> List[str]: ...
|
||||
def header_encode_lines(self, string: str, maxlengths: Iterator[int]) -> List[str]: ...
|
||||
def body_encode(self, string: str) -> str: ...
|
||||
def __str__(self) -> str: ...
|
||||
def __eq__(self, other: Any) -> bool: ...
|
||||
def __ne__(self, other: Any) -> bool: ...
|
||||
|
||||
def add_charset(charset: str, header_enc: Optional[int] = ...,
|
||||
body_enc: Optional[int] = ...,
|
||||
output_charset: Optional[str] = ...) -> None: ...
|
||||
def add_charset(
|
||||
charset: str, header_enc: Optional[int] = ..., body_enc: Optional[int] = ..., output_charset: Optional[str] = ...
|
||||
) -> None: ...
|
||||
def add_alias(alias: str, canonical: str) -> None: ...
|
||||
def add_codec(charset: str, codecname: str) -> None: ...
|
||||
|
||||
@@ -1,15 +1,13 @@
|
||||
# Stubs for email.contentmanager (Python 3.4)
|
||||
|
||||
from typing import Any, Callable
|
||||
from email.message import Message
|
||||
from typing import Any, Callable
|
||||
|
||||
class ContentManager:
|
||||
def __init__(self) -> None: ...
|
||||
def get_content(self, msg: Message, *args: Any, **kw: Any) -> Any: ...
|
||||
def set_content(self, msg: Message, obj: Any, *args: Any,
|
||||
**kw: Any) -> Any: ...
|
||||
def set_content(self, msg: Message, obj: Any, *args: Any, **kw: Any) -> Any: ...
|
||||
def add_get_handler(self, key: str, handler: Callable[..., Any]) -> None: ...
|
||||
def add_set_handler(self, typekey: type,
|
||||
handler: Callable[..., Any]) -> None: ...
|
||||
def add_set_handler(self, typekey: type, handler: Callable[..., Any]) -> None: ...
|
||||
|
||||
raw_data_manager: ContentManager
|
||||
|
||||
@@ -5,7 +5,6 @@ class MessageParseError(MessageError): ...
|
||||
class HeaderParseError(MessageParseError): ...
|
||||
class BoundaryError(MessageParseError): ...
|
||||
class MultipartConversionError(MessageError, TypeError): ...
|
||||
|
||||
class MessageDefect(ValueError): ...
|
||||
class NoBoundaryInMultipartDefect(MessageDefect): ...
|
||||
class StartBoundaryNotFoundDefect(MessageDefect): ...
|
||||
|
||||
@@ -1,17 +1,15 @@
|
||||
# Stubs for email.feedparser (Python 3.4)
|
||||
|
||||
from typing import Callable
|
||||
from email.message import Message
|
||||
from email.policy import Policy
|
||||
from typing import Callable
|
||||
|
||||
class FeedParser:
|
||||
def __init__(self, _factory: Callable[[], Message] = ..., *,
|
||||
policy: Policy = ...) -> None: ...
|
||||
def __init__(self, _factory: Callable[[], Message] = ..., *, policy: Policy = ...) -> None: ...
|
||||
def feed(self, data: str) -> None: ...
|
||||
def close(self) -> Message: ...
|
||||
|
||||
class BytesFeedParser:
|
||||
def __init__(self, _factory: Callable[[], Message] = ..., *,
|
||||
policy: Policy = ...) -> None: ...
|
||||
def __init__(self, _factory: Callable[[], Message] = ..., *, policy: Policy = ...) -> None: ...
|
||||
def feed(self, data: bytes) -> None: ...
|
||||
def close(self) -> Message: ...
|
||||
|
||||
@@ -1,27 +1,20 @@
|
||||
# Stubs for email.generator (Python 3.4)
|
||||
|
||||
from typing import BinaryIO, TextIO, Optional
|
||||
from email.message import Message
|
||||
from email.policy import Policy
|
||||
from typing import BinaryIO, Optional, TextIO
|
||||
|
||||
class Generator:
|
||||
def clone(self, fp: TextIO) -> Generator: ...
|
||||
def write(self, s: str) -> None: ...
|
||||
def __init__(self, outfp: TextIO, mangle_from_: bool = ...,
|
||||
maxheaderlen: int = ..., *,
|
||||
policy: Policy = ...) -> None: ...
|
||||
def flatten(self, msg: Message, unixfrom: bool = ...,
|
||||
linesep: Optional[str] = ...) -> None: ...
|
||||
def __init__(self, outfp: TextIO, mangle_from_: bool = ..., maxheaderlen: int = ..., *, policy: Policy = ...) -> None: ...
|
||||
def flatten(self, msg: Message, unixfrom: bool = ..., linesep: Optional[str] = ...) -> None: ...
|
||||
|
||||
class BytesGenerator:
|
||||
def clone(self, fp: BinaryIO) -> BytesGenerator: ...
|
||||
def write(self, s: str) -> None: ...
|
||||
def __init__(self, outfp: BinaryIO, mangle_from_: bool = ...,
|
||||
maxheaderlen: int = ..., *,
|
||||
policy: Policy = ...) -> None: ...
|
||||
def flatten(self, msg: Message, unixfrom: bool = ...,
|
||||
linesep: Optional[str] = ...) -> None: ...
|
||||
def __init__(self, outfp: BinaryIO, mangle_from_: bool = ..., maxheaderlen: int = ..., *, policy: Policy = ...) -> None: ...
|
||||
def flatten(self, msg: Message, unixfrom: bool = ..., linesep: Optional[str] = ...) -> None: ...
|
||||
|
||||
class DecodedGenerator(Generator):
|
||||
def __init__(self, outfp: TextIO, mangle_from_: bool = ...,
|
||||
maxheaderlen: int = ..., *, fmt: Optional[str] = ...) -> None: ...
|
||||
def __init__(self, outfp: TextIO, mangle_from_: bool = ..., maxheaderlen: int = ..., *, fmt: Optional[str] = ...) -> None: ...
|
||||
|
||||
@@ -1,25 +1,28 @@
|
||||
# Stubs for email.header (Python 3.4)
|
||||
|
||||
from typing import Union, Optional, Any, List, Tuple
|
||||
from email.charset import Charset
|
||||
from typing import Any, List, Optional, Tuple, Union
|
||||
|
||||
class Header:
|
||||
def __init__(self, s: Union[bytes, str, None] = ...,
|
||||
charset: Union[Charset, str, None] = ...,
|
||||
maxlinelen: Optional[int] = ...,
|
||||
header_name: Optional[str] = ..., continuation_ws: str = ...,
|
||||
errors: str = ...) -> None: ...
|
||||
def append(self, s: Union[bytes, str],
|
||||
charset: Union[Charset, str, None] = ...,
|
||||
errors: str = ...) -> None: ...
|
||||
def encode(self, splitchars: str = ..., maxlinelen: Optional[int] = ...,
|
||||
linesep: str = ...) -> str: ...
|
||||
def __init__(
|
||||
self,
|
||||
s: Union[bytes, str, None] = ...,
|
||||
charset: Union[Charset, str, None] = ...,
|
||||
maxlinelen: Optional[int] = ...,
|
||||
header_name: Optional[str] = ...,
|
||||
continuation_ws: str = ...,
|
||||
errors: str = ...,
|
||||
) -> None: ...
|
||||
def append(self, s: Union[bytes, str], charset: Union[Charset, str, None] = ..., errors: str = ...) -> None: ...
|
||||
def encode(self, splitchars: str = ..., maxlinelen: Optional[int] = ..., linesep: str = ...) -> str: ...
|
||||
def __str__(self) -> str: ...
|
||||
def __eq__(self, other: Any) -> bool: ...
|
||||
def __ne__(self, other: Any) -> bool: ...
|
||||
|
||||
def decode_header(header: Union[Header, str]) -> List[Tuple[bytes, Optional[str]]]: ...
|
||||
def make_header(decoded_seq: List[Tuple[bytes, Optional[str]]],
|
||||
maxlinelen: Optional[int] = ...,
|
||||
header_name: Optional[str] = ...,
|
||||
continuation_ws: str = ...) -> Header: ...
|
||||
def make_header(
|
||||
decoded_seq: List[Tuple[bytes, Optional[str]]],
|
||||
maxlinelen: Optional[int] = ...,
|
||||
header_name: Optional[str] = ...,
|
||||
continuation_ws: str = ...,
|
||||
) -> Header: ...
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
# Stubs for email.headerregistry (Python 3.4)
|
||||
|
||||
from datetime import datetime as _datetime
|
||||
from typing import Dict, Tuple, Optional, Any, Union, Mapping
|
||||
from email.errors import MessageDefect
|
||||
from email.policy import Policy
|
||||
from typing import Any, Dict, Mapping, Optional, Tuple, Union
|
||||
|
||||
class BaseHeader(str):
|
||||
@property
|
||||
@@ -25,8 +25,7 @@ class UniqueUnstructuredHeader(UnstructuredHeader): ...
|
||||
class DateHeader:
|
||||
datetime: _datetime
|
||||
@classmethod
|
||||
def parse(cls, string: Union[str, _datetime],
|
||||
kwds: Dict[str, Any]) -> None: ...
|
||||
def parse(cls, string: Union[str, _datetime], kwds: Dict[str, Any]) -> None: ...
|
||||
|
||||
class UniqueDateHeader(DateHeader): ...
|
||||
|
||||
@@ -70,9 +69,7 @@ class ContentTransferEncodingHeader:
|
||||
def parse(cls, string: str, kwds: Dict[str, Any]) -> None: ...
|
||||
|
||||
class HeaderRegistry:
|
||||
def __init__(self, base_class: BaseHeader = ...,
|
||||
default_class: BaseHeader = ...,
|
||||
use_default_map: bool = ...) -> None: ...
|
||||
def __init__(self, base_class: BaseHeader = ..., default_class: BaseHeader = ..., use_default_map: bool = ...) -> None: ...
|
||||
def map_to_type(self, name: str, cls: BaseHeader) -> None: ...
|
||||
def __getitem__(self, name: str) -> BaseHeader: ...
|
||||
def __call__(self, name: str, value: Any) -> BaseHeader: ...
|
||||
@@ -83,15 +80,13 @@ class Address:
|
||||
domain: str
|
||||
@property
|
||||
def addr_spec(self) -> str: ...
|
||||
def __init__(self, display_name: str = ...,
|
||||
username: Optional[str] = ...,
|
||||
domain: Optional[str] = ...,
|
||||
addr_spec: Optional[str] = ...) -> None: ...
|
||||
def __init__(
|
||||
self, display_name: str = ..., username: Optional[str] = ..., domain: Optional[str] = ..., addr_spec: Optional[str] = ...
|
||||
) -> None: ...
|
||||
def __str__(self) -> str: ...
|
||||
|
||||
class Group:
|
||||
display_name: Optional[str]
|
||||
addresses: Tuple[Address, ...]
|
||||
def __init__(self, display_name: Optional[str] = ...,
|
||||
addresses: Optional[Tuple[Address, ...]] = ...) -> None: ...
|
||||
def __init__(self, display_name: Optional[str] = ..., addresses: Optional[Tuple[Address, ...]] = ...) -> None: ...
|
||||
def __str__(self) -> str: ...
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
# Stubs for email.iterators (Python 3.4)
|
||||
|
||||
from typing import Iterator, Optional
|
||||
from email.message import Message
|
||||
from typing import Iterator, Optional
|
||||
|
||||
def body_line_iterator(msg: Message, decode: bool = ...) -> Iterator[str]: ...
|
||||
def typed_subpart_iterator(msg: Message, maintype: str = ...,
|
||||
subtype: Optional[str] = ...) -> Iterator[str]: ...
|
||||
def typed_subpart_iterator(msg: Message, maintype: str = ..., subtype: Optional[str] = ...) -> Iterator[str]: ...
|
||||
|
||||
@@ -1,15 +1,13 @@
|
||||
# Stubs for email.message (Python 3.4)
|
||||
|
||||
from typing import (
|
||||
List, Optional, Union, Tuple, TypeVar, Generator, Sequence, Iterator, Any
|
||||
)
|
||||
from email.charset import Charset
|
||||
from email.contentmanager import ContentManager
|
||||
from email.errors import MessageDefect
|
||||
from email.header import Header
|
||||
from email.policy import Policy
|
||||
from email.contentmanager import ContentManager
|
||||
from typing import Any, Generator, Iterator, List, Optional, Sequence, Tuple, TypeVar, Union
|
||||
|
||||
_T = TypeVar('_T')
|
||||
_T = TypeVar("_T")
|
||||
|
||||
_PayloadType = Union[List[Message], str, bytes]
|
||||
_CharsetType = Union[Charset, str, None]
|
||||
@@ -27,8 +25,7 @@ class Message:
|
||||
def get_unixfrom(self) -> Optional[str]: ...
|
||||
def attach(self, payload: Message) -> None: ...
|
||||
def get_payload(self, i: int = ..., decode: bool = ...) -> Any: ... # returns Optional[_PayloadType]
|
||||
def set_payload(self, payload: _PayloadType,
|
||||
charset: _CharsetType = ...) -> None: ...
|
||||
def set_payload(self, payload: _PayloadType, charset: _CharsetType = ...) -> None: ...
|
||||
def set_charset(self, charset: _CharsetType) -> None: ...
|
||||
def get_charset(self) -> _CharsetType: ...
|
||||
def __len__(self) -> int: ...
|
||||
@@ -48,14 +45,10 @@ class Message:
|
||||
def get_content_subtype(self) -> str: ...
|
||||
def get_default_type(self) -> str: ...
|
||||
def set_default_type(self, ctype: str) -> None: ...
|
||||
def get_params(self, failobj: _T = ..., header: str = ...,
|
||||
unquote: bool = ...) -> Union[List[Tuple[str, str]], _T]: ...
|
||||
def get_param(self, param: str, failobj: _T = ..., header: str = ...,
|
||||
unquote: bool = ...) -> Union[_T, _ParamType]: ...
|
||||
def del_param(self, param: str, header: str = ...,
|
||||
requote: bool = ...) -> None: ...
|
||||
def set_type(self, type: str, header: str = ...,
|
||||
requote: bool = ...) -> None: ...
|
||||
def get_params(self, failobj: _T = ..., header: str = ..., unquote: bool = ...) -> Union[List[Tuple[str, str]], _T]: ...
|
||||
def get_param(self, param: str, failobj: _T = ..., header: str = ..., unquote: bool = ...) -> Union[_T, _ParamType]: ...
|
||||
def del_param(self, param: str, header: str = ..., requote: bool = ...) -> None: ...
|
||||
def set_type(self, type: str, header: str = ..., requote: bool = ...) -> None: ...
|
||||
def get_filename(self, failobj: _T = ...) -> Union[_T, str]: ...
|
||||
def get_boundary(self, failobj: _T = ...) -> Union[_T, str]: ...
|
||||
def set_boundary(self, boundary: str) -> None: ...
|
||||
@@ -63,39 +56,33 @@ class Message:
|
||||
def get_charsets(self, failobj: _T = ...) -> Union[_T, List[str]]: ...
|
||||
def walk(self) -> Generator[Message, None, None]: ...
|
||||
def get_content_disposition(self) -> Optional[str]: ...
|
||||
def as_string(self, unixfrom: bool = ..., maxheaderlen: int = ...,
|
||||
policy: Optional[Policy] = ...) -> str: ...
|
||||
def as_bytes(self, unixfrom: bool = ...,
|
||||
policy: Optional[Policy] = ...) -> bytes: ...
|
||||
def as_string(self, unixfrom: bool = ..., maxheaderlen: int = ..., policy: Optional[Policy] = ...) -> str: ...
|
||||
def as_bytes(self, unixfrom: bool = ..., policy: Optional[Policy] = ...) -> bytes: ...
|
||||
def __bytes__(self) -> bytes: ...
|
||||
def set_param(self, param: str, value: str, header: str = ...,
|
||||
requote: bool = ..., charset: str = ...,
|
||||
language: str = ..., replace: bool = ...) -> None: ...
|
||||
def set_param(
|
||||
self,
|
||||
param: str,
|
||||
value: str,
|
||||
header: str = ...,
|
||||
requote: bool = ...,
|
||||
charset: str = ...,
|
||||
language: str = ...,
|
||||
replace: bool = ...,
|
||||
) -> None: ...
|
||||
def __init__(self, policy: Policy = ...) -> None: ...
|
||||
|
||||
class MIMEPart(Message):
|
||||
def get_body(self,
|
||||
preferencelist: Sequence[str] = ...) -> Optional[Message]: ...
|
||||
def get_body(self, preferencelist: Sequence[str] = ...) -> Optional[Message]: ...
|
||||
def iter_attachments(self) -> Iterator[Message]: ...
|
||||
def iter_parts(self) -> Iterator[Message]: ...
|
||||
def get_content(self, *args: Any,
|
||||
content_manager: Optional[ContentManager] = ...,
|
||||
**kw: Any) -> Any: ...
|
||||
def set_content(self, *args: Any,
|
||||
content_manager: Optional[ContentManager] = ...,
|
||||
**kw: Any) -> None: ...
|
||||
def get_content(self, *args: Any, content_manager: Optional[ContentManager] = ..., **kw: Any) -> Any: ...
|
||||
def set_content(self, *args: Any, content_manager: Optional[ContentManager] = ..., **kw: Any) -> None: ...
|
||||
def make_related(self, boundary: Optional[str] = ...) -> None: ...
|
||||
def make_alternative(self, boundary: Optional[str] = ...) -> None: ...
|
||||
def make_mixed(self, boundary: Optional[str] = ...) -> None: ...
|
||||
def add_related(self, *args: Any,
|
||||
content_manager: Optional[ContentManager] = ...,
|
||||
**kw: Any) -> None: ...
|
||||
def add_alternative(self, *args: Any,
|
||||
content_manager: Optional[ContentManager] = ...,
|
||||
**kw: Any) -> None: ...
|
||||
def add_attachment(self, *args: Any,
|
||||
content_manager: Optional[ContentManager] = ...,
|
||||
**kw: Any) -> None: ...
|
||||
def add_related(self, *args: Any, content_manager: Optional[ContentManager] = ..., **kw: Any) -> None: ...
|
||||
def add_alternative(self, *args: Any, content_manager: Optional[ContentManager] = ..., **kw: Any) -> None: ...
|
||||
def add_attachment(self, *args: Any, content_manager: Optional[ContentManager] = ..., **kw: Any) -> None: ...
|
||||
def clear(self) -> None: ...
|
||||
def clear_content(self) -> None: ...
|
||||
def is_attachment(self) -> bool: ...
|
||||
|
||||
@@ -9,25 +9,21 @@ FeedParser = email.feedparser.FeedParser
|
||||
BytesFeedParser = email.feedparser.BytesFeedParser
|
||||
|
||||
class Parser:
|
||||
def __init__(self, _class: Callable[[], Message] = ..., *,
|
||||
policy: Policy = ...) -> None: ...
|
||||
def __init__(self, _class: Callable[[], Message] = ..., *, policy: Policy = ...) -> None: ...
|
||||
def parse(self, fp: TextIO, headersonly: bool = ...) -> Message: ...
|
||||
def parsestr(self, text: str, headersonly: bool = ...) -> Message: ...
|
||||
|
||||
class HeaderParser(Parser):
|
||||
def __init__(self, _class: Callable[[], Message] = ..., *,
|
||||
policy: Policy = ...) -> None: ...
|
||||
def __init__(self, _class: Callable[[], Message] = ..., *, policy: Policy = ...) -> None: ...
|
||||
def parse(self, fp: TextIO, headersonly: bool = ...) -> Message: ...
|
||||
def parsestr(self, text: str, headersonly: bool = ...) -> Message: ...
|
||||
|
||||
class BytesHeaderParser(BytesParser):
|
||||
def __init__(self, _class: Callable[[], Message] = ..., *,
|
||||
policy: Policy = ...) -> None: ...
|
||||
def __init__(self, _class: Callable[[], Message] = ..., *, policy: Policy = ...) -> None: ...
|
||||
def parse(self, fp: BinaryIO, headersonly: bool = ...) -> Message: ...
|
||||
def parsebytes(self, text: bytes, headersonly: bool = ...) -> Message: ...
|
||||
|
||||
class BytesParser:
|
||||
def __init__(self, _class: Callable[[], Message] = ..., *,
|
||||
policy: Policy = ...) -> None: ...
|
||||
def __init__(self, _class: Callable[[], Message] = ..., *, policy: Policy = ...) -> None: ...
|
||||
def parse(self, fp: BinaryIO, headersonly: bool = ...) -> Message: ...
|
||||
def parsebytes(self, text: bytes, headersonly: bool = ...) -> Message: ...
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
# Stubs for email.policy (Python 3.4)
|
||||
|
||||
from abc import abstractmethod
|
||||
from typing import Any, List, Optional, Tuple, Union, Callable
|
||||
from email.message import Message
|
||||
from email.contentmanager import ContentManager
|
||||
from email.errors import MessageDefect
|
||||
from email.header import Header
|
||||
from email.contentmanager import ContentManager
|
||||
from email.message import Message
|
||||
from typing import Any, Callable, List, Optional, Tuple, Union
|
||||
|
||||
class Policy:
|
||||
max_line_length: Optional[int]
|
||||
@@ -15,19 +15,15 @@ class Policy:
|
||||
mange_from: bool
|
||||
def __init__(self, **kw: Any) -> None: ...
|
||||
def clone(self, **kw: Any) -> Policy: ...
|
||||
def handle_defect(self, obj: Message,
|
||||
defect: MessageDefect) -> None: ...
|
||||
def register_defect(self, obj: Message,
|
||||
defect: MessageDefect) -> None: ...
|
||||
def handle_defect(self, obj: Message, defect: MessageDefect) -> None: ...
|
||||
def register_defect(self, obj: Message, defect: MessageDefect) -> None: ...
|
||||
def header_max_count(self, name: str) -> Optional[int]: ...
|
||||
@abstractmethod
|
||||
def header_source_parse(self, sourcelines: List[str]) -> str: ...
|
||||
@abstractmethod
|
||||
def header_store_parse(self, name: str,
|
||||
value: str) -> Tuple[str, str]: ...
|
||||
def header_store_parse(self, name: str, value: str) -> Tuple[str, str]: ...
|
||||
@abstractmethod
|
||||
def header_fetch_parse(self, name: str,
|
||||
value: str) -> str: ...
|
||||
def header_fetch_parse(self, name: str, value: str) -> str: ...
|
||||
@abstractmethod
|
||||
def fold(self, name: str, value: str) -> str: ...
|
||||
@abstractmethod
|
||||
@@ -35,8 +31,7 @@ class Policy:
|
||||
|
||||
class Compat32(Policy):
|
||||
def header_source_parse(self, sourcelines: List[str]) -> str: ...
|
||||
def header_store_parse(self, name: str,
|
||||
value: str) -> Tuple[str, str]: ...
|
||||
def header_store_parse(self, name: str, value: str) -> Tuple[str, str]: ...
|
||||
def header_fetch_parse(self, name: str, value: str) -> Union[str, Header]: ... # type: ignore
|
||||
def fold(self, name: str, value: str) -> str: ...
|
||||
def fold_binary(self, name: str, value: str) -> bytes: ...
|
||||
@@ -49,8 +44,7 @@ class EmailPolicy(Policy):
|
||||
header_factory: Callable[[str, str], str]
|
||||
content_manager: ContentManager
|
||||
def header_source_parse(self, sourcelines: List[str]) -> str: ...
|
||||
def header_store_parse(self, name: str,
|
||||
value: str) -> Tuple[str, str]: ...
|
||||
def header_store_parse(self, name: str, value: str) -> Tuple[str, str]: ...
|
||||
def header_fetch_parse(self, name: str, value: str) -> str: ...
|
||||
def fold(self, name: str, value: str) -> str: ...
|
||||
def fold_binary(self, name: str, value: str) -> bytes: ...
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# Stubs for email.utils (Python 3.4)
|
||||
|
||||
from typing import List, Optional, Tuple, Union
|
||||
from email.charset import Charset
|
||||
import datetime
|
||||
from email.charset import Charset
|
||||
from typing import List, Optional, Tuple, Union
|
||||
|
||||
_ParamType = Union[str, Tuple[Optional[str], Optional[str], str]]
|
||||
_PDTZ = Tuple[int, int, int, int, int, int, int, int, int, Optional[int]]
|
||||
@@ -10,24 +10,17 @@ _PDTZ = Tuple[int, int, int, int, int, int, int, int, int, Optional[int]]
|
||||
def quote(str: str) -> str: ...
|
||||
def unquote(str: str) -> str: ...
|
||||
def parseaddr(address: Optional[str]) -> Tuple[str, str]: ...
|
||||
def formataddr(pair: Tuple[Optional[str], str],
|
||||
charset: Union[str, Charset] = ...) -> str: ...
|
||||
def formataddr(pair: Tuple[Optional[str], str], charset: Union[str, Charset] = ...) -> str: ...
|
||||
def getaddresses(fieldvalues: List[str]) -> List[Tuple[str, str]]: ...
|
||||
def parsedate(date: str) -> Optional[Tuple[int, int, int, int, int, int, int, int, int]]: ...
|
||||
def parsedate_tz(date: str) -> Optional[_PDTZ]: ...
|
||||
def parsedate_to_datetime(date: str) -> datetime.datetime: ...
|
||||
def mktime_tz(tuple: _PDTZ) -> int: ...
|
||||
def formatdate(timeval: Optional[float] = ..., localtime: bool = ...,
|
||||
usegmt: bool = ...) -> str: ...
|
||||
def formatdate(timeval: Optional[float] = ..., localtime: bool = ..., usegmt: bool = ...) -> str: ...
|
||||
def format_datetime(dt: datetime.datetime, usegmt: bool = ...) -> str: ...
|
||||
def localtime(dt: Optional[datetime.datetime] = ...) -> datetime.datetime: ...
|
||||
def make_msgid(idstring: Optional[str] = ...,
|
||||
domain: Optional[str] = ...) -> str: ...
|
||||
def make_msgid(idstring: Optional[str] = ..., domain: Optional[str] = ...) -> str: ...
|
||||
def decode_rfc2231(s: str) -> Tuple[Optional[str], Optional[str], str]: ...
|
||||
def encode_rfc2231(s: str, charset: Optional[str] = ...,
|
||||
language: Optional[str] = ...) -> str: ...
|
||||
def collapse_rfc2231_value(value: _ParamType, errors: str = ...,
|
||||
fallback_charset: str = ...) -> str: ...
|
||||
def decode_params(
|
||||
params: List[Tuple[str, str]]
|
||||
) -> List[Tuple[str, _ParamType]]: ...
|
||||
def encode_rfc2231(s: str, charset: Optional[str] = ..., language: Optional[str] = ...) -> str: ...
|
||||
def collapse_rfc2231_value(value: _ParamType, errors: str = ..., fallback_charset: str = ...) -> str: ...
|
||||
def decode_params(params: List[Tuple[str, str]]) -> List[Tuple[str, _ParamType]]: ...
|
||||
|
||||
Reference in New Issue
Block a user