diff --git a/auto_editor/__main__.py b/auto_editor/__main__.py index 5276647f9..8f6b27256 100755 --- a/auto_editor/__main__.py +++ b/auto_editor/__main__.py @@ -286,21 +286,10 @@ def get_domain(url: str) -> str: def main() -> None: - subcommands = ( - "test", - "info", - "levels", - "subdump", - "desc", - "repl", - "palet", - "cache", - ) - - if len(sys.argv) > 1 and sys.argv[1] in subcommands: - obj = __import__( - f"auto_editor.subcommands.{sys.argv[1]}", fromlist=["subcommands"] - ) + commands = ("test", "info", "levels", "subdump", "desc", "repl", "palet", "cache") + + if len(sys.argv) > 1 and sys.argv[1] in commands: + obj = __import__(f"auto_editor.cmds.{sys.argv[1]}", fromlist=["cmds"]) obj.main(sys.argv[2:]) return diff --git a/auto_editor/subcommands/__init__.py b/auto_editor/cmds/__init__.py similarity index 100% rename from auto_editor/subcommands/__init__.py rename to auto_editor/cmds/__init__.py diff --git a/auto_editor/subcommands/cache.py b/auto_editor/cmds/cache.py similarity index 100% rename from auto_editor/subcommands/cache.py rename to auto_editor/cmds/cache.py diff --git a/auto_editor/subcommands/desc.py b/auto_editor/cmds/desc.py similarity index 100% rename from auto_editor/subcommands/desc.py rename to auto_editor/cmds/desc.py diff --git a/auto_editor/subcommands/info.py b/auto_editor/cmds/info.py similarity index 100% rename from auto_editor/subcommands/info.py rename to auto_editor/cmds/info.py diff --git a/auto_editor/subcommands/levels.py b/auto_editor/cmds/levels.py similarity index 100% rename from auto_editor/subcommands/levels.py rename to auto_editor/cmds/levels.py diff --git a/auto_editor/subcommands/palet.py b/auto_editor/cmds/palet.py similarity index 100% rename from auto_editor/subcommands/palet.py rename to auto_editor/cmds/palet.py diff --git a/auto_editor/subcommands/repl.py b/auto_editor/cmds/repl.py similarity index 100% rename from auto_editor/subcommands/repl.py rename to auto_editor/cmds/repl.py diff --git a/auto_editor/subcommands/subdump.py b/auto_editor/cmds/subdump.py similarity index 100% rename from auto_editor/subcommands/subdump.py rename to auto_editor/cmds/subdump.py diff --git a/auto_editor/subcommands/test.py b/auto_editor/cmds/test.py similarity index 100% rename from auto_editor/subcommands/test.py rename to auto_editor/cmds/test.py diff --git a/pyproject.toml b/pyproject.toml index 3bd487829..ccbc2d16b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -32,10 +32,10 @@ homepage = "https://auto-editor.com" [project.scripts] "auto-editor" = "auto_editor.__main__:main" -aedesc = "auto_editor.subcommands.desc:main" -aeinfo = "auto_editor.subcommands.info:main" -aesubdump = "auto_editor.subcommands.subdump:main" -aelevels = "auto_editor.subcommands.levels:main" +aedesc = "auto_editor.cmds.desc:main" +aeinfo = "auto_editor.cmds.info:main" +aesubdump = "auto_editor.cmds.subdump:main" +aelevels = "auto_editor.cmds.levels:main" [tool.mypy] warn_unused_ignores = true