Skip to content

Commit

Permalink
Merge pull request #2213 from HullSeals/fix/2166/update-watchdog-type…
Browse files Browse the repository at this point in the history
…hints

[2166] Update Watchdog Type Hints
  • Loading branch information
Rixxan authored May 13, 2024
2 parents 9b6570d + 99a23d4 commit b8e8972
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
import ctypes
from ctypes.wintypes import BOOL, HWND, LPARAM, LPWSTR

from watchdog.events import FileCreatedEvent, FileSystemEventHandler
from watchdog.events import FileSystemEventHandler, FileSystemEvent
from watchdog.observers import Observer
from watchdog.observers.api import BaseObserver

Expand All @@ -60,7 +60,7 @@
FileSystemEventHandler = object # dummy
if TYPE_CHECKING:
# this isn't ever used, but this will make type checking happy
from watchdog.events import FileCreatedEvent
from watchdog.events import FileSystemEvent
from watchdog.observers import Observer
from watchdog.observers.api import BaseObserver

Expand Down Expand Up @@ -346,7 +346,7 @@ def running(self) -> bool:
"""
return bool(self.thread and self.thread.is_alive())

def on_created(self, event: 'FileCreatedEvent') -> None:
def on_created(self, event: 'FileSystemEvent') -> None:
"""Watchdog callback when, e.g. client (re)started."""
if not event.is_directory and self._RE_LOGFILE.search(basename(event.src_path)):

Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
requests==2.31.0
pillow==10.3.0
watchdog==3.0.0
watchdog==4.0.0
infi.systray==0.1.12; sys_platform == 'win32'
semantic-version==2.10.0

0 comments on commit b8e8972

Please sign in to comment.