massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-pyright / node_modules / pyright / dist / typeshed-fallback / stubs / click / click / testing.pyi
1 import io
2 from typing import IO, Any, BinaryIO, ContextManager, Iterable, Mapping, Text
3 from typing_extensions import Literal
4
5 from .core import BaseCommand
6
7 clickpkg: Any
8
9 class EchoingStdin:
10     def __init__(self, input: BinaryIO, output: BinaryIO) -> None: ...
11     def __getattr__(self, x: str) -> Any: ...
12     def read(self, n: int = ...) -> bytes: ...
13     def readline(self, n: int = ...) -> bytes: ...
14     def readlines(self) -> list[bytes]: ...
15     def __iter__(self) -> Iterable[bytes]: ...
16
17 def make_input_stream(input: bytes | Text | IO[Any] | None, charset: Text) -> BinaryIO: ...
18
19 class Result:
20     runner: CliRunner
21     exit_code: int
22     exception: Any
23     exc_info: Any | None
24     stdout_bytes: bytes
25     stderr_bytes: bytes
26     def __init__(
27         self,
28         runner: CliRunner,
29         stdout_bytes: bytes,
30         stderr_bytes: bytes,
31         exit_code: int,
32         exception: Any,
33         exc_info: Any | None = ...,
34     ) -> None: ...
35     @property
36     def output(self) -> Text: ...
37     @property
38     def stdout(self) -> Text: ...
39     @property
40     def stderr(self) -> Text: ...
41
42 class CliRunner:
43     charset: str
44     env: Mapping[str, str]
45     echo_stdin: bool
46     mix_stderr: bool
47     def __init__(
48         self, charset: Text | None = ..., env: Mapping[str, str] | None = ..., echo_stdin: bool = ..., mix_stderr: bool = ...
49     ) -> None: ...
50     def get_default_prog_name(self, cli: BaseCommand) -> str: ...
51     def make_env(self, overrides: Mapping[str, str] | None = ...) -> dict[str, str]: ...
52     def isolation(
53         self, input: bytes | Text | IO[Any] | None = ..., env: Mapping[str, str] | None = ..., color: bool = ...
54     ) -> ContextManager[tuple[io.BytesIO, io.BytesIO | Literal[False]]]: ...
55     def invoke(
56         self,
57         cli: BaseCommand,
58         args: str | Iterable[str] | None = ...,
59         input: bytes | Text | IO[Any] | None = ...,
60         env: Mapping[str, str] | None = ...,
61         catch_exceptions: bool = ...,
62         color: bool = ...,
63         **extra: Any,
64     ) -> Result: ...
65     def isolated_filesystem(self) -> ContextManager[str]: ...