]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-45438: format of inspect.Signature with generic builtins (GH-29212)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 27 Oct 2021 22:00:18 +0000 (15:00 -0700)
committerGitHub <noreply@github.com>
Wed, 27 Oct 2021 22:00:18 +0000 (15:00 -0700)
commit21150c6fa330f80747d698e4b883c7b4801a25bd
treeabb5695dacbac6d94210ac25f088fdfaa52c9ab5
parent30c1f18ee62cef301e18488b80b4d329290f7b95
bpo-45438: format of inspect.Signature with generic builtins (GH-29212)

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 d02ffd1b5c0fd8dec6dd2f7e3f2b0cfae48b7899)

Co-authored-by: Martin Rueckl <enigma@nbubu.de>
Lib/inspect.py
Lib/test/test_inspect.py
Misc/NEWS.d/next/Library/2021-10-27-10-05-39.bpo-45438.Xz5lGU.rst [new file with mode: 0644]