(self, event)
| 318 | return any(Path(path).match(p) for p in self.patterns) |
| 319 | |
| 320 | def _debounced_callback(self, event): |
| 321 | now = time.time() |
| 322 | if now - self._last_trigger < self._debounce: |
| 323 | return |
| 324 | self._last_trigger = now |
| 325 | try: |
| 326 | self.callback(event.event_type, event.src_path) |
| 327 | except Exception as e: |
| 328 | error(f"FileWatch: callback error: {e}") |
| 329 | |
| 330 | def on_modified(self, event): |
| 331 | if not event.is_directory and self._should_trigger(event.src_path): |
no test coverage detected