I am writing docs for my python library Using sphinx, I also added another sphinx documentation with intersphinx. And it works pretty nice, but a few my functions are named the same as in referenced documentation, which leads to shadowing their names for :func:... referencing.

Is there any way I can reference shadowed function do_some() in other documentation? (:func:`do_some` creates a link to my function do_some())

有帮助吗?

解决方案

According to the docs you can use the identifier from your intersphinx_mapping as a prefix to the target. Example:

:ref:`comparison manual <python:comparisons>`

I think this should work with work with functions too.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top