autodoc: generate directives including domain name.

This commit is contained in:
Georg Brandl 2009-09-07 23:18:17 +02:00
parent 9101593b01
commit 6769daa80a

View File

@ -390,9 +390,11 @@ class Documenter(object):
def add_directive_header(self, sig):
"""Add the directive header and options to the generated content."""
domain = getattr(self, 'domain', 'py')
directive = getattr(self, 'directivetype', self.objtype)
name = self.format_name()
self.add_line(u'.. %s:: %s%s' % (directive, name, sig), '<autodoc>')
self.add_line(u'.. %s:%s:: %s%s' % (domain, directive, name, sig),
'<autodoc>')
if self.options.noindex:
self.add_line(u' :noindex:', '<autodoc>')
if self.objpath: