Exemplo n.º 1
0
    def _uid_to_uri(self, uid):
        if uid.is_module() or uid.is_class():
            return uid.name() + ".html"

        parent = uid.parent()
        if parent is None:
            return uid.name() + ".html"

        return parent.name() + ".html#" + uid.shortname()
Exemplo n.º 2
0
 def _uid_to_filename(self, uid):
     # Enforce same restrictions as HTMLFormatter._uid_to_filename for sanity
     # checking
     assert uid.is_module() or uid.is_class(), "Bad UID type: %r" % (uid,)
     return uid.name() + ".html"