diff options
| author | AAGaming <aagaming@riseup.net> | 2023-09-25 13:06:46 -0400 |
|---|---|---|
| committer | marios8543 <marios8543@gmail.com> | 2023-10-31 23:12:43 +0200 |
| commit | 5582457c58c91d2e31e141bec1d2b139c9c2ff61 (patch) | |
| tree | 4cb4652519ef4b85b0fd81b5e8eef1422292eb36 | |
| parent | df755063c2cfd627f811b958c193c897dc0a4028 (diff) | |
| download | decky-loader-5582457c58c91d2e31e141bec1d2b139c9c2ff61.tar.gz decky-loader-5582457c58c91d2e31e141bec1d2b139c9c2ff61.zip | |
move to module imports
| -rw-r--r-- | backend/src/updater.py | 2 | ||||
| -rw-r--r-- | backend/src/utilities.py | 9 | ||||
| -rw-r--r-- | main.py | 4 |
3 files changed, 7 insertions, 8 deletions
diff --git a/backend/src/updater.py b/backend/src/updater.py index d28e67b0..b4f92adb 100644 --- a/backend/src/updater.py +++ b/backend/src/updater.py @@ -27,7 +27,7 @@ class RemoteVer(TypedDict): assets: List[RemoteVerAsset] class Updater: - def __init__(self, context: PluginManager) -> None: + def __init__(self, context: 'PluginManager') -> None: self.context = context self.settings = self.context.settings # Exposes updater methods to frontend diff --git a/backend/src/utilities.py b/backend/src/utilities.py index 31993aed..1e4110cf 100644 --- a/backend/src/utilities.py +++ b/backend/src/utilities.py @@ -18,7 +18,7 @@ if TYPE_CHECKING: from .main import PluginManager from .injector import inject_to_tab, get_gamepadui_tab, close_old_tabs, get_tab from .localplatform import ON_WINDOWS -from . import helpers +from .import helpers from .localplatform import service_stop, service_start, get_home_path, get_username class FilePickerObj(TypedDict): @@ -26,13 +26,8 @@ class FilePickerObj(TypedDict): filest: stat_result is_dir: bool -class FilePickerObj(TypedDict): - file: Path - filest: stat_result - is_dir: bool - class Utilities: - def __init__(self, context: PluginManager) -> None: + def __init__(self, context: 'PluginManager') -> None: self.context = context self.util_methods: Dict[str, Callable[..., Coroutine[Any, Any, Any]]] = { "ping": self.ping, diff --git a/main.py b/main.py new file mode 100644 index 00000000..c2b99089 --- /dev/null +++ b/main.py @@ -0,0 +1,4 @@ +# This file is needed to make the relative imports in backend/ work properly. +if __name__ == "__main__": + from backend.main import main + main() |
