(self, old_name, ignore_case=True)
| 59 | return None, None |
| 60 | |
| 61 | def replace(self, old_name, ignore_case=True): |
| 62 | manufacturer, match = self.find(old_name, ignore_case=ignore_case) |
| 63 | if match is None: |
| 64 | return old_name |
| 65 | # Replace manufacturer with the match |
| 66 | new_name = re.sub(f'^{re.escape(match)}', manufacturer, old_name, flags=re.IGNORECASE) |
| 67 | return new_name |
| 68 | |
| 69 | def model(self, name, ignore_case=True): |
| 70 | manufacturer, match = self.find(name, ignore_case=ignore_case) |
no test coverage detected