functools: Add typing for decorated function arguments in cache API [take 2]#10523
functools: Add typing for decorated function arguments in cache API [take 2]#10523jakkdl wants to merge 8 commits intopython:mainfrom
functools: Add typing for decorated function arguments in cache API [take 2]#10523Conversation
This comment has been minimized.
This comment has been minimized.
primer. This reverts commit 89e9326.
|
Diff from mypy_primer, showing the effect of this PR on open source code: |
|
Considering how hard you have to work with So in this case rather than trying to return a different type from But maybe even this wouldn't work correctly, so not sure. |
Yeah after digging thoroughly into this I have more or less given up for the moment. It might be possible to improve the stubs a little bit merely using |
Just FYI, assuming that PEP goes through, for typeshed usage the CPython release cycle doesn't really matter. The hypothetical timeline would go something like this:
|
|
@jakkdl Thanks for your work on this so far. Should we close the PR for the time being? |
yeah, might as well :) |
|
For the uninitiated: which PEP are you discussing above? |
|
Yes, exactly, the linked repository contains further information.
|
|
👀 Let me add this issue to the list of motivating cases, thanks for the mention! |
Giving #9768 another attempt, adding WMOkiishis suggested changes to see if that helps with mypy primer output.
Also rebased on top of
main/