Use variable annotations everywhere (#2909)

This commit is contained in:
Michael Lee
2019-04-13 01:40:52 -07:00
committed by Sebastian Rittau
parent b3c76aab49
commit efb67946f8
458 changed files with 9135 additions and 9135 deletions

View File

@@ -7,12 +7,12 @@ BASE64: int # undocumented
SHORTEST: int # undocumented
class Charset:
input_charset = ... # type: str
header_encoding = ... # type: int
body_encoding = ... # type: int
output_charset = ... # type: Optional[str]
input_codec = ... # type: Optional[str]
output_codec = ... # type: Optional[str]
input_charset: str
header_encoding: int
body_encoding: int
output_charset: Optional[str]
input_codec: Optional[str]
output_codec: Optional[str]
def __init__(self, input_charset: str = ...) -> None: ...
def get_body_encoding(self) -> str: ...
def get_output_charset(self) -> Optional[str]: ...

View File

@@ -12,4 +12,4 @@ class ContentManager:
def add_set_handler(self, typekey: type,
handler: Callable[..., Any]) -> None: ...
raw_data_manager = ... # type: ContentManager
raw_data_manager: ContentManager

View File

@@ -23,7 +23,7 @@ class UnstructuredHeader:
class UniqueUnstructuredHeader(UnstructuredHeader): ...
class DateHeader:
datetime = ... # type: _datetime
datetime: _datetime
@classmethod
def parse(cls, string: Union[str, _datetime],
kwds: Dict[str, Any]) -> None: ...
@@ -31,8 +31,8 @@ class DateHeader:
class UniqueDateHeader(DateHeader): ...
class AddressHeader:
groups = ... # type: Tuple[Group, ...]
addresses = ... # type: Tuple[Address, ...]
groups: Tuple[Group, ...]
addresses: Tuple[Address, ...]
@classmethod
def parse(cls, string: str, kwds: Dict[str, Any]) -> None: ...
@@ -45,27 +45,27 @@ class SingleAddressHeader(AddressHeader):
class UniqueSingleAddressHeader(SingleAddressHeader): ...
class MIMEVersionHeader:
version = ... # type: Optional[str]
major = ... # type: Optional[int]
minor = ... # type: Optional[int]
version: Optional[str]
major: Optional[int]
minor: Optional[int]
@classmethod
def parse(cls, string: str, kwds: Dict[str, Any]) -> None: ...
class ParameterizedMIMEHeader:
params = ... # type: Mapping[str, Any]
params: Mapping[str, Any]
@classmethod
def parse(cls, string: str, kwds: Dict[str, Any]) -> None: ...
class ContentTypeHeader(ParameterizedMIMEHeader):
content_type = ... # type: str
maintype = ... # type: str
subtype = ... # type: str
content_type: str
maintype: str
subtype: str
class ContentDispositionHeader(ParameterizedMIMEHeader):
content_disposition = ... # type: str
content_disposition: str
class ContentTransferEncodingHeader:
cte = ... # type: str
cte: str
@classmethod
def parse(cls, string: str, kwds: Dict[str, Any]) -> None: ...
@@ -78,9 +78,9 @@ class HeaderRegistry:
def __call__(self, name: str, value: Any) -> BaseHeader: ...
class Address:
display_name = ... # type: str
username = ... # type: str
domain = ... # type: str
display_name: str
username: str
domain: str
@property
def addr_spec(self) -> str: ...
def __init__(self, display_name: str = ...,
@@ -90,8 +90,8 @@ class Address:
def __str__(self) -> str: ...
class Group:
display_name = ... # type: Optional[str]
addresses = ... # type: Tuple[Address, ...]
display_name: Optional[str]
addresses: Tuple[Address, ...]
def __init__(self, display_name: Optional[str] = ...,
addresses: Optional[Tuple[Address, ...]] = ...) -> None: ...
def __str__(self) -> str: ...

View File

@@ -19,9 +19,9 @@ _ParamType = Union[str, Tuple[Optional[str], Optional[str], str]]
_HeaderType = Union[str, Header]
class Message:
preamble = ... # type: Optional[str]
epilogue = ... # type: Optional[str]
defects = ... # type: List[MessageDefect]
preamble: Optional[str]
epilogue: Optional[str]
defects: List[MessageDefect]
def __str__(self) -> str: ...
def is_multipart(self) -> bool: ...
def set_unixfrom(self, unixfrom: str) -> None: ...

View File

@@ -9,12 +9,12 @@ from email.header import Header
from email.contentmanager import ContentManager
class Policy:
max_line_length = ... # type: Optional[int]
linesep = ... # type: str
cte_type = ... # type: str
raise_on_defect = ... # type: bool
max_line_length: Optional[int]
linesep: str
cte_type: str
raise_on_defect: bool
if sys.version_info >= (3, 5):
mange_from = ... # type: bool
mange_from: bool
def __init__(self, **kw: Any) -> None: ...
def clone(self, **kw: Any) -> Policy: ...
def handle_defect(self, obj: Message,
@@ -43,13 +43,13 @@ class Compat32(Policy):
def fold(self, name: str, value: str) -> str: ...
def fold_binary(self, name: str, value: str) -> bytes: ...
compat32 = ... # type: Compat32
compat32: Compat32
class EmailPolicy(Policy):
utf8 = ... # type: bool
refold_source = ... # type: str
header_factory = ... # type: Callable[[str, str], str]
content_manager = ... # type: ContentManager
utf8: bool
refold_source: str
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]: ...
@@ -57,8 +57,8 @@ class EmailPolicy(Policy):
def fold(self, name: str, value: str) -> str: ...
def fold_binary(self, name: str, value: str) -> bytes: ...
default = ... # type: EmailPolicy
SMTP = ... # type: EmailPolicy
SMTPUTF8 = ... # type: EmailPolicy
HTTP = ... # type: EmailPolicy
strict = ... # type: EmailPolicy
default: EmailPolicy
SMTP: EmailPolicy
SMTPUTF8: EmailPolicy
HTTP: EmailPolicy
strict: EmailPolicy