| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
This mirrors logic in typing.get_args. The trickiness comes from how we flatten args in collections.abc.Callable, see https://bugs.python.org/issue42195
|
I think we can skip news since this is just a fix for the unreleased #30900 |
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM
Sorry, something went wrong.
| for arg in t.__args__ | ||
| ) | ||
| t = t.__origin__[args] | ||
| if (t.__origin__ is collections.abc.Callable |
There was a problem hiding this comment.
I know this code pattern appears once in Generic code and once here now. Should we just convert this into one function? Maybe _should_flatten_callable_args()? Seems abit tiresome to repeat this (and it's also confusing for people who haven't dealt with Callable's args before).
Sorry, something went wrong.
There was a problem hiding this comment.
(sorry, missed this comment)
I added a helper function for this
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
This mirrors logic in typing.get_args. The trickiness comes from how we
flatten args in collections.abc.Callable, see
https://bugs.python.org/issue42195
#91621