Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed: Correctly add optional type annotations #107

Merged
merged 4 commits into from
Jul 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/run-on-gpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ jobs:
run: |
pip install -e .
- name: Check disk space
run: |
df -h
- name: Run Core Functionality
run: |
comfy --skip-prompt --no-enable-telemetry env
Expand Down
14 changes: 7 additions & 7 deletions comfy_cli/cmdline.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ def install(
bool, typer.Option(show_default=False, help="Skip installing requirements.txt")
] = False,
nvidia: Annotated[
bool,
Optional[bool],
typer.Option(
show_default=False,
help="Install for Nvidia gpu",
Expand All @@ -183,23 +183,23 @@ def install(
CUDAVersion, typer.Option(show_default=True)
] = CUDAVersion.v12_1,
amd: Annotated[
bool,
Optional[bool],
typer.Option(
show_default=False,
help="Install for AMD gpu",
callback=gpu_exclusivity_callback,
),
] = None,
m_series: Annotated[
bool,
Optional[bool],
typer.Option(
show_default=False,
help="Install for Mac M-Series gpu",
callback=gpu_exclusivity_callback,
),
] = None,
intel_arc: Annotated[
bool,
Optional[bool],
typer.Option(
hidden=True,
show_default=False,
Expand All @@ -208,7 +208,7 @@ def install(
),
] = None,
cpu: Annotated[
bool,
Optional[bool],
typer.Option(
show_default=False,
help="Install for CPU",
Expand Down Expand Up @@ -366,11 +366,11 @@ def update(
def run(
workflow: Annotated[str, typer.Option(help="Path to the workflow API json file.")],
wait: Annotated[
Optional[bool],
bool,
typer.Option(help="If the command should wait until execution completes."),
] = True,
verbose: Annotated[
Optional[bool],
bool,
typer.Option(help="Enables verbose output of the execution process."),
] = False,
host: Annotated[
Expand Down
30 changes: 16 additions & 14 deletions comfy_cli/command/custom_nodes/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ def execute_install_script(repo_path):
@tracking.track_command("node")
def save_snapshot(
output: Annotated[
str,
Optional[str],
typer.Option(
show_default=False, help="Specify the output file path. (.json/.yaml)"
),
Expand Down Expand Up @@ -383,7 +383,7 @@ def show(
autocompletion=show_completer,
),
channel: Annotated[
str,
Optional[str],
typer.Option(
show_default=False,
help="Specify the operation mode",
Expand Down Expand Up @@ -422,7 +422,7 @@ def simple_show(
autocompletion=show_completer,
),
channel: Annotated[
str,
Optional[str],
typer.Option(
show_default=False,
help="Specify the operation mode",
Expand Down Expand Up @@ -461,7 +461,7 @@ def install(
..., help="List of custom nodes to install", autocompletion=node_completer
),
channel: Annotated[
str,
Optional[str],
typer.Option(
show_default=False,
help="Specify the operation mode",
Expand Down Expand Up @@ -490,7 +490,7 @@ def reinstall(
..., help="List of custom nodes to reinstall", autocompletion=node_completer
),
channel: Annotated[
str,
Optional[str],
typer.Option(
show_default=False,
help="Specify the operation mode",
Expand Down Expand Up @@ -519,7 +519,7 @@ def uninstall(
..., help="List of custom nodes to uninstall", autocompletion=node_completer
),
channel: Annotated[
str,
Optional[str],
typer.Option(
show_default=False,
help="Specify the operation mode",
Expand Down Expand Up @@ -577,7 +577,7 @@ def update(
autocompletion=node_or_all_completer,
),
channel: Annotated[
str,
Optional[str],
typer.Option(
show_default=False,
help="Specify the operation mode",
Expand Down Expand Up @@ -606,7 +606,7 @@ def disable(
autocompletion=node_or_all_completer,
),
channel: Annotated[
str,
Optional[str],
typer.Option(
show_default=False,
help="Specify the operation mode",
Expand All @@ -633,7 +633,7 @@ def enable(
autocompletion=node_or_all_completer,
),
channel: Annotated[
str,
Optional[str],
typer.Option(
show_default=False,
help="Specify the operation mode",
Expand All @@ -660,7 +660,7 @@ def fix(
autocompletion=node_or_all_completer,
),
channel: Annotated[
str,
Optional[str],
typer.Option(
show_default=False,
help="Specify the operation mode",
Expand All @@ -685,13 +685,15 @@ def fix(
@tracking.track_command("node")
def install_deps(
deps: Annotated[
str, typer.Option(show_default=False, help="Dependency spec file (.json)")
Optional[str],
typer.Option(show_default=False, help="Dependency spec file (.json)"),
] = None,
workflow: Annotated[
str, typer.Option(show_default=False, help="Workflow file (.json/.png)")
Optional[str],
typer.Option(show_default=False, help="Workflow file (.json/.png)"),
] = None,
channel: Annotated[
str,
Optional[str],
typer.Option(
show_default=False,
help="Specify the operation mode",
Expand Down Expand Up @@ -749,7 +751,7 @@ def deps_in_workflow(
str, typer.Option(show_default=False, help="Output file (.json)")
],
channel: Annotated[
str,
Optional[str],
typer.Option(
show_default=False,
help="Specify the operation mode",
Expand Down
Loading