-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Am 09.09.2010 13:28, schrieb Martin Brochhaus:
> 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?

This was a bug where autodoc threw away correct source/line information even
when it was already present.  It should be fixed in 1.0.6.

cheers,
Georg

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.16 (GNU/Linux)

iEYEARECAAYFAk0m6HQACgkQN9GcIYhpnLD6rQCgqVHqNsJe1lsgedktNMcCD/uR
tvoAn3vSqIwqSG/iAP3TYhP6nrx8Yjtq
=pzzG
-----END PGP SIGNATURE-----

-- 
You received this message because you are subscribed to the Google Groups 
"sphinx-dev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sphinx-dev?hl=en.

Reply via email to