Skip to content

Commit

Permalink
chore: ruff fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
BoboTiG committed Nov 29, 2024
1 parent 39bff24 commit 5e25222
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/watchdog/observers/winapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ class WinAPINativeEvent:

@property
def is_added(self) -> bool:
return self.action == FILE_ACTION_CREATED
return self.action == FILE_ACTION_ADDED

@property
def is_removed(self) -> bool:
Expand Down
8 changes: 5 additions & 3 deletions tests/test_inotify_buffer.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
import random
import time

from watchdog.observers.inotify_c import InotifyConstants
from watchdog.observers.inotify_buffer import InotifyBuffer, InotifyEvent
from watchdog.observers.inotify_c import InotifyConstants

from .shell import mkdir, mount_tmpfs, mv, rm, symlink, touch, unmount

Expand Down Expand Up @@ -129,7 +129,8 @@ def test_delete_watched_directory_symlink_followed(p):
# Wait for the event to be picked up
event = inotify.read_event()
while not isinstance(event, InotifyEvent) or (
event.mask != (InotifyConstants.IN_DELETE | InotifyConstants.IN_ISDIR)):
event.mask != (InotifyConstants.IN_DELETE | InotifyConstants.IN_ISDIR)
):
event = inotify.read_event()

# Ensure InotifyBuffer shuts down cleanly without raising an exception
Expand All @@ -148,7 +149,8 @@ def test_delete_watched_directory_symlink_followed_recursive(p):
# Wait for the event to be picked up
event = inotify.read_event()
while not isinstance(event, InotifyEvent) or (
event.mask != (InotifyConstants.IN_DELETE | InotifyConstants.IN_ISDIR)):
event.mask != (InotifyConstants.IN_DELETE | InotifyConstants.IN_ISDIR)
):
event = inotify.read_event()

# Ensure InotifyBuffer shuts down cleanly without raising an exception
Expand Down

0 comments on commit 5e25222

Please sign in to comment.