MCPcopy Create free account
hub / github.com/FSoft-AI4Code/CodeText-parser / get_docstring

Method get_docstring

src/codetext/parser/ruby_parser.py:65–79  ·  view source on GitHub ↗
(node, blob=None)

Source from the content-addressed store, hash-verified

63
64 @staticmethod
65 def get_docstring(node, blob=None):
66 if blob:
67 logger.info('From version `0.0.6` this function will update argument in the API')
68 docstring_node = RubyParser.get_docstring_node(node)
69 docstring = []
70 for item in docstring_node:
71 doc = get_node_text(item)
72 doc_lines = doc.split('\n')
73 for line in doc_lines:
74 if '=begin' in line or '=end' in line:
75 continue
76 docstring.append(line)
77
78 docstring = '\n'.join(docstring)
79 return docstring
80
81 @staticmethod
82 def get_function_metadata(function_node, blob=None) -> Dict[str, str]:

Callers

nothing calls this directly

Calls 2

get_node_textFunction · 0.85
get_docstring_nodeMethod · 0.45

Tested by

no test coverage detected