mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-16 00:37:10 +08:00
add email.__all__ (#13047)
This commit is contained in:
@@ -578,6 +578,7 @@ codecs.StreamRecoder.\w+
|
||||
urllib.response.addbase.\w+
|
||||
|
||||
# __all__-related weirdness (see #6523)
|
||||
email.__all__
|
||||
email.base64mime
|
||||
email.charset
|
||||
email.encoders
|
||||
|
||||
@@ -4,6 +4,29 @@ from email.policy import Policy
|
||||
from typing import IO
|
||||
from typing_extensions import TypeAlias
|
||||
|
||||
# At runtime, listing submodules in __all__ without them being imported is
|
||||
# valid, and causes them to be included in a star import. See #6523
|
||||
|
||||
__all__ = [ # noqa: F822 # Undefined names in __all__
|
||||
"base64mime", # pyright: ignore[reportUnsupportedDunderAll]
|
||||
"charset", # pyright: ignore[reportUnsupportedDunderAll]
|
||||
"encoders", # pyright: ignore[reportUnsupportedDunderAll]
|
||||
"errors", # pyright: ignore[reportUnsupportedDunderAll]
|
||||
"feedparser", # pyright: ignore[reportUnsupportedDunderAll]
|
||||
"generator", # pyright: ignore[reportUnsupportedDunderAll]
|
||||
"header", # pyright: ignore[reportUnsupportedDunderAll]
|
||||
"iterators", # pyright: ignore[reportUnsupportedDunderAll]
|
||||
"message", # pyright: ignore[reportUnsupportedDunderAll]
|
||||
"message_from_file",
|
||||
"message_from_binary_file",
|
||||
"message_from_string",
|
||||
"message_from_bytes",
|
||||
"mime", # pyright: ignore[reportUnsupportedDunderAll]
|
||||
"parser", # pyright: ignore[reportUnsupportedDunderAll]
|
||||
"quoprimime", # pyright: ignore[reportUnsupportedDunderAll]
|
||||
"utils", # pyright: ignore[reportUnsupportedDunderAll]
|
||||
]
|
||||
|
||||
# Definitions imported by multiple submodules in typeshed
|
||||
_ParamType: TypeAlias = str | tuple[str | None, str | None, str] # noqa: Y047
|
||||
_ParamsType: TypeAlias = str | None | tuple[str, str | None, str] # noqa: Y047
|
||||
@@ -12,18 +35,3 @@ def message_from_string(s: str, _class: Callable[[], Message] = ..., *, policy:
|
||||
def message_from_bytes(s: bytes | bytearray, _class: Callable[[], Message] = ..., *, policy: Policy = ...) -> Message: ...
|
||||
def message_from_file(fp: IO[str], _class: Callable[[], Message] = ..., *, policy: Policy = ...) -> Message: ...
|
||||
def message_from_binary_file(fp: IO[bytes], _class: Callable[[], Message] = ..., *, policy: Policy = ...) -> Message: ...
|
||||
|
||||
# Names in __all__ with no definition:
|
||||
# base64mime
|
||||
# charset
|
||||
# encoders
|
||||
# errors
|
||||
# feedparser
|
||||
# generator
|
||||
# header
|
||||
# iterators
|
||||
# message
|
||||
# mime
|
||||
# parser
|
||||
# quoprimime
|
||||
# utils
|
||||
|
||||
Reference in New Issue
Block a user