Skip to content

Commit 9e169dc

Browse files
authored
Fix return type for list_models() (#330)
1 parent 9b3023f commit 9e169dc

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

comfy_cli/command/models/models.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -394,6 +394,11 @@ def remove(
394394
typer.echo("Deletion canceled.")
395395

396396

397+
def list_models(path: pathlib.Path) -> list:
398+
"""List all models in the specified directory."""
399+
return [file for file in path.iterdir() if file.is_file()]
400+
401+
397402
@app.command()
398403
@tracking.track_command("model")
399404
def list(
@@ -416,8 +421,3 @@ def list(
416421
data = [(model.name, f"{model.stat().st_size // 1024} KB") for model in models]
417422
column_names = ["Model Name", "Size"]
418423
ui.display_table(data, column_names)
419-
420-
421-
def list_models(path: pathlib.Path) -> list:
422-
"""List all models in the specified directory."""
423-
return [file for file in path.iterdir() if file.is_file()]

0 commit comments

Comments
 (0)