pythonpython-sphinxautodoc

How to replace local file paths in autodoc generated documentation


I'm generating documentation for a python project with Sphinx autodoc. The project contains functions with default parameter values pointing to local paths. Is there a way to replace my own local paths with generic ones when generating docs, avoiding any errors due to non-existent paths?

Since I don't know how a solution to this is supposed to work, I've not tried anything except editing the generated docs manually.


Solution

  • Have you tried using the autodoc-process-signature event function? If not, you can replace specific local paths in your function signatures with generic paths when generating your documentation.

    That way you won't have to manually do it. ( hope this helps )