|
7 | 7 | from pathlib import Path |
8 | 8 | from urllib.parse import urlparse |
9 | 9 |
|
10 | | -import click |
11 | | - |
12 | 10 | from reflex import constants |
13 | 11 | from reflex.config import get_config |
14 | 12 | from reflex.utils import console, net, path_ops, redir |
@@ -51,7 +49,7 @@ def initialize_app_directory( |
51 | 49 | template_dir: The directory of the template source files. |
52 | 50 |
|
53 | 51 | Raises: |
54 | | - Exit: If template_name, template_code_dir_name, template_dir combination is not supported. |
| 52 | + SystemExit: If template_name, template_code_dir_name, template_dir combination is not supported. |
55 | 53 | """ |
56 | 54 | console.log("Initializing the app directory.") |
57 | 55 |
|
@@ -117,7 +115,7 @@ def create_config_init_app_from_remote_template(app_name: str, template_url: str |
117 | 115 | template_url: The path to the template source code as a zip file. |
118 | 116 |
|
119 | 117 | Raises: |
120 | | - Exit: If any download, file operations fail or unexpected zip file format. |
| 118 | + SystemExit: If any download, file operations fail or unexpected zip file format. |
121 | 119 |
|
122 | 120 | """ |
123 | 121 | import httpx |
@@ -204,7 +202,7 @@ def validate_and_create_app_using_remote_template( |
204 | 202 | templates: The available templates. |
205 | 203 |
|
206 | 204 | Raises: |
207 | | - Exit: If the template is not found. |
| 205 | + SystemExit: If the template is not found. |
208 | 206 | """ |
209 | 207 | # If user selects a template, it needs to exist. |
210 | 208 | if template in templates: |
@@ -327,7 +325,7 @@ def prompt_for_template_options(templates: list[Template]) -> str: |
327 | 325 | The template name the user selects. |
328 | 326 |
|
329 | 327 | Raises: |
330 | | - Exit: If the user does not select a template. |
| 328 | + SystemExit: If the user does not select a template. |
331 | 329 | """ |
332 | 330 | # Show the user the URLs of each template to preview. |
333 | 331 | console.print("\nGet started with a template:") |
@@ -372,7 +370,7 @@ def initialize_app(app_name: str, template: str | None = None) -> str | None: |
372 | 370 | The name of the template. |
373 | 371 |
|
374 | 372 | Raises: |
375 | | - Exit: If the template is not valid or unspecified. |
| 373 | + SystemExit: If the template is not valid or unspecified. |
376 | 374 | """ |
377 | 375 | # Local imports to avoid circular imports. |
378 | 376 | from reflex.utils import telemetry |
|
0 commit comments