[Docstring-checkins] CVS: dps/dps/transforms references.py,1.4,1.5
Status: Pre-Alpha
Brought to you by:
goodger
From: David G. <go...@us...> - 2002-02-06 02:50:33
|
Update of /cvsroot/docstring/dps/dps/transforms In directory usw-pr-cvs1:/tmp/cvs-serv28968/dps/dps/transforms Modified Files: references.py Log Message: ``utils.Reporter``, ``nodes.NodeVisitor`` reform. Index: references.py =================================================================== RCS file: /cvsroot/docstring/dps/dps/transforms/references.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** references.py 2002/01/30 04:52:17 1.4 --- references.py 2002/02/06 02:50:31 1.5 *************** *** 181,185 **** reflist = self.doctree.refnames[name] except KeyError, instance: ! sw = self.doctree.reporter.information( 'Indirect hyperlink target "%s" is not referenced.' % name) --- 181,185 ---- reflist = self.doctree.refnames[name] except KeyError, instance: ! sw = self.doctree.reporter.info( 'Indirect hyperlink target "%s" is not referenced.' % name) *************** *** 210,216 **** reflist = self.doctree.refnames[name] except KeyError, instance: ! sw = self.doctree.reporter.information( ! 'External hyperlink target "%s" is not referenced.' ! % name) self.doctree += sw return --- 210,215 ---- reflist = self.doctree.refnames[name] except KeyError, instance: ! sw = self.doctree.reporter.info( ! 'External hyperlink target "%s" is not referenced.' % name) self.doctree += sw return *************** *** 232,236 **** ! class ChainedTargetResolver(nodes.Visitor): """ --- 231,235 ---- ! class ChainedTargetResolver(nodes.NodeVisitor): """ *************** *** 268,277 **** """ ! def visit_target(self, node, ancestry): if node.hasattr('refuri'): refuri = node['refuri'] ! parent, index = ancestry[-1] for i in range(index - 1, -1, -1): ! sibling = parent[i] if not isinstance(sibling, nodes.target) \ or sibling.hasattr('refuri') \ --- 267,276 ---- """ ! def visit_target(self, node): if node.hasattr('refuri'): refuri = node['refuri'] ! index = node.parent.index(node) for i in range(index - 1, -1, -1): ! sibling = node.parent[i] if not isinstance(sibling, nodes.target) \ or sibling.hasattr('refuri') \ *************** *** 282,288 **** elif node.hasattr('refname'): refname = node['refname'] ! parent, index = ancestry[-1] for i in range(index - 1, -1, -1): ! sibling = parent[i] if not isinstance(sibling, nodes.target) \ or sibling.hasattr('refuri') \ --- 281,287 ---- elif node.hasattr('refname'): refname = node['refname'] ! index = node.parent.index(node) for i in range(index - 1, -1, -1): ! sibling = node.parent[i] if not isinstance(sibling, nodes.target) \ or sibling.hasattr('refuri') \ |