MCPcopy Index your code
hub / github.com/python/cpython / _extract_docstring

Method _extract_docstring

Tools/i18n/pygettext.py:484–492  ·  view source on GitHub ↗
(self, node)

Source from the content-addressed store, hash-verified

482 self.generic_visit(node)
483
484 def _extract_docstring(self, node):
485 if (not self.options.docstrings or
486 self.options.nodocstrings.get(self.filename)):
487 return
488
489 docstring = ast.get_docstring(node)
490 if docstring is not None:
491 lineno = node.body[0].lineno # The first statement is the docstring
492 self._add_message(lineno, docstring, is_docstring=True)
493
494 def _extract_message(self, node):
495 func_name = self._get_func_name(node)

Callers 1

visit_ModuleMethod · 0.95

Calls 2

_add_messageMethod · 0.95
getMethod · 0.45

Tested by

no test coverage detected