def assert_result(self, items, name, **kw): global directive from schedula.ext.dispatcher.documenter import DispatcherDocumenter inst = DispatcherDocumenter(directive, name) inst.generate(**kw) assert len(_warnings) == 0, _warnings assert_equal_items(self, items)
def genarate_docstring(name, **kw): global directive from schedula.ext.dispatcher.documenter import DispatcherDocumenter inst = DispatcherDocumenter(directive, name) inst.generate(**kw) results = list(directive.result) del directive.result[:] return results
def getdocl(obj, name, encoding=None): global directive from schedula.ext.dispatcher.documenter import DispatcherDocumenter inst = DispatcherDocumenter(directive, name) inst.objpath = [name] inst.object = obj ds = inst.get_doc(encoding) # for testing, concat them and strip the empty line at the end. res = sum(ds, [])[:-1] return res
def formatsig(name, obj, args, retann): global directive from schedula.ext.dispatcher.documenter import DispatcherDocumenter inst = DispatcherDocumenter(directive, name) inst.fullname = name inst.doc_as_attr = False # for class objtype inst.object = obj inst.objpath = [name] inst.args = args inst.retann = retann res = inst.format_signature() return res