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
Concatenate
is not covered to be a return type in test_typing
#90553
Comments
Right now all Link: cpython/Lib/test/test_typing.py Lines 4862 to 4877 in 09087b8
I think, that this should be improved. It is an important case. |
Sorry I'm confused: Callable[..., Concatenate] is invalid usage. So I don't think we need to test it. https://docs.python.org/3/library/typing.html#typing.Concatenate. "Concatenate is currently only valid when used as the first argument to a Callable." |
Yes, my bad :) In this case, do we need to make this a |
Last I recall, we stopped checking anything in the param args of Callable since 3.10 because it has too many problems with inter-version typing and typing_extensions usage. E.g. in Python 3.8 Callable[typing_extensions.Concatenate[...], ...] was extremely difficult to implement in typing_extensions since Callable checks were too strict back then (they only allowed list of args). So to avoid such problems in the future, we ceased all param args checking. For the return arg, I'm not too keen on adding more checks for the same reason of allowing future additions. Also the static type checker should warn the user and mypy correctly does that. |
Thank you for the explanation, Ken Jin. Going to close this issue as invalid. |
Concatenate
as return type intest_typing
#30618Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: