MCPcopy Index your code
hub / github.com/FSoft-AI4Code/CodeText-parser / get_docstring

Method get_docstring

src/codetext/parser/java_parser.py:37–54  ·  view source on GitHub ↗

Get docstring description for node Args: node (tree_sitter.Node) blob (str): original source code which parse the `node` Returns: str: docstring

(node, blob=None)

Source from the content-addressed store, hash-verified

35
36 @staticmethod
37 def get_docstring(node, blob=None):
38 """
39 Get docstring description for node
40
41 Args:
42 node (tree_sitter.Node)
43 blob (str): original source code which parse the `node`
44 Returns:
45 str: docstring
46 """
47 if blob:
48 logger.info('From version `0.0.6` this function will update argument in the API')
49 docstring_node = JavaParser.get_docstring_node(node)
50
51 docstring = ''
52 if docstring_node:
53 docstring = get_node_text(docstring_node[0])
54 return docstring
55
56 @staticmethod
57 def get_comment_node(function_node):

Callers

nothing calls this directly

Calls 2

get_node_textFunction · 0.85
get_docstring_nodeMethod · 0.45

Tested by

no test coverage detected