Use typing_extensions.Self in the stdlib (#9694)

This commit is contained in:
Alex Waygood
2023-02-09 09:12:13 +00:00
committed by GitHub
parent 10086c06a1
commit 9ed39d8796
98 changed files with 627 additions and 654 deletions

View File

@@ -1,10 +1,11 @@
import sys
from _typeshed import Self, SupportsGetItem, SupportsItemAccess, Unused
from _typeshed import SupportsGetItem, SupportsItemAccess, Unused
from builtins import list as _list, type as _type
from collections.abc import Iterable, Iterator, Mapping
from email.message import Message
from types import TracebackType
from typing import IO, Any, Protocol
from typing_extensions import Self
__all__ = [
"MiniFieldStorage",
@@ -105,7 +106,7 @@ class FieldStorage:
max_num_fields: int | None = None,
separator: str = "&",
) -> None: ...
def __enter__(self: Self) -> Self: ...
def __enter__(self) -> Self: ...
def __exit__(self, *args: Unused) -> None: ...
def __iter__(self) -> Iterator[str]: ...
def __getitem__(self, key: str) -> Any: ...