diff --git a/fastapi_template/cli.py b/fastapi_template/cli.py index 0a7e33b..7a638c3 100644 --- a/fastapi_template/cli.py +++ b/fastapi_template/cli.py @@ -1,24 +1,19 @@ +import re import shutil -from fastapi_template.input_model import ( - BuilderContext, - MenuEntry, - SingularMenuModel, - MultiselectMenuModel, - BaseMenuModel, - Database, - SKIP_ENTRY, -) from importlib.metadata import version -from typing import Callable, List, Optional -from click import Command, Option -import re +from typing import Any, Callable, List, Optional +from click import Command, Option from prompt_toolkit import prompt from prompt_toolkit.document import Document from prompt_toolkit.validation import ValidationError, Validator -from typing import Any from termcolor import colored +from fastapi_template.input_model import (SKIP_ENTRY, BaseMenuModel, + BuilderContext, Database, MenuEntry, + MultiselectMenuModel, + SingularMenuModel) + class SnakeCaseValidator(Validator): def validate(self, document: Document): @@ -382,6 +377,7 @@ def checker(ctx: BuilderContext) -> bool: code="add_dummy", cli_name="dummy", user_view="Add dummy model", + is_hidden=lambda ctx: ctx.orm == "none", description=( "This option creates {what} as an example of how to use chosen ORM.\n" "Also this option will generate you an example of {dao}.".format(