From 6a747ce0f786acda941d1b355cd7a60efb996302 Mon Sep 17 00:00:00 2001 From: loathingKernel <142770+loathingKernel@users.noreply.github.com> Date: Mon, 5 Feb 2024 21:27:50 +0200 Subject: [PATCH] Rare: Move sub-commands implementations in the `commands` subfolder Right now we have two commands, and with possible third one comming soon. --- rare/{ => commands}/launcher/__init__.py | 0 rare/{ => commands}/launcher/cloud_sync_dialog.py | 0 rare/{ => commands}/launcher/console_dialog.py | 0 rare/{ => commands}/launcher/lgd_helper.py | 0 rare/commands/reaper.py | 0 rare/{webview/__init__.py => commands/webview.py} | 0 rare/main.py | 8 ++++---- 7 files changed, 4 insertions(+), 4 deletions(-) rename rare/{ => commands}/launcher/__init__.py (100%) rename rare/{ => commands}/launcher/cloud_sync_dialog.py (100%) rename rare/{ => commands}/launcher/console_dialog.py (100%) rename rare/{ => commands}/launcher/lgd_helper.py (100%) create mode 100644 rare/commands/reaper.py rename rare/{webview/__init__.py => commands/webview.py} (100%) diff --git a/rare/launcher/__init__.py b/rare/commands/launcher/__init__.py similarity index 100% rename from rare/launcher/__init__.py rename to rare/commands/launcher/__init__.py diff --git a/rare/launcher/cloud_sync_dialog.py b/rare/commands/launcher/cloud_sync_dialog.py similarity index 100% rename from rare/launcher/cloud_sync_dialog.py rename to rare/commands/launcher/cloud_sync_dialog.py diff --git a/rare/launcher/console_dialog.py b/rare/commands/launcher/console_dialog.py similarity index 100% rename from rare/launcher/console_dialog.py rename to rare/commands/launcher/console_dialog.py diff --git a/rare/launcher/lgd_helper.py b/rare/commands/launcher/lgd_helper.py similarity index 100% rename from rare/launcher/lgd_helper.py rename to rare/commands/launcher/lgd_helper.py diff --git a/rare/commands/reaper.py b/rare/commands/reaper.py new file mode 100644 index 00000000..e69de29b diff --git a/rare/webview/__init__.py b/rare/commands/webview.py similarity index 100% rename from rare/webview/__init__.py rename to rare/commands/webview.py diff --git a/rare/main.py b/rare/main.py index 4d324d20..ab1c26ac 100755 --- a/rare/main.py +++ b/rare/main.py @@ -59,7 +59,7 @@ def main() -> int: ) subparsers = parser.add_subparsers(title="Commands", dest="subparser") - launch_parser = subparsers.add_parser("start", aliases=["launch"]) + launch_parser = subparsers.add_parser("launch", aliases=["start"]) launch_parser.add_argument("app_name", help="AppName of the game to launch", metavar="", action="store") launch_parser.add_argument("--dry-run", help="Print arguments and exit", action="store_true") @@ -100,11 +100,11 @@ def main() -> int: return 0 if args.subparser in {"login", "auth"}: - from rare.webview import launch + from rare.commands.webview import launch return launch(args) - if args.subparser in {"start", "launch"}: - from rare.launcher import launch + if args.subparser in {"launch", "start"}: + from rare.commands.launcher import launch return launch(args) from rare.utils import singleton