mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Update pydoc topics and adapt Topics builder to Sphinx 1.0.
This commit is contained in:
parent
604ef370b3
commit
80ff2adf88
2 changed files with 35 additions and 36 deletions
|
@ -145,10 +145,10 @@ class PydocTopicsBuilder(Builder):
|
||||||
for label in self.status_iterator(pydoc_topic_labels,
|
for label in self.status_iterator(pydoc_topic_labels,
|
||||||
'building topics... ',
|
'building topics... ',
|
||||||
length=len(pydoc_topic_labels)):
|
length=len(pydoc_topic_labels)):
|
||||||
if label not in self.env.labels:
|
if label not in self.env.domaindata['std']['labels']:
|
||||||
self.warn('label %r not in documentation' % label)
|
self.warn('label %r not in documentation' % label)
|
||||||
continue
|
continue
|
||||||
docname, labelid, sectname = self.env.labels[label]
|
docname, labelid, sectname = self.env.domaindata['std']['labels'][label]
|
||||||
doctree = self.env.get_and_resolve_doctree(docname, self)
|
doctree = self.env.get_and_resolve_doctree(docname, self)
|
||||||
document = new_document('<section node>')
|
document = new_document('<section node>')
|
||||||
document.append(doctree.ids[labelid])
|
document.append(doctree.ids[labelid])
|
||||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue