Make shlex.shlex convertable to a list in Python 2. (#2927)

This simply copies the relevant lines over from the Python 3 stub.
This commit is contained in:
Rebecca Chen
2019-04-21 00:21:00 -07:00
committed by Sebastian Rittau
parent 97240083c4
commit fd57aee5da

View File

@@ -1,9 +1,12 @@
from typing import Optional, List, Any, IO
from typing import Any, IO, List, Optional, TypeVar
def split(s: Optional[str], comments: bool = ..., posix: bool = ...) -> List[str]: ...
_SLT = TypeVar('_SLT', bound=shlex)
class shlex:
def __init__(self, instream: IO[Any] = ..., infile: IO[Any] = ..., posix: bool = ...) -> None: ...
def __iter__(self: _SLT) -> _SLT: ...
def get_token(self) -> Optional[str]: ...
def push_token(self, _str: str) -> None: ...
def read_token(self) -> str: ...