Use _typeshed.Self in Python 2, too (#6932)

This commit is contained in:
Alex Waygood
2022-01-16 22:44:51 +00:00
committed by GitHub
parent 0949e9e90d
commit 6a88d5e7ae
29 changed files with 156 additions and 160 deletions

View File

@@ -1,12 +1,11 @@
from typing import IO, Any, List, Text, TypeVar
from _typeshed import Self
from typing import IO, Any, List, Text
def split(s: str | None, comments: bool = ..., posix: bool = ...) -> List[str]: ...
_SLT = TypeVar("_SLT", bound=shlex)
class shlex:
def __init__(self, instream: IO[Any] | Text = ..., infile: IO[Any] = ..., posix: bool = ...) -> None: ...
def __iter__(self: _SLT) -> _SLT: ...
def __iter__(self: Self) -> Self: ...
def next(self) -> str: ...
def get_token(self) -> str | None: ...
def push_token(self, _str: str) -> None: ...