Stdlib: add 'obvious' default values (#9688)

This commit is contained in:
Alex Waygood
2023-02-07 12:00:40 +00:00
committed by GitHub
parent 60789273a2
commit 53747b264e
17 changed files with 104 additions and 104 deletions

View File

@@ -111,11 +111,11 @@ class _SingleDispatchCallable(Generic[_T]):
# @fun.register(complex)
# def _(arg, verbose=False): ...
@overload
def register(self, cls: type[Any], func: None = ...) -> Callable[[Callable[..., _T]], Callable[..., _T]]: ...
def register(self, cls: type[Any], func: None = None) -> Callable[[Callable[..., _T]], Callable[..., _T]]: ...
# @fun.register
# def _(arg: int, verbose=False):
@overload
def register(self, cls: Callable[..., _T], func: None = ...) -> Callable[..., _T]: ...
def register(self, cls: Callable[..., _T], func: None = None) -> Callable[..., _T]: ...
# fun.register(int, lambda x: x)
@overload
def register(self, cls: type[Any], func: Callable[..., _T]) -> Callable[..., _T]: ...