Result of a fuzzy match search.
| 50 | |
| 51 | |
| 52 | class MatchResult: |
| 53 | """Result of a fuzzy match search.""" |
| 54 | |
| 55 | def __init__( |
| 56 | self, |
| 57 | found: bool = False, |
| 58 | score: float = 0.0, |
| 59 | start_line: int = -1, |
| 60 | end_line: int = -1, |
| 61 | ): |
| 62 | self.found = found |
| 63 | self.score = score |
| 64 | self.start_line = start_line |
| 65 | self.end_line = end_line |
| 66 | |
| 67 | def __repr__(self): |
| 68 | return f"MatchResult(found={self.found}, score={self.score:.2f}, lines={self.start_line}-{self.end_line})" |
| 69 | |
| 70 | |
| 71 | # --- Patch Parsing --- |