MCPcopy Create free account
hub / github.com/OpenNMT/CTranslate2 / document_function

Function document_function

docs/generate.py:41–47  ·  view source on GitHub ↗
(output_dir, function_path)

Source from the content-addressed store, hash-verified

39
40
41def document_function(output_dir, function_path):
42 with open(os.path.join(output_dir, "%s.rst" % function_path), "w") as doc:
43 function_name = function_path.split(".")[-1]
44 doc.write("%s\n" % function_name)
45 doc.write("=" * len(function_name))
46 doc.write("\n\n")
47 doc.write(".. autofunction:: %s\n" % function_path)
48
49
50def module_is_public(module):

Callers 1

document_moduleFunction · 0.85

Calls 1

joinMethod · 0.80

Tested by

no test coverage detected