backend: update all dependencies to latest

This commit is contained in:
K900
2024-06-27 11:45:52 +03:00
committed by AAGaming
parent a3143c11a8
commit 6cd4fb5553
4 changed files with 93 additions and 92 deletions
+3 -3
View File
@@ -8,7 +8,7 @@ from typing import Any, Tuple, Dict, cast
from aiohttp import web
from os.path import exists
from watchdog.events import RegexMatchingEventHandler, DirCreatedEvent, DirModifiedEvent, FileCreatedEvent, FileModifiedEvent
from watchdog.events import RegexMatchingEventHandler, FileSystemEvent
from watchdog.observers import Observer
from typing import TYPE_CHECKING, List
@@ -37,7 +37,7 @@ class FileChangeHandler(RegexMatchingEventHandler):
if exists(path.join(self.plugin_path, plugin_dir, "plugin.json")):
self.queue.put_nowait((path.join(self.plugin_path, plugin_dir, "main.py"), plugin_dir, True))
def on_created(self, event: DirCreatedEvent | FileCreatedEvent):
def on_created(self, event: FileSystemEvent):
src_path = cast(str, event.src_path) #type: ignore # this is the correct type for this is in later versions of watchdog
if "__pycache__" in src_path:
return
@@ -51,7 +51,7 @@ class FileChangeHandler(RegexMatchingEventHandler):
self.logger.debug(f"file created: {src_path}")
self.maybe_reload(src_path)
def on_modified(self, event: DirModifiedEvent | FileModifiedEvent):
def on_modified(self, event: FileSystemEvent):
src_path = cast(str, event.src_path) # type: ignore
if "__pycache__" in src_path:
return