Hello group,

this is quite hard to explain and I don't understand the inner
workings of the whole call stack that finally leads to a warning
output when there are syntax errors in docstrings - but I think I
found a way to reproduce this error.

Create a python file with the following content:

# -*- coding: utf-8 -*-

class Foo(object):
    """Foo."""

    def foo_bar(self):
        """Foo.

        Foo foo foo
        foo:
          id: UUID (str)
          text: Text (unicode)
          a_id: Antrags-ID (int)
          geloescht: Gelöscht-Flag (boolean)
        """
        pass


Try to run sphinx on it. Hopefully it will recognize a syntax error. I
usually put a breakpoint at this line of code:
http://bitbucket.org/birkenfeld/sphinx/src/f0b836f45d3e/sphinx/environment.py#cl-86

You will see that the variable "text" contains "u'<autodoc>:0: (ERROR/
3) Unexpected indentation.\n'" which is quite useless.

When you walk up the call stack to this line:
http://bitbucket.org/birkenfeld/sphinx/src/f0b836f45d3e/sphinx/ext/autodoc.py#cl-128

you will see that the parameter **kwargs contains the correct line and
source information.

Any ideas what causes this behaviour?

Best regards,
Martin

-- 
You received this message because you are subscribed to the Google Groups 
"sphinx-dev" group.
To post to this group, send email to sphinx-...@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.

Reply via email to