Add a location of definition.
(self, name: str, entry: tuple[str, int, int])
| 524 | self.definitions: dict[str, tuple[str, int, int]] = {} |
| 525 | |
| 526 | def add_definition(self, name: str, entry: tuple[str, int, int]) -> None: |
| 527 | """Add a location of definition.""" |
| 528 | if self.indents and self.indents[-1][0] == entry[0] == 'def': |
| 529 | # ignore definition of inner function |
| 530 | pass |
| 531 | else: |
| 532 | self.definitions[name] = entry |
| 533 | |
| 534 | def parse(self) -> None: |
| 535 | """Parse the code to obtain location of definitions.""" |
no outgoing calls
no test coverage detected