diff options
author | Dmitrii Agibov <dmitrii.agibov@arm.com> | 2023-02-02 09:07:02 +0000 |
---|---|---|
committer | Dmitrii Agibov <dmitrii.agibov@arm.com> | 2023-02-06 11:51:52 +0000 |
commit | c6cfc78d5245c550016b9709686d2b32ab3fcd5b (patch) | |
tree | 42786a3755370d0fefea659d7e532a5483955239 /src/mlia/cli/common.py | |
parent | f1eaff3c9790464bed3183ff76555cf815166f50 (diff) | |
download | mlia-c6cfc78d5245c550016b9709686d2b32ab3fcd5b.tar.gz |
MLIA-461 Add parameter for the output directory
- Add CLI parameter --output-dir
- Rename ExecutionContext property working_dir into output_dir
- Remove logic for default command as it is no longer needed
Change-Id: I6387f6b688520ba1fc69a80167587297353620f6
Diffstat (limited to 'src/mlia/cli/common.py')
-rw-r--r-- | src/mlia/cli/common.py | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/mlia/cli/common.py b/src/mlia/cli/common.py index 077f456..f45dc65 100644 --- a/src/mlia/cli/common.py +++ b/src/mlia/cli/common.py @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: Copyright 2022, Arm Limited and/or its affiliates. +# SPDX-FileCopyrightText: Copyright 2022-2023, Arm Limited and/or its affiliates. # SPDX-License-Identifier: Apache-2.0 """CLI common module.""" from __future__ import annotations @@ -15,7 +15,6 @@ class CommandInfo: func: Callable aliases: list[str] opt_groups: list[Callable[[argparse.ArgumentParser], None]] - is_default: bool = False name: str | None = None @property @@ -32,9 +31,4 @@ class CommandInfo: def command_help(self) -> str: """Return help message for the command.""" assert self.func.__doc__, "Command function does not have a docstring" - func_help = self.func.__doc__.splitlines()[0].rstrip(".") - - if self.is_default: - func_help = f"{func_help} [default]" - - return func_help + return self.func.__doc__.splitlines()[0].rstrip(".") |