mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-06 12:14:27 +08:00
Fix a Python 2 annotation in shlex. (#4805)
8d21aa21f2/Lib/shlex.py (L24)
suggests instream can be a string as well.
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
from typing import IO, Any, List, Optional, TypeVar
|
||||
from typing import IO, Any, List, Optional, Text, TypeVar, Union
|
||||
|
||||
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 __init__(self, instream: Union[IO[Any], Text] = ..., infile: IO[Any] = ..., posix: bool = ...) -> None: ...
|
||||
def __iter__(self: _SLT) -> _SLT: ...
|
||||
def next(self) -> str: ...
|
||||
def get_token(self) -> Optional[str]: ...
|
||||
|
||||
Reference in New Issue
Block a user