I have some code like:

Foo/Bar.py
class Bar(object):
  ...code and doc...

Foo/__init__.py
from .Bar import Bar

...IOW, Bar.py defines the class Bar, which should appear to be fully qualified like Foo.Bar, not Foo.Bar.Bar. I believe this to be a common pattern(?), but I can't figure out how to get it to document correctly.

If I do:

  .. autoclass:: Foo.Bar

...then I get documentation, but the source links are missing.

If I do:

  .. automodule:: Foo.Bar

...then I get source links, but the class name is documented as Foo.Bar.Bar.

Is there a way to either strip the superfluous module from the name, or else get the source links to work with the first form? (Failing that, is there a way to turn the source links off entirely? The problem is that I have a mixture of classes and "true" modules, which will have source links if the classes don't, and I don't want that inconsistency...)

--
Matthew

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

Reply via email to