Skip to content

Commit

Permalink
Fixed dummy model.
Browse files Browse the repository at this point in the history
Signed-off-by: Pavel Kirilin <[email protected]>
  • Loading branch information
s3rius committed Jul 8, 2023
1 parent d27b91d commit b267ad0
Showing 1 changed file with 9 additions and 13 deletions.
22 changes: 9 additions & 13 deletions fastapi_template/cli.py
Original file line number Diff line number Diff line change
@@ -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):
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit b267ad0

Please sign in to comment.