Improved cli workspace handling

This commit is contained in:
2021-04-11 13:00:26 +02:00
parent 036b9dcc2d
commit 1c353bbcdf
3 changed files with 44 additions and 27 deletions

View File

@@ -5,11 +5,12 @@ from cpl_cli.command_abc import CommandABC
class CommandModel:
def __init__(self, name: str, aliases: list[str], command: Callable[CommandABC], is_project_needed: bool,
change_cwd: bool):
def __init__(self, name: str, aliases: list[str], command: Callable[CommandABC], is_workspace_needed: bool,
is_project_needed: bool, change_cwd: bool):
self._name = name
self._aliases = aliases
self._command = command
self._is_workspace_needed = is_workspace_needed
self._is_project_needed = is_project_needed
self._change_cwd = change_cwd
@@ -24,6 +25,10 @@ class CommandModel:
@property
def command(self) -> Callable[CommandABC]:
return self._command
@property
def is_workspace_needed(self) -> bool:
return self._is_workspace_needed
@property
def is_project_needed(self) -> bool: