massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-pyright / node_modules / pyright / dist / typeshed-fallback / stdlib / asyncio / format_helpers.pyi
1 import functools
2 import sys
3 import traceback
4 from types import FrameType, FunctionType
5 from typing import Any, Iterable, Union, overload
6
7 class _HasWrapper:
8     __wrapper__: _HasWrapper | FunctionType
9
10 _FuncType = Union[FunctionType, _HasWrapper, functools.partial[Any], functools.partialmethod[Any]]
11
12 if sys.version_info >= (3, 7):
13     @overload
14     def _get_function_source(func: _FuncType) -> tuple[str, int]: ...
15     @overload
16     def _get_function_source(func: object) -> tuple[str, int] | None: ...
17     def _format_callback_source(func: object, args: Iterable[Any]) -> str: ...
18     def _format_args_and_kwargs(args: Iterable[Any], kwargs: dict[str, Any]) -> str: ...
19     def _format_callback(func: object, args: Iterable[Any], kwargs: dict[str, Any], suffix: str = ...) -> str: ...
20     def extract_stack(f: FrameType | None = ..., limit: int | None = ...) -> traceback.StackSummary: ...