Skip to content

Commit 627f488

Browse files
committed
Fix import inconsistencies for all commands
The previous fix (PR #40) only addressed the 'up' command by changing from 'from .up import up' to 'from . import up'. However, all other commands (down, bootstrap, switch, doctor, init) had the same issue. In cli.py, all commands are used as modules with .run attribute: - down.run - bootstrap.run - switch.run - doctor.run - init.run But in commands/__init__.py, they were imported as functions instead of modules, causing AttributeError: 'function' object has no attribute 'run' This fix applies the same pattern to all commands consistently by importing them as modules rather than individual functions. Fixes the error: AttributeError: 'function' object has no attribute 'run' at devman/cli.py:25 for 'down' and similar errors for other commands.
1 parent ea68261 commit 627f488

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

src/devman/commands/__init__.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
"""Command handlers for devman operations."""
22

3-
from .bootstrap import bootstrap
4-
from .doctor import doctor
5-
from .down import down
3+
from . import bootstrap
4+
from . import doctor
5+
from . import down
66
from . import index
7-
from .init import init
8-
from .switch import switch
7+
from . import init
8+
from . import switch
99
from . import up
1010

1111
__all__ = [

0 commit comments

Comments
 (0)