|
| 1 | +from collections.abc import Generator, Mapping, MutableMapping |
| 2 | +from io import StringIO |
| 3 | +from typing import ClassVar |
| 4 | +from typing_extensions import Literal, TypeAlias |
| 5 | + |
| 6 | +def b2u(string: bytes | str) -> str: ... |
| 7 | +def u2b(string: str | bytes) -> bytes: ... |
| 8 | + |
| 9 | +_Quotes: TypeAlias = Literal["'", '"'] |
| 10 | +_ContextType: TypeAlias = Literal["ARG", "ENV", "LABEL"] |
| 11 | + |
| 12 | +class WordSplitter: |
| 13 | + SQUOTE: ClassVar[_Quotes] |
| 14 | + DQUOTE: ClassVar[_Quotes] |
| 15 | + stream: StringIO |
| 16 | + args: Mapping[str, str] | None |
| 17 | + envs: Mapping[str, str] | None |
| 18 | + quotes: _Quotes | None |
| 19 | + escaped: bool |
| 20 | + def __init__(self, s: str, args: Mapping[str, str] | None = ..., envs: Mapping[str, str] | None = ...) -> None: ... |
| 21 | + def dequote(self) -> str: ... |
| 22 | + def split(self, maxsplit: int | None = ..., dequote: bool = ...) -> Generator[str | None, None, None]: ... |
| 23 | + |
| 24 | +def extract_key_values(env_replace: bool, args: Mapping[str, str], envs: Mapping[str, str], instruction_value: str): ... |
| 25 | +def get_key_val_dictionary( |
| 26 | + instruction_value, env_replace: bool = ..., args: Mapping[str, str] | None = ..., envs: Mapping[str, str] | None = ... |
| 27 | +): ... |
| 28 | + |
| 29 | +class Context: |
| 30 | + args: MutableMapping[str, str] |
| 31 | + envs: MutableMapping[str, str] |
| 32 | + labels: MutableMapping[str, str] |
| 33 | + line_args: Mapping[str, str] |
| 34 | + line_envs: Mapping[str, str] |
| 35 | + line_labels: Mapping[str, str] |
| 36 | + def __init__( |
| 37 | + self, |
| 38 | + args: MutableMapping[str, str] | None = ..., |
| 39 | + envs: MutableMapping[str, str] | None = ..., |
| 40 | + labels: MutableMapping[str, str] | None = ..., |
| 41 | + line_args: Mapping[str, str] | None = ..., |
| 42 | + line_envs: Mapping[str, str] | None = ..., |
| 43 | + line_labels: Mapping[str, str] | None = ..., |
| 44 | + ) -> None: ... |
| 45 | + def set_line_value(self, context_type: _ContextType, value: Mapping[str, str]) -> None: ... |
| 46 | + def get_line_value(self, context_type: _ContextType) -> Mapping[str, str]: ... |
| 47 | + def get_values(self, context_type: _ContextType) -> Mapping[str, str]: ... |
0 commit comments