qgis / pyqgis-api-docs-builder

Sphinx project to build python API documentation for QGIS
https://qgis.org/pyqgis/master/
GNU General Public License v2.0
86 stars 31 forks source link

overloaded methods #18

Closed 3nids closed 4 days ago

3nids commented 6 years ago

Go to https://qgis.org/pyqgis/master/core/Layout/QgsLayoutExporter.html#qgis.core.QgsLayoutExporter.exportToPdf The exportToPdf has more than one way to call it but only the one in the grayed area (next to the name) is obvious, and when looking for a function you may miss the other alternative. This is also true for exportToImage, exportToSVG, print... (at least in this class). Moreover, the paragraph showing the second alternative does not look sexy to read and you want to skip it (I unfortunately did it (!) for hours until I find in the github repo what I was looking for, which is not the way we want people to proceed.).

3nids commented 4 years ago

https://github.com/sphinx-doc/sphinx/issues/2106

I don't see any solution for this at the moment except reimplementing autodoc

kannes commented 2 years ago

sphinx-doc/sphinx#2106

This issue has been closed as implemented and it seems that overloaded functions can now be handled by Sphinx. :))

3nids commented 1 month ago

still not super nice: https://qgis.org/pyqgis/master/core/QgsLayoutExporter.html#qgis.core.QgsLayoutExporter.exportToPdf

kannes commented 1 month ago

Yeah, that looks the same as before to me :(

It looks like support was again improved in Sphinx 4.0: https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html#confval-autodoc_docstring_signature

I don't know what the input of that is and if it fits what Sphinx expects.

3nids commented 1 month ago

by reading a bit, found this: https://sphinx-toolbox.readthedocs.io/en/latest/extensions/more_autodoc/overloads.html

3nids commented 1 month ago

@nyalldawson do you have any hints/thoughts on this one?

kannes commented 4 days ago

Oh this looks great now!

image


image