mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-07 20:54:29 +08:00
Fix smtp backend open (#240)
This commit is contained in:
committed by
Nikita Sobolev
parent
c0c5d1e588
commit
041754f817
@@ -1,5 +1,5 @@
|
||||
import types
|
||||
from typing import Any, TypeVar, Type, Iterable
|
||||
from typing import Any, TypeVar, Type, Iterable, Optional
|
||||
|
||||
from django.core.mail.message import EmailMessage
|
||||
|
||||
@@ -7,7 +7,7 @@ _T = TypeVar("_T", bound="BaseEmailBackend")
|
||||
|
||||
class BaseEmailBackend:
|
||||
def __init__(self, fail_silently: bool = ..., **kwargs: Any) -> None: ...
|
||||
def open(self) -> bool: ...
|
||||
def open(self) -> Optional[bool]: ...
|
||||
def close(self) -> None: ...
|
||||
def __enter__(self: _T) -> _T: ...
|
||||
def __exit__(
|
||||
|
||||
@@ -229,7 +229,6 @@ IGNORED_ERRORS = {
|
||||
],
|
||||
'mail': [
|
||||
'List item 1 has incompatible type "None"; expected "str"',
|
||||
'Incompatible return value type (got "None", expected "bool")',
|
||||
'Argument 1 to "push" of "SMTPChannel" has incompatible type "str"; expected "bytes"',
|
||||
'Value of type "Union[List[Message], str, bytes, None]" is not indexable',
|
||||
'Incompatible types in assignment '
|
||||
|
||||
Reference in New Issue
Block a user