-
Notifications
You must be signed in to change notification settings - Fork 266
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
TYP: annotate curry #516
TYP: annotate curry #516
Conversation
I'm currently using One big difference to |
Thanks for this! I'm eager to get type annotations in I also look forward to only supporting Python 3.8+, and am eager to use the |
My preference would be for toolz to be more conservative than NEP 29. It tries to be more core in the stack than most projects. My hope is that we can still get a lot of typing done without |
Agreed, and historically it has cost us little to support older versions of Python. |
I think I found an ugly way to avoid With python 3.9.5 from toolz.functoolz import curry
def fun(test: str) -> int:
return 1
reveal_type(curry(fun)) mypy: note: Revealed type is "toolz.functoolz.curry[builtins.int*]" |
The current version should work on python>=3.5. The second overload is just used to silence mypy. Is it possible to run the CI again? |
This mirrors the type annotations of
functools.partial
.