Skip to content

Commit 5e25222

Browse files
committed
chore: ruff fixes
1 parent 39bff24 commit 5e25222

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/watchdog/observers/winapi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ class WinAPINativeEvent:
353353

354354
@property
355355
def is_added(self) -> bool:
356-
return self.action == FILE_ACTION_CREATED
356+
return self.action == FILE_ACTION_ADDED
357357

358358
@property
359359
def is_removed(self) -> bool:

tests/test_inotify_buffer.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
import random
1212
import time
1313

14-
from watchdog.observers.inotify_c import InotifyConstants
1514
from watchdog.observers.inotify_buffer import InotifyBuffer, InotifyEvent
15+
from watchdog.observers.inotify_c import InotifyConstants
1616

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

@@ -129,7 +129,8 @@ def test_delete_watched_directory_symlink_followed(p):
129129
# Wait for the event to be picked up
130130
event = inotify.read_event()
131131
while not isinstance(event, InotifyEvent) or (
132-
event.mask != (InotifyConstants.IN_DELETE | InotifyConstants.IN_ISDIR)):
132+
event.mask != (InotifyConstants.IN_DELETE | InotifyConstants.IN_ISDIR)
133+
):
133134
event = inotify.read_event()
134135

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

154156
# Ensure InotifyBuffer shuts down cleanly without raising an exception

0 commit comments

Comments
 (0)