Update the cheatsheet for functions and keyword argument typing
PEP 692 has been accepted and issue #4441 is fixed - added an entry to the cheatsheet mentioning a new way of annotating **kwargs in a function signature.
I don't think mypy enables PEP 692 by default yet, so maybe we should do that first?
Thanks for the comments. I added the section to the TypedDict docs, also updated the section on mixing required and not required items.
As for enabling Unpack - good point! Let's park the doc update for a while. I will try to go through the PEP 692 and see if its specification is enforced by mypy or if we're still missing something and create a separate PR for that. I'm going mountain hiking for a few days, will try to pick that up when I come back.
Hey, sorry for no updates on this (the weather was too nice not to go outside). I started working on enabling the Unpack feature by default, just want to make sure that all the examples from PEP 692 are in the test suite and are passing. Hope to find some time to work on this over the weekend.
I've opened another PR https://github.com/python/mypy/pull/15612 that's adding tests from PEP 692, still have trouble with:
- assignment when source and destination contain kwargs - is reporting an error on a line that should be correct
- passing kwargs inside a function to another function - not reporting any errors as those are not passing. I don't really have an idea how to approach this for now. When trying to fix the former, I played around with normalizing the callables based on some conditions, but that broke other stuff and also the code was hard to reason about. Do you have any tips?