Skip to content

functools.singledispatchmethod: add __call__ for better results #3899

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 4, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions stdlib/3/functools.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ if sys.version_info >= (3, 8):
def register(self, cls: Any, method: None = ...) -> Callable[[Callable[..., _T]], Callable[..., _T]]: ...
@overload
def register(self, cls: Any, method: Callable[..., _T]) -> Callable[..., _T]: ...
def __call__(self, *args: Any, **kwargs: Any) -> _T: ...

class cached_property(Generic[_T]):
func: Callable[[Any], _T]
Expand Down
1 change: 1 addition & 0 deletions tests/stubtest_whitelists/py38.txt
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ dis.stack_effect
email.message.MIMEPart.as_string
enum.Enum._generate_next_value_
functools.partialmethod.__get__
functools.singledispatchmethod.__call__ # A lie to reflect that the descriptor get returns a callable
gettext.install
gettext.translation
hmac.compare_digest
Expand Down