Parse the code and pick up comments.
(self)
| 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.""" |
no test coverage detected