<div dir="ltr">Hi Phil,<div><br></div><div>I've been looking a bit more, and it seems signals do have docstring.</div><div>At least I set them in my code and Sphinx seems to pick them up:</div><div><br></div><div>See SIP code:</div><div><a href="https://github.com/qgis/QGIS/blob/master/python/gui/qgsmapcanvas.sip.in#L912-L917">https://github.com/qgis/QGIS/blob/master/python/gui/qgsmapcanvas.sip.in#L912-L917</a></div><div><br></div><div>Resulting doc:</div><div><a href="http://python.qgis.org/api/gui/Map/QgsMapCanvas.html#qgis.gui.QgsMapCanvas.currentLayerChanged">http://python.qgis.org/api/gui/Map/QgsMapCanvas.html#qgis.gui.QgsMapCanvas.currentLayerChanged</a></div><div><br></div><div>Is this expected to you?</div><div><br></div><div>If yes, would there be a way to add the signature in the Docstring? Shall we modify the sip gen to achieve this?</div><div>In Python, doing QgsMapCanvas.currentLayerChanged returns:</div>
<p class="inbox-inbox-p1"><span class="inbox-inbox-s1"><unbound PYQT_SIGNAL currentLayerChanged(QgsMapLayer*)></span></p><p class="inbox-inbox-p1">Cheers,</p><p class="inbox-inbox-p1">Denis</p><div><br><div class="gmail_quote"><div dir="ltr">Le mar. 20 févr. 2018 à 08:27, Phil Thompson <<a href="mailto:phil@riverbankcomputing.com">phil@riverbankcomputing.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 20 Feb 2018, at 12:13 pm, Denis Rouzaud <<a href="mailto:denis.rouzaud@gmail.com" target="_blank">denis.rouzaud@gmail.com</a>> wrote:<br>
><br>
> Hi Phil,<br>
><br>
> Another issue for Docstrings...<br>
> Would it be possible to get a signature for signals too?<br>
> They are listed as attribute (and not method in sphinx).<br>
<br>
Signals *are* attributes and attributes cannot have docstrings.<br>
<br>
Phil<br>
</blockquote></div></div></div>