On Thursday, August 22, 2013 6:05:46 AM UTC-7, Daniel Krenn wrote:
>
> Am 2013-08-21 17:29, schrieb John H Palmieri: 
> > On Wednesday, August 21, 2013 5:15:34 AM UTC-7, Daniel Krenn wrote: 
> >       [combinat ] /path/to/file/blub.py:docstring of 
> sage.combinat.blub:27: 
> >       ERROR: Unexpected indentation. 
> > Some times the error message is accurate and means that the error is in 
> > line 27 of the documentation for sage.combinat.blub, which would mean 
> > the top-level docstring in the file. But frequently it is not. When I'm 
> > looking for these errors, I usually 
> > 
> > - scan through the source code hoping I spot the problem 
> > - scan through the built documentation hoping I spot the problem (of 
> > course you should do this anyway, but sometimes one small error in 
> > indentation can lead to a lot of badly formatted documentation, which 
> > can be easy to see) 
> > - divide and conquer 
>
> Ok, did that now, but without success removing the warnings (errors). 
> You can see the file in trac ticket #15078: 
> - If I remove the top (general) docstring, then the messages give 
> suddenly more information and say: 
>   - lines 10 and 11 in FSMLetter 
>   - some lines in FSMProcessIterator 
> - If I remove those docstrings, the messages say now some lines in 
>   get_next_transistion. 
> - Removing that docstring, gives the warnings in the function next. 
> I checked all those decstrings and couldn't find anything. 
>
> The output (especially of those mentioned above) looks as it should be. 
>
> Feel free to look at the patch of #15078 and tell me what I'm missing ;) 
>

Look at the examples for the 'quotient' method and the tests for 
'setup_latex_preamble'. (This is what I saw using "scan through the built 
documentation hoping I spot the problem".) Fixing those (add a blank line 
after EXAMPLES in the first case, replace "TESTS:" by "TESTS::" in the 
second) seems to get rid of the warnings.

By the way, the continuation character "\" in the doctest on line 1567 
looks suspicious to me, but it doesn't seem to cause a warning. I don't 
really like using continuation characters in Python/Sage code, and I don't 
think I'm alone in that...

Line 3566: "oder" should be "or"?

For the "_latex_" method, although it isn't included in the reference 
manual since the name starts with an underscore, it would be a good idea to 
start the docstring with r""", since it has a number of backslashes in it.

-- 
John

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to