A type alias that is generic over a ParamSpec can be specialized with a list of types, and if this list includes a TypeVar, the resulting alias is still generic to type checkers, but it cannot be subscripted again at runtime.
>>> from collections.abc import Callable
>>> type X[**P] = Callable[P, int]
>>> T = TypeVar("T")
>>> X[[T]]
X[[~T]]
>>> X[[T]][str]
Traceback (most recent call last):
File "<python-input-14>", line 1, in <module>
X[[T]][str]
~~~~~~^^^^^
TypeError: X[[~T]] is not a generic class