massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-pyright / node_modules / pyright / dist / typeshed-fallback / stdlib / shlex.pyi
1 import sys
2 from typing import Any, Iterable, TextIO, TypeVar
3
4 def split(s: str, comments: bool = ..., posix: bool = ...) -> list[str]: ...
5
6 if sys.version_info >= (3, 8):
7     def join(split_command: Iterable[str]) -> str: ...
8
9 def quote(s: str) -> str: ...
10
11 _SLT = TypeVar("_SLT", bound=shlex)
12
13 class shlex(Iterable[str]):
14     commenters: str
15     wordchars: str
16     whitespace: str
17     escape: str
18     quotes: str
19     escapedquotes: str
20     whitespace_split: bool
21     infile: str
22     instream: TextIO
23     source: str
24     debug: int
25     lineno: int
26     token: str
27     eof: str
28     punctuation_chars: str
29     def __init__(
30         self,
31         instream: str | TextIO | None = ...,
32         infile: str | None = ...,
33         posix: bool = ...,
34         punctuation_chars: bool | str = ...,
35     ) -> None: ...
36     def get_token(self) -> str: ...
37     def push_token(self, tok: str) -> None: ...
38     def read_token(self) -> str: ...
39     def sourcehook(self, newfile: str) -> tuple[str, TextIO]: ...
40     # TODO argument types
41     def push_source(self, newstream: Any, newfile: Any = ...) -> None: ...
42     def pop_source(self) -> None: ...
43     def error_leader(self, infile: str | None = ..., lineno: int | None = ...) -> None: ...
44     def __iter__(self: _SLT) -> _SLT: ...
45     def __next__(self) -> str: ...