Explorar o código

Allow template with unspecified demo_url (#4741)

Masen Furer hai 3 meses
pai
achega
2ff840aba6
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      reflex/utils/prerequisites.py

+ 2 - 2
reflex/utils/prerequisites.py

@@ -64,7 +64,7 @@ class Template:
     name: str
     description: str
     code_url: str
-    demo_url: str
+    demo_url: str | None = None
 
 
 @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.
     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 ""
 
     # Prompt the user to select a template.