Allow template with unspecified demo_url (#4741)
This commit is contained in:
parent
44d6e1124c
commit
2ff840aba6
@ -64,7 +64,7 @@ class Template:
|
|||||||
name: str
|
name: str
|
||||||
description: str
|
description: str
|
||||||
code_url: str
|
code_url: str
|
||||||
demo_url: str
|
demo_url: str | None = None
|
||||||
|
|
||||||
|
|
||||||
@dataclasses.dataclass(frozen=True)
|
@dataclasses.dataclass(frozen=True)
|
||||||
@ -1461,7 +1461,7 @@ def prompt_for_template_options(templates: list[Template]) -> str:
|
|||||||
# Show the user the URLs of each template to preview.
|
# Show the user the URLs of each template to preview.
|
||||||
console.print("\nGet started with a template:")
|
console.print("\nGet started with a template:")
|
||||||
|
|
||||||
def format_demo_url_str(url: str) -> str:
|
def format_demo_url_str(url: str | None) -> str:
|
||||||
return f" ({url})" if url else ""
|
return f" ({url})" if url else ""
|
||||||
|
|
||||||
# Prompt the user to select a template.
|
# Prompt the user to select a template.
|
||||||
|
Loading…
Reference in New Issue
Block a user