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,7 +1,7 @@
import sys
from _typeshed import Self
from collections.abc import Iterable
from typing import TextIO
from typing_extensions import Self
if sys.version_info >= (3, 8):
__all__ = ["shlex", "split", "quote", "join"]
@@ -46,5 +46,5 @@ class shlex(Iterable[str]):
def push_source(self, newstream: str | TextIO, newfile: str | None = None) -> None: ...
def pop_source(self) -> None: ...
def error_leader(self, infile: str | None = None, lineno: int | None = None) -> None: ...
def __iter__(self: Self) -> Self: ...
def __iter__(self) -> Self: ...
def __next__(self) -> str: ...