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

Method visit_file

Tools/i18n/pygettext.py:463–472  ·  view source on GitHub ↗
(self, source, filename)

Source from the content-addressed store, hash-verified

461 self.comments = {}
462
463 def visit_file(self, source, filename):
464 try:
465 module_tree = ast.parse(source)
466 except SyntaxError:
467 return
468
469 self.filename = filename
470 if self.options.comment_tags:
471 self.comments = get_source_comments(source)
472 self.visit(module_tree)
473
474 def visit_Module(self, node):
475 self._extract_docstring(node)

Callers 1

mainFunction · 0.95

Calls 3

get_source_commentsFunction · 0.85
parseMethod · 0.45
visitMethod · 0.45

Tested by

no test coverage detected