File: utils.pyi

package info (click to toggle)
mypy 0.470-complete-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 5,864 kB
  • ctags: 3,264
  • sloc: python: 21,838; makefile: 18
file content (33 lines) | stat: -rw-r--r-- 1,610 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# Stubs for email.utils (Python 3.4)

from typing import List, Optional, Tuple, Union
from email.charset import Charset
import datetime

_ParamType = Union[str, Tuple[Optional[str], Optional[str], str]]
_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: str) -> Tuple[str, str]: ...
def formataddr(pair: Tuple[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 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 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]]: ...