OK, so pyglet.windows.Window.invalid.__doc__ prints bool.__doc__

That's why we're getting all the "int(x=0) -> int or long", "str(object='') -> string" ...

And now I understand why autodoc did not want this docstring.

But how do I get the correct docstring?

I'm looking at it ...



El 17/11/2013 17:44, "Juan J. Martínez" escribió:
On 17/11/13 16:38, "Juan J. Martínez" wrote:
[...]
You can try this:

# Attribute documentation patch
from sphinx.ext.autodoc import ClassLevelDocumenter, AttributeDocumenter

def fix_add_content(self, more_content, no_docstring=False):
     # See sphinx.ext.autodoc.py line 1206
     ClassLevelDocumenter.add_content(self, more_content, no_docstring=False)

AttributeDocumenter.add_content = fix_add_content

Cool, thanks! Your patch works perfect with sphinx 1.1.3.

Shall I include it in our repo?
Oops, it's not working as expected. See:

http://pyglet-current.usebox.net/api/window/pyglet.window.Window.html#pyglet.window.Window.invalid

"Returns True when the argument x is true, False otherwise. The builtins
True and False are the only two instances of the class bool. The class
bool is a subclass of the class int, and cannot be subclassed."

That's not the docstring that can be found in the attribute definition:

https://code.google.com/p/pyglet/source/browse/pyglet/window/__init__.py#362

Regards,

Juan



--
You received this message because you are subscribed to the Google Groups 
"pyglet-users" 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/pyglet-users.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to