mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-08 21:14:49 +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
|
import types
|
||||||
from typing import Any, TypeVar, Type, Iterable
|
from typing import Any, TypeVar, Type, Iterable, Optional
|
||||||
|
|
||||||
from django.core.mail.message import EmailMessage
|
from django.core.mail.message import EmailMessage
|
||||||
|
|
||||||
@@ -7,7 +7,7 @@ _T = TypeVar("_T", bound="BaseEmailBackend")
|
|||||||
|
|
||||||
class BaseEmailBackend:
|
class BaseEmailBackend:
|
||||||
def __init__(self, fail_silently: bool = ..., **kwargs: Any) -> None: ...
|
def __init__(self, fail_silently: bool = ..., **kwargs: Any) -> None: ...
|
||||||
def open(self) -> bool: ...
|
def open(self) -> Optional[bool]: ...
|
||||||
def close(self) -> None: ...
|
def close(self) -> None: ...
|
||||||
def __enter__(self: _T) -> _T: ...
|
def __enter__(self: _T) -> _T: ...
|
||||||
def __exit__(
|
def __exit__(
|
||||||
|
|||||||
@@ -229,7 +229,6 @@ IGNORED_ERRORS = {
|
|||||||
],
|
],
|
||||||
'mail': [
|
'mail': [
|
||||||
'List item 1 has incompatible type "None"; expected "str"',
|
'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"',
|
'Argument 1 to "push" of "SMTPChannel" has incompatible type "str"; expected "bytes"',
|
||||||
'Value of type "Union[List[Message], str, bytes, None]" is not indexable',
|
'Value of type "Union[List[Message], str, bytes, None]" is not indexable',
|
||||||
'Incompatible types in assignment '
|
'Incompatible types in assignment '
|
||||||
|
|||||||
Reference in New Issue
Block a user