mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-21 19:32:13 +08:00
Use _typeshed.Self where __enter__ returns self (#5698)
This commit is contained in:
committed by
GitHub
parent
1fb100dca4
commit
58559e56b3
@@ -1,3 +1,4 @@
|
||||
from _typeshed import Self
|
||||
from email.message import Message as _Message
|
||||
from socket import socket
|
||||
from ssl import SSLContext
|
||||
@@ -75,7 +76,7 @@ class SMTP:
|
||||
timeout: float = ...,
|
||||
source_address: Optional[_SourceAddress] = ...,
|
||||
) -> None: ...
|
||||
def __enter__(self) -> SMTP: ...
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
def __exit__(
|
||||
self, exc_type: Optional[Type[BaseException]], exc_value: Optional[BaseException], tb: Optional[TracebackType]
|
||||
) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user