Skip to content

Commit 4071924

Browse files
phlogistonjohnmergify[bot]
authored andcommitted
sambacc/commands: clean up imports used only for commands
Use the new include method(s) and avoid top-level imports that just exist to pull in decorated command functions. Signed-off-by: John Mulligan <[email protected]>
1 parent abca125 commit 4071924

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

sambacc/commands/main.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,8 @@
1919
import typing
2020

2121

22-
from . import check # noqa: F401
2322
from . import config as config_cmds
24-
from . import ctdb # noqa: F401
25-
from . import dns # noqa: F401
26-
from . import initialize # noqa: F401
27-
from . import join # noqa: F401
28-
from . import run # noqa: F401
2923
from . import skips
30-
from . import users # noqa: F401
3124
from .cli import commands, Fail
3225
from .common import (
3326
CommandContext,
@@ -41,6 +34,10 @@
4134

4235

4336
def main(args: typing.Optional[typing.Sequence[str]] = None) -> None:
37+
commands.include_multiple(
38+
[".check", ".ctdb", ".dns", ".initialize", ".join", ".run", ".users"]
39+
)
40+
4441
cli = commands.assemble(arg_func=global_args).parse_args(args)
4542
env_to_cli(cli)
4643
enable_logging(cli)

0 commit comments

Comments
 (0)