mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-06-02 08:31:16 +03:00
Merge pull request #2213 from HullSeals/fix/2166/update-watchdog-typehints
[2166] Update Watchdog Type Hints
This commit is contained in:
commit
b8e8972d14
@ -38,7 +38,7 @@ if sys.platform == 'win32':
|
|||||||
import ctypes
|
import ctypes
|
||||||
from ctypes.wintypes import BOOL, HWND, LPARAM, LPWSTR
|
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 import Observer
|
||||||
from watchdog.observers.api import BaseObserver
|
from watchdog.observers.api import BaseObserver
|
||||||
|
|
||||||
@ -60,7 +60,7 @@ else:
|
|||||||
FileSystemEventHandler = object # dummy
|
FileSystemEventHandler = object # dummy
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
# this isn't ever used, but this will make type checking happy
|
# 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 import Observer
|
||||||
from watchdog.observers.api import BaseObserver
|
from watchdog.observers.api import BaseObserver
|
||||||
|
|
||||||
@ -346,7 +346,7 @@ class EDLogs(FileSystemEventHandler):
|
|||||||
"""
|
"""
|
||||||
return bool(self.thread and self.thread.is_alive())
|
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."""
|
"""Watchdog callback when, e.g. client (re)started."""
|
||||||
if not event.is_directory and self._RE_LOGFILE.search(basename(event.src_path)):
|
if not event.is_directory and self._RE_LOGFILE.search(basename(event.src_path)):
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
requests==2.31.0
|
requests==2.31.0
|
||||||
pillow==10.3.0
|
pillow==10.3.0
|
||||||
watchdog==3.0.0
|
watchdog==4.0.0
|
||||||
infi.systray==0.1.12; sys_platform == 'win32'
|
infi.systray==0.1.12; sys_platform == 'win32'
|
||||||
semantic-version==2.10.0
|
semantic-version==2.10.0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user