Skip to content

Commit

Permalink
Fix watchdog 5.x compatibility (#35)
Browse files Browse the repository at this point in the history
* watchdog 5.x match_any_path kwargs

Watchdog 5 changed the util function to only accept a single args and two kwargs.

* Format with ruff

---------

Co-authored-by: olzhasar <[email protected]>
  • Loading branch information
jor-rit and olzhasar authored Aug 28, 2024
1 parent cdf117e commit 7918641
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pytest_watcher/event_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,11 @@ def _is_event_watched(self, event: events.FileSystemEvent) -> bool:
# For file moved type events we are also interested in the destination
paths.append(event.dest_path)

return match_any_paths(paths, self.patterns, self.ignore_patterns)
return match_any_paths(
paths,
included_patterns=self.patterns,
excluded_patterns=self.ignore_patterns,
)

def dispatch(self, event: events.FileSystemEvent) -> None:
if self._is_event_watched(event):
Expand Down

0 comments on commit 7918641

Please sign in to comment.