The simplest repro: ```python >>> type A[X, **Y] = None >>> A[int, [str]] A[int, [<class 'str'>]] ``` I think that it should be: ```python >>> type A[X, **Y] = None >>> A[int, [str]] A[int, [str]] ``` We already had similar issues in the past: https://github.com/python/cpython/pull/102637 This happens somewhere in `ga_repr`, I will have a look. <!-- gh-linked-prs --> ### Linked PRs * gh-105488 * gh-106297 <!-- /gh-linked-prs -->