Add the event's source path to pending if it's a supported file.
(self, event)
| 57 | self._callback(paths) |
| 58 | |
| 59 | def _handle_event(self, event) -> None: |
| 60 | """Add the event's source path to pending if it's a supported file.""" |
| 61 | if event.is_directory: |
| 62 | return |
| 63 | path = Path(event.src_path) |
| 64 | # Ignore hidden/dotfiles |
| 65 | if path.name.startswith("."): |
| 66 | return |
| 67 | with self._lock: |
| 68 | self._pending.add(str(path)) |
| 69 | self._schedule_flush() |
| 70 | |
| 71 | def on_created(self, event) -> None: |
| 72 | """Handle file creation events.""" |
no test coverage detected