mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-15 08:17:08 +08:00
Use a more general type for django.core.mail.send_mass_mail's datatuple (#1062)
* Use a datatuple in django.core.mail.send_mass_mail Even though the implementation works for both a List of tuples and a tuple of tuples, the docs recommend using a tuple. https://github.com/django/django/blob/main/django/core/mail/__init__.py#L112 https://docs.djangoproject.com/en/4.0/topics/email/#send-mass-mail * Use a more general type for send_mass_mail's datatuple
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
from typing import Any, List, Optional, Sequence, Tuple
|
||||
from typing import Any, Iterable, List, Optional, Sequence, Tuple
|
||||
|
||||
from .message import DEFAULT_ATTACHMENT_MIME_TYPE as DEFAULT_ATTACHMENT_MIME_TYPE
|
||||
from .message import BadHeaderError as BadHeaderError
|
||||
@@ -23,7 +23,7 @@ def send_mail(
|
||||
html_message: Optional[str] = ...,
|
||||
) -> int: ...
|
||||
def send_mass_mail(
|
||||
datatuple: List[Tuple[str, str, str, List[str]]],
|
||||
datatuple: Iterable[Tuple[str, str, str, List[str]]],
|
||||
fail_silently: bool = ...,
|
||||
auth_user: Optional[str] = ...,
|
||||
auth_password: Optional[str] = ...,
|
||||
|
||||
Reference in New Issue
Block a user