massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-pyright / node_modules / pyright / dist / typeshed-fallback / stubs / singledispatch / singledispatch.pyi
1 from typing import Any, Callable, Generic, Mapping, TypeVar, overload
2
3 _T = TypeVar("_T")
4
5 class _SingleDispatchCallable(Generic[_T]):
6     registry: Mapping[Any, Callable[..., _T]]
7     def dispatch(self, cls: Any) -> Callable[..., _T]: ...
8     @overload
9     def register(self, cls: Any) -> Callable[[Callable[..., _T]], Callable[..., _T]]: ...
10     @overload
11     def register(self, cls: Any, func: Callable[..., _T]) -> Callable[..., _T]: ...
12     def _clear_cache(self) -> None: ...
13     def __call__(self, *args: Any, **kwargs: Any) -> _T: ...
14
15 def singledispatch(func: Callable[..., _T]) -> _SingleDispatchCallable[_T]: ...