MCPcopy Index your code
hub / github.com/sphinx-doc/sphinx / parse_comments

Method parse_comments

sphinx/pycode/parser.py:612–621  ·  view source on GitHub ↗

Parse the code and pick up comments.

(self)

Source from the content-addressed store, hash-verified

610 self.parse_definition()
611
612 def parse_comments(self) -> None:
613 """Parse the code and pick up comments."""
614 tree = ast.parse(self.code, type_comments=True)
615 picker = VariableCommentPicker(self.code.splitlines(True), self.encoding)
616 picker.visit(tree)
617 self.annotations = picker.annotations
618 self.comments = picker.comments
619 self.deforders = picker.deforders
620 self.finals = picker.finals
621 self.overloads = picker.overloads
622
623 def parse_definition(self) -> None:
624 """Parse the location of definitions from the code."""

Callers 1

parseMethod · 0.95

Calls 3

visitMethod · 0.95
parseMethod · 0.45

Tested by

no test coverage detected