예제 #1
0
 def onlyIfOneRoot(self, request: object, tag: Tag) -> "Flattenable":
     if len(self.system.rootobjects) != 1:
         return []
     else:
         root, = self.system.rootobjects
         return tag.clear()(
             "Start at ", tags.code(epydoc2stan.taglink(root, self.filename)),
             ", the root ", epydoc2stan.format_kind(root.kind).lower(), ".")
예제 #2
0
 def kind(self, request: object, tag: Tag) -> Tag:
     child = self.child
     kind = child.kind
     assert kind is not None  # 'kind is None' makes the object invisible
     kind_name = epydoc2stan.format_kind(kind)
     if isinstance(child, Function) and child.is_async:
         # The official name is "coroutine function", but that is both
         # a bit long and not as widely recognized.
         kind_name = f'Async {kind_name}'
     return tag.clear()(kind_name)
예제 #3
0
 def stuff(self, request: object, tag: Tag) -> Tag:
     tag.clear()
     tag([moduleSummary(o, self.filename) for o in self.system.rootobjects])
     return tag
예제 #4
0
 def heading(self, request: object, tag: Tag) -> Tag:
     return tag.clear()("Summary of Undocumented Objects")
예제 #5
0
 def rootkind(self, request: object, tag: Tag) -> Tag:
     return tag.clear()('/'.join(sorted(
          epydoc2stan.format_kind(o.kind, plural=True).lower()
          for o in self.system.rootobjects
          )))
예제 #6
0
 def heading(self, request: object, tag: Tag) -> Tag:
     return tag.clear()("Index of Names")
예제 #7
0
 def heading(self, request: object, tag: Tag) -> Tag:
     tag.clear()
     tag("Class Hierarchy")
     return tag
예제 #8
0
 def summaryDoc(self, request: object, tag: Tag) -> Tag:
     return tag.clear()(self.docgetter.get(self.child, summary=True))
예제 #9
0
 def name(self, request: object, tag: Tag) -> Tag:
     return tag.clear()(tags.code(
         epydoc2stan.taglink(self.child, self.ob.url, self.child.name)))