Fix smtp backend open (#240)

This commit is contained in:
Konstantin Alekseev
2019-12-01 20:46:11 +03:00
committed by Nikita Sobolev
parent c0c5d1e588
commit 041754f817
2 changed files with 2 additions and 3 deletions

View File

@@ -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__(

View File

@@ -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 '