Skip to content

Commit

Permalink
Create _utils subfolder in CLI for CLI utils
Browse files Browse the repository at this point in the history
  • Loading branch information
CasperWA committed Apr 28, 2023
1 parent 332b69e commit b18b2e5
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
import typer
except ImportError as exc:
raise ImportError(
"Please install the DLite entities service utility CLI with "
f"'pip install {Path(__file__).resolve().parent.parent.parent.resolve()}[cli]'"
"Please install the DLite entities service utility CLI with 'pip install "
f"{Path(__file__).resolve().parent.parent.parent.parent.resolve()}[cli]'"
) from exc

from rich import print # pylint: disable=redefined-builtin
Expand All @@ -17,7 +17,7 @@
STATUS = {"use_service_dotenv": False}


def _print_version(value: bool) -> None:
def print_version(value: bool) -> None:
"""Print version and exit."""
if value:
print(f"dlite-entities-service version: {__version__}")
Expand All @@ -30,7 +30,7 @@ def global_options(
"--version",
help="Show version and exit",
is_eager=True,
callback=_print_version,
callback=print_version,
),
use_service_dotenv: bool = typer.Option(
False,
Expand Down
2 changes: 1 addition & 1 deletion dlite_entities_service/utils_cli/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from rich.console import Console

from dlite_entities_service.service.config import CONFIG
from dlite_entities_service.utils_cli.global_settings import STATUS
from dlite_entities_service.utils_cli._utils.global_settings import STATUS

ERROR_CONSOLE = Console(stderr=True)
CLI_DOTENV_FILE = Path(__file__).resolve().parent / ".env"
Expand Down
2 changes: 1 addition & 1 deletion dlite_entities_service/utils_cli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
AnyWriteError,
get_collection,
)
from dlite_entities_service.utils_cli._utils.global_settings import global_options
from dlite_entities_service.utils_cli.config import APP as config_APP
from dlite_entities_service.utils_cli.global_settings import global_options

if TYPE_CHECKING: # pragma: no cover
from typing import Any
Expand Down

0 comments on commit b18b2e5

Please sign in to comment.