X-Git-Url: https://git.josue.xyz/?p=dotfiles%2F.git;a=blobdiff_plain;f=.config%2Fcoc%2Fextensions%2Fcoc-python-data%2FlanguageServer.0.5.59%2FTypeshed%2Fthird_party%2F2and3%2Fclick%2Ftypes.pyi;fp=.config%2Fcoc%2Fextensions%2Fcoc-python-data%2FlanguageServer.0.5.59%2FTypeshed%2Fthird_party%2F2and3%2Fclick%2Ftypes.pyi;h=8473ea4ae443e8f3be2f2d34dd776d75b8a22fae;hp=0000000000000000000000000000000000000000;hb=3be0a9efc698a9570a44456009afc6014812625a;hpb=d2f432cc757f42f0318fdddcab8c00b240d47088 diff --git a/.config/coc/extensions/coc-python-data/languageServer.0.5.59/Typeshed/third_party/2and3/click/types.pyi b/.config/coc/extensions/coc-python-data/languageServer.0.5.59/Typeshed/third_party/2and3/click/types.pyi new file mode 100644 index 00000000..8473ea4a --- /dev/null +++ b/.config/coc/extensions/coc-python-data/languageServer.0.5.59/Typeshed/third_party/2and3/click/types.pyi @@ -0,0 +1,248 @@ +from typing import Any, Callable, IO, Iterable, List, Optional, TypeVar, Union, Tuple as _PyTuple, Type +import uuid + +from click.core import Context, Parameter, _ParamType as ParamType, _ConvertibleType + +class BoolParamType(ParamType): + def __call__( + self, + value: Optional[str], + param: Optional[Parameter] = ..., + ctx: Optional[Context] = ..., + ) -> bool: + ... + + def convert( + self, + value: str, + param: Optional[Parameter], + ctx: Optional[Context], + ) -> bool: + ... + + +class CompositeParamType(ParamType): + arity: int + + +class Choice(ParamType): + choices: Iterable[str] + def __init__(self, choices: Iterable[str]) -> None: + ... + + +class FloatParamType(ParamType): + def __call__( + self, + value: Optional[str], + param: Optional[Parameter] = ..., + ctx: Optional[Context] = ..., + ) -> float: + ... + + def convert( + self, + value: str, + param: Optional[Parameter], + ctx: Optional[Context], + ) -> float: + ... + + +class FloatRange(FloatParamType): + ... + + +class File(ParamType): + def __init__( + self, + mode: str = ..., + encoding: Optional[str] = ..., + errors: Optional[str] = ..., + lazy: Optional[bool] = ..., + atomic: Optional[bool] = ..., + ) -> None: + ... + + def __call__( + self, + value: Optional[str], + param: Optional[Parameter] = ..., + ctx: Optional[Context] = ..., + ) -> IO: + ... + + def convert( + self, + value: str, + param: Optional[Parameter], + ctx: Optional[Context], + ) -> IO: + ... + + def resolve_lazy_flag(self, value: str) -> bool: + ... + + +_F = TypeVar('_F') # result of the function +_Func = Callable[[Optional[str]], _F] + + +class FuncParamType(ParamType): + func: _Func + + def __init__(self, func: _Func) -> None: + ... + + def __call__( + self, + value: Optional[str], + param: Optional[Parameter] = ..., + ctx: Optional[Context] = ..., + ) -> _F: + ... + + def convert( + self, + value: str, + param: Optional[Parameter], + ctx: Optional[Context], + ) -> _F: + ... + + +class IntParamType(ParamType): + def __call__( + self, + value: Optional[str], + param: Optional[Parameter] = ..., + ctx: Optional[Context] = ..., + ) -> int: + ... + + def convert( + self, + value: str, + param: Optional[Parameter], + ctx: Optional[Context], + ) -> int: + ... + + +class IntRange(IntParamType): + def __init__( + self, min: Optional[int] = ..., max: Optional[int] = ..., clamp: bool = ... + ) -> None: + ... + + +_PathType = TypeVar('_PathType', str, bytes) + + +class Path(ParamType): + def __init__( + self, + exists: bool = ..., + file_okay: bool = ..., + dir_okay: bool = ..., + writable: bool = ..., + readable: bool = ..., + resolve_path: bool = ..., + allow_dash: bool = ..., + path_type: Optional[Type[_PathType]] = ..., + ) -> None: + ... + + def coerce_path_result(self, rv: Union[str, bytes]) -> _PathType: + ... + + def __call__( + self, + value: Optional[str], + param: Optional[Parameter] = ..., + ctx: Optional[Context] = ..., + ) -> _PathType: + ... + + def convert( + self, + value: str, + param: Optional[Parameter], + ctx: Optional[Context], + ) -> _PathType: + ... + +class StringParamType(ParamType): + def __call__( + self, + value: Optional[str], + param: Optional[Parameter] = ..., + ctx: Optional[Context] = ..., + ) -> str: + ... + + def convert( + self, + value: str, + param: Optional[Parameter], + ctx: Optional[Context], + ) -> str: + ... + + +class Tuple(CompositeParamType): + types: List[ParamType] + + def __init__(self, types: Iterable[Any]) -> None: + ... + + def __call__( + self, + value: Optional[str], + param: Optional[Parameter] = ..., + ctx: Optional[Context] = ..., + ) -> Tuple: + ... + + def convert( + self, + value: str, + param: Optional[Parameter], + ctx: Optional[Context], + ) -> Tuple: + ... + + +class UnprocessedParamType(ParamType): + ... + + +class UUIDParameterType(ParamType): + def __call__( + self, + value: Optional[str], + param: Optional[Parameter] = ..., + ctx: Optional[Context] = ..., + ) -> uuid.UUID: + ... + + def convert( + self, + value: str, + param: Optional[Parameter], + ctx: Optional[Context], + ) -> uuid.UUID: + ... + + +def convert_type(ty: Optional[_ConvertibleType], default: Optional[Any] = ...) -> ParamType: + ... + +# parameter type shortcuts + +BOOL = BoolParamType() +FLOAT = FloatParamType() +INT = IntParamType() +STRING = StringParamType() +UNPROCESSED = UnprocessedParamType() +UUID = UUIDParameterType()