Exemple #1
0
    def extras(self) -> List["Flattenable"]:
        r = super().extras()

        sourceHref = util.srclink(self.ob)
        source: "Flattenable"
        if sourceHref:
            source = (" ",
                      tags.a("(source)", href=sourceHref, class_="sourceLink"))
        else:
            source = tags.transparent
        r.append(
            tags.p(
                tags.code(tags.span("class", class_='py-keyword'), " ",
                          tags.span(self.ob.name, class_='py-defname'),
                          self.classSignature(), ":", source)))

        scs = sorted(self.ob.subclasses, key=objects_order)
        if not scs:
            return r
        p = assembleList(self.ob.system, "Known subclasses: ",
                         [o.fullName() for o in scs], "moreSubclasses",
                         self.page_url)
        if p is not None:
            r.append(tags.p(p))
        return r
Exemple #2
0
    def extras(self):
        r = super().extras()

        sourceHref = util.srclink(self.ob)
        if sourceHref:
            r.append(tags.a("(source)", href=sourceHref, class_="sourceLink"))

        return r
Exemple #3
0
    def extras(self):
        r = super().extras()

        sourceHref = util.srclink(self.ob)
        if sourceHref:
            source = (" ", tags.a("(source)", href=sourceHref))
        else:
            source = tags.transparent
        r.append(tags.p(tags.code(
            tags.span("class", class_='py-keyword'), " ",
            self.mediumName(self.ob), ":", source
            )))

        scs = sorted(self.ob.subclasses, key=lambda o:o.fullName().lower())
        if not scs:
            return r
        p = assembleList(self.ob.system, "Known subclasses: ",
                         [o.fullName() for o in scs], "moreSubclasses")
        if p is not None:
            r.append(tags.p(p))
        return r
Exemple #4
0
 def source(self, request, tag):
     sourceHref = util.srclink(self.ob)
     if not sourceHref:
         return ()
     return tag(href=sourceHref)
Exemple #5
0
 def source(self, request, tag):
     sourceHref = srclink(self.ob)
     if not sourceHref:
         return ()
     return tag(href=sourceHref)
Exemple #6
0
 def source(self, request: object, tag: Tag) -> "Flattenable":
     sourceHref = util.srclink(self.ob)
     if not sourceHref:
         return ()
     return tag(href=sourceHref)