Hi Guenter, On Aug 30, 9:51 am, Guenter Milde wrote: > On 2011-08-29, Infinity77 wrote: > > However, now I am getting this kind of errors: > > E:\AGW\agw\aui\auibook.py:docstring of > > aui.auibook.AuiNotebook.DeletePage:6: (ERROR/3) Error in "note" > > directive: > > invalid option block. > > Which is fantastically wrong as the "note" directive is perfectly > > valid: > >:note: L{DeletePage} removes a tab from the multi-notebook, and > > destroys the window as well. > > I pre-process the docstrings using this approach: > > def setup(app): > > app.connect('autodoc-process-docstring', mangle_docstrings) > > In which I replace the L{something} with an appropriate ReST link and > > I replace the ":note:" attribute with ".. note::" (I have to do this > > because of backward compatibility with epydoc). > > Now, I am not sure what has changed in Sphinx to make this happen, but > > I welcome any suggestion in order to fix this issue (I have many more > > errors related to ".. note::", ".. warning::" and friends. > > Are you perfectly sure the resulting markup is valid? > > Valid note directives > ********************* > > .. note:: This is a one line note > > .. note:: This is a > two line note with indentation > > .. note:: One space > indentation is enough > > .. note:: > without argument is fine as well > > .. note:: > > with separate content block > > Invalid note directives > *********************** > > .. note:: No indentation > is an error! > > .. note:: > without argument and indentation > results in two errors. > > In order to check, maybe you can replace the compatibility hack with valid > rst (at least temporarily). If it works with porperly indented notes, try > again with e.g. > > :note: L{DeletePage} removes a tab from the multi-notebook, and > destroys the window as well. > > or > > :note: > L{DeletePage} removes a tab from the multi-notebook, and > destroys the window as well. > > a one-liner > > :note: L{DeletePage} removes a tab from the multi-notebook, and destroys the > window as well. > > or a separate content block > > :note: > > L{DeletePage} removes a tab from the multi-notebook, and > destroys the window as well.
Thank you for your suggestion. Unfortunately, the :note: is already a one-liner, it got mangled by the very smart (!) Google wrapping facility. I get the same error message even if I put something like: :note: hello Moreover, what is curious is that this approach has always worked from Sphinx -0.3 (yes, minus) up to Sphinx 1.0.7, it only breaks now with the pre-dev version. Oh, and another issue. I have these kind of declarations in my docstrings: def ShadowBitmap(self, bmp, shadowcolour): """ Applies a mask on the bitmap accordingly to user input. :param `bmp`: the bitmap to which we want to apply the mask colour `shadowcolour`; :param `shadowcolour`: the mask colour for our bitmap. :type bmp: `wx.Bitmap` :type shadowcolour: `wx.Colour` :return: A masked version of the input bitmap, an instance of `wx.Bitmap`. """ The `type` declaration doesn't get included into the docstring, as you can see here: http://xoomer.virgilio.it/infinity77/AGW_Docs/advancedsplash.AdvancedSplash.html#advancedsplash.AdvancedSplash.ShadowBitmap I wonder what I am doing wrong (don't get fooled by the Google wrapping of long lines, everything is correctly and sanely ReST style). Thank you in advance for your suggestions. Andrea. -- You received this message because you are subscribed to the Google Groups "sphinx-dev" group. To post to this group, send email to sphinx-dev@googlegroups.com. To unsubscribe from this group, send email to sphinx-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sphinx-dev?hl=en.