mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 20:54:28 +08:00
Use typing_extensions.Self in the stdlib (#9694)
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
from _typeshed import Self
|
||||
from collections.abc import Generator, Iterator, Sequence
|
||||
from email import _ParamsType, _ParamType
|
||||
from email.charset import Charset
|
||||
@@ -6,7 +5,7 @@ from email.contentmanager import ContentManager
|
||||
from email.errors import MessageDefect
|
||||
from email.policy import Policy
|
||||
from typing import Any, TypeVar, overload
|
||||
from typing_extensions import TypeAlias
|
||||
from typing_extensions import Self, TypeAlias
|
||||
|
||||
__all__ = ["Message", "EmailMessage"]
|
||||
|
||||
@@ -84,7 +83,7 @@ class Message:
|
||||
def get_charsets(self, failobj: None = None) -> list[str] | None: ...
|
||||
@overload
|
||||
def get_charsets(self, failobj: _T) -> list[str] | _T: ...
|
||||
def walk(self: Self) -> Generator[Self, None, None]: ...
|
||||
def walk(self) -> Generator[Self, None, None]: ...
|
||||
def get_content_disposition(self) -> str | None: ...
|
||||
def as_string(self, unixfrom: bool = False, maxheaderlen: int = 0, policy: Policy | None = None) -> str: ...
|
||||
def as_bytes(self, unixfrom: bool = False, policy: Policy | None = None) -> bytes: ...
|
||||
|
||||
Reference in New Issue
Block a user