mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-19 18:31:14 +08:00
Use typing_extensions.Self in the stdlib (#9694)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import sys
|
||||
from _socket import _Address as _SourceAddress
|
||||
from _typeshed import ReadableBuffer, Self, _BufferWithLen
|
||||
from _typeshed import ReadableBuffer, _BufferWithLen
|
||||
from collections.abc import Sequence
|
||||
from email.message import Message as _Message
|
||||
from re import Pattern
|
||||
@@ -8,7 +8,7 @@ from socket import socket
|
||||
from ssl import SSLContext
|
||||
from types import TracebackType
|
||||
from typing import Any, Protocol, overload
|
||||
from typing_extensions import TypeAlias
|
||||
from typing_extensions import Self, TypeAlias
|
||||
|
||||
__all__ = [
|
||||
"SMTPException",
|
||||
@@ -95,7 +95,7 @@ class SMTP:
|
||||
timeout: float = ...,
|
||||
source_address: _SourceAddress | None = None,
|
||||
) -> None: ...
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
def __enter__(self) -> Self: ...
|
||||
def __exit__(
|
||||
self, exc_type: type[BaseException] | None, exc_value: BaseException | None, tb: TracebackType | None
|
||||
) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user