Skip to content

Commit

Permalink
Merge pull request #126 from twisted/intersphinx-not-so-fuller-id
Browse files Browse the repository at this point in the history
Fix name resolution for intersphinx links
  • Loading branch information
hawkowl committed Sep 13, 2016
2 parents 4329634 + 9d69400 commit 6ed85ea
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pydoctor/epydoc2stan.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,11 @@ def translate_identifier_xref(self, fullID, prettyID):
return self._objLink(target, prettyID)

target = self.look_for_intersphinx(fullerID)
if not target:
# FIXME: https://github.com/twisted/pydoctor/issues/125
# expandName is unreliable so in the case fullerID fails, we
# try our luck with fullID.
target = self.look_for_intersphinx(fullID)
if target:
return '<a href="%s"><code>%s</code></a>'%(target, prettyID)

Expand Down
2 changes: 2 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,5 @@ commands =
twisted-apidoc: git clone --depth 1 --branch trunk https://github.com/twisted/twisted.git {toxworkdir}/twisted-trunk
twisted-apidoc: bash -c \'{toxworkdir}/twisted-trunk/bin/admin/build-apidocs {toxworkdir}/twisted-trunk {toxworkdir}/twisted-apidocs-build > {toxworkdir}/twisted-apidocs.log \'
twisted-apidoc: cat {toxworkdir}/twisted-apidocs.log
; Fail if the output of running pydoctor on Twisted is not emtpy.
twisted-apidoc: test ! -s {toxworkdir}/twisted-apidocs.log

0 comments on commit 6ed85ea

Please sign in to comment.