Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix inotify full emitter to accept event_filter #1032

Merged
merged 1 commit into from Feb 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 7 additions & 2 deletions src/watchdog/observers/inotify.py
Expand Up @@ -254,10 +254,15 @@ class InotifyFullEmitter(InotifyEmitter):
Read events blocking timeout (in seconds).
:type timeout:
``float``
:param event_filter:
Collection of event types to emit, or None for no filtering (default).
:type event_filter:
Optional[Iterable[:class:`watchdog.events.FileSystemEvent`]]

"""

def __init__(self, event_queue, watch, timeout=DEFAULT_EMITTER_TIMEOUT):
super().__init__(event_queue, watch, timeout)
def __init__(self, event_queue, watch, timeout=DEFAULT_EMITTER_TIMEOUT, event_filter=None):
super().__init__(event_queue, watch, timeout, event_filter)

def queue_events(self, timeout, events=True):
InotifyEmitter.queue_events(self, timeout, full_events=events)
Expand Down