I was looking through the typeshed source and saw that in the pathlib.pyi it does the following:
typeshed
pathlib.pyi
_P = TypeVar(\'_P\', bound=PurePath) .