EDIT: Other answers than the one I provided are welcome! Consider the following function: When documenting with sphinx, I would like to cross-ref both str and Path with intersphinx. But obviously, it does not work for the latter since it is referenced as pathlib.Path in the objects.inv file. Is there a way to tell intersphinx/sphinx that Path is from the