-
-
Notifications
You must be signed in to change notification settings - Fork 31.3k
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
bpo-45438: format of inspect.Signature with generic builtins #29212
Conversation
Use types.GenericAlias in inspect.formatannotation to correctly add type arguments of builtin types to the string representation of Signatures.
This comment has been minimized.
This comment has been minimized.
@martinitus Please add a news entry. |
Added news entry! How are backports done? - Should I create separate PRs for the 3.10 and 3.9 branches where I cherry pick the two commits?
|
Let’s ignore the doc error. Backport are done by a bot. I will merge once the other tests pass. |
Thanks @martinitus for the PR, and @gvanrossum for merging it 🌮🎉.. I'm working now to backport this PR to: 3.9, 3.10. |
@gvanrossum: Please replace |
GH-29253 is a backport of this pull request to the 3.10 branch. |
GH-29254 is a backport of this pull request to the 3.9 branch. |
Use types.GenericAlias in inspect.formatannotation to correctly add type arguments of builtin types to the string representation of Signatures. Co-authored-by: Martin Rückl <martin.rueckl@codecentric.de> (cherry picked from commit d02ffd1) Co-authored-by: Martin Rueckl <enigma@nbubu.de>
Use types.GenericAlias in inspect.formatannotation to correctly add type arguments of builtin types to the string representation of Signatures. Co-authored-by: Martin Rückl <martin.rueckl@codecentric.de> (cherry picked from commit d02ffd1) Co-authored-by: Martin Rueckl <enigma@nbubu.de>
isinstance(annotation,types.GenericAlias)
ininspect.formatannotation
to correctly add type arguments of builtin types to the string representation of Signatures.https://bugs.python.org/issue45438