MCPcopy Create free account
hub / github.com/bspaans/python-mingus / generate_callable_wikidocs

Method generate_callable_wikidocs

scripts/api_doc_generator.py:151–167  ·  view source on GitHub ↗
(self, module_string, element_string, evaled, is_class = False)

Source from the content-addressed store, hash-verified

149 self.classes.append(res)
150
151 def generate_callable_wikidocs(self, module_string, element_string, evaled, is_class = False):
152 if _is_method(evaled):
153 docs = self.generate_function_wikidocs(element_string, evaled, is_class)
154 if not is_class:
155 self.functions.append(docs)
156 else:
157 self.classes.append(docs)
158 elif _is_class(type(evaled)):
159 self.classes.append('\n.. class:: ' + element_string + '\n\n')
160 module_string = module_string + "." + element_string
161 self.process_element_recursively(module_string, evaled, True)
162 elif hasattr(evaled, '__module__') and evaled.__module__ is not None and evaled.__module__.startswith(module_string):
163 self.classes.append('\n.. class:: ' + element_string + '\n\n')
164 module_string = module_string + "." + element_string
165 self.process_element_recursively(module_string, evaled, True)
166 else:
167 pass
168
169 def generate_function_wikidocs(self, func_string, func, is_class = False):
170 directive = '----\n\n.. function' if not is_class else ' .. method'

Callers 1

Calls 4

_is_methodFunction · 0.85
_is_classFunction · 0.85

Tested by

no test coverage detected