mirror of
https://github.com/SteamDeckHomebrew/decky-loader.git
synced 2026-07-11 17:22:02 +00:00
Typing fix
linters are the light of my life
This commit is contained in:
committed by
PartyWumpus
parent
5053a52f32
commit
3a83fa81de
@@ -5,7 +5,7 @@ from logging import getLogger
|
|||||||
from os import listdir, path
|
from os import listdir, path
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from traceback import print_exc
|
from traceback import print_exc
|
||||||
from typing import Any, Tuple
|
from typing import Any, Tuple, cast
|
||||||
|
|
||||||
from aiohttp import web
|
from aiohttp import web
|
||||||
from os.path import exists
|
from os.path import exists
|
||||||
@@ -38,7 +38,7 @@ class FileChangeHandler(RegexMatchingEventHandler):
|
|||||||
self.queue.put_nowait((path.join(self.plugin_path, plugin_dir, "main.py"), plugin_dir, True))
|
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: DirCreatedEvent | FileCreatedEvent):
|
||||||
src_path = event.src_path
|
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:
|
if "__pycache__" in src_path:
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -52,7 +52,7 @@ class FileChangeHandler(RegexMatchingEventHandler):
|
|||||||
self.maybe_reload(src_path)
|
self.maybe_reload(src_path)
|
||||||
|
|
||||||
def on_modified(self, event: DirModifiedEvent | FileModifiedEvent):
|
def on_modified(self, event: DirModifiedEvent | FileModifiedEvent):
|
||||||
src_path = event.src_path
|
src_path = cast(str, event.src_path) # type: ignore
|
||||||
if "__pycache__" in src_path:
|
if "__pycache__" in src_path:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -25,7 +25,7 @@ from .browser import PluginBrowser
|
|||||||
from .helpers import (REMOTE_DEBUGGER_UNIT, csrf_middleware, get_csrf_token,
|
from .helpers import (REMOTE_DEBUGGER_UNIT, csrf_middleware, get_csrf_token,
|
||||||
mkdir_as_user, get_system_pythonpaths, get_effective_user_id)
|
mkdir_as_user, get_system_pythonpaths, get_effective_user_id)
|
||||||
|
|
||||||
from .injector import get_gamepadui_tab, Tab, close_old_tabs
|
from .injector import get_gamepadui_tab, Tab
|
||||||
from .loader import Loader
|
from .loader import Loader
|
||||||
from .settings import SettingsManager
|
from .settings import SettingsManager
|
||||||
from .updater import Updater
|
from .updater import Updater
|
||||||
|
|||||||
Reference in New Issue
Block a user