Extract a dependency key from the message after 'Update ' and before ' to', '(' or end. This is used for de-duplication and sorting. Case-insensitive.
(self)
| 47 | self.author = author |
| 48 | |
| 49 | def dep_key(self) -> str: |
| 50 | """ |
| 51 | Extract a dependency key from the message after 'Update ' and before ' to', '(' or end. |
| 52 | This is used for de-duplication and sorting. Case-insensitive. |
| 53 | """ |
| 54 | m = re.search(r"(?i)update\s+(.+?)(?:\s+to\b|\s*\(|$)", self.message) |
| 55 | if m: |
| 56 | return m.group(1).strip() |
| 57 | return self.message.strip() |
| 58 | |
| 59 | def __str__(self) -> str: |
| 60 | # Keep trailing newline to preserve existing blank-line formatting by update_changes |
no test coverage detected