44import subprocess
55import sys
66import uuid
7- from typing import Optional
7+ from typing import Annotated , Optional
88
99import typer
1010from rich import print
1111from rich .console import Console
12- from typing_extensions import Annotated , List
1312
1413from comfy_cli import logging , tracking , ui , utils
1514from comfy_cli .command .custom_nodes .bisect_custom_nodes import bisect_app
@@ -151,7 +150,7 @@ def execute_install_script(repo_path):
151150 # import pdb
152151 # pdb.set_trace()
153152 print ("Install: pip packages" )
154- with open (requirements_path , "r" , encoding = "utf-8" ) as requirements_file :
153+ with open (requirements_path , encoding = "utf-8" ) as requirements_file :
155154 for line in requirements_file :
156155 # From Yoland: disable pip override
157156 # package_name = remap_pip_package(line.strip())
@@ -269,7 +268,7 @@ def node_completer(incomplete: str) -> list[str]:
269268 config_manager = ConfigManager ()
270269 tmp_path = os .path .join (config_manager .get_config_path (), "tmp" , "node-cache.list" )
271270
272- with open (tmp_path , "r" , encoding = "UTF-8" , errors = "ignore" ) as cache_file :
271+ with open (tmp_path , encoding = "UTF-8" , errors = "ignore" ) as cache_file :
273272 return [node_id for node_id in cache_file .readlines () if node_id .startswith (incomplete )]
274273
275274 except Exception :
@@ -285,7 +284,7 @@ def node_or_all_completer(incomplete: str) -> list[str]:
285284 if "all" .startswith (incomplete ):
286285 all_opt = ["all" ]
287286
288- with open (tmp_path , "r" , encoding = "UTF-8" , errors = "ignore" ) as cache_file :
287+ with open (tmp_path , encoding = "UTF-8" , errors = "ignore" ) as cache_file :
289288 return [node_id for node_id in cache_file .readlines () if node_id .startswith (incomplete )] + all_opt
290289
291290 except Exception :
@@ -384,7 +383,7 @@ def simple_show(
384383@app .command (help = "Install custom nodes" )
385384@tracking .track_command ("node" )
386385def install (
387- nodes : List [str ] = typer .Argument (..., help = "List of custom nodes to install" , autocompletion = node_completer ),
386+ nodes : list [str ] = typer .Argument (..., help = "List of custom nodes to install" , autocompletion = node_completer ),
388387 channel : Annotated [
389388 Optional [str ],
390389 typer .Option (
@@ -431,7 +430,7 @@ def install(
431430@app .command (help = "Reinstall custom nodes" )
432431@tracking .track_command ("node" )
433432def reinstall (
434- nodes : List [str ] = typer .Argument (..., help = "List of custom nodes to reinstall" , autocompletion = node_completer ),
433+ nodes : list [str ] = typer .Argument (..., help = "List of custom nodes to reinstall" , autocompletion = node_completer ),
435434 channel : Annotated [
436435 Optional [str ],
437436 typer .Option (
@@ -466,7 +465,7 @@ def reinstall(
466465@app .command (help = "Uninstall custom nodes" )
467466@tracking .track_command ("node" )
468467def uninstall (
469- nodes : List [str ] = typer .Argument (..., help = "List of custom nodes to uninstall" , autocompletion = node_completer ),
468+ nodes : list [str ] = typer .Argument (..., help = "List of custom nodes to uninstall" , autocompletion = node_completer ),
470469 channel : Annotated [
471470 Optional [str ],
472471 typer .Option (
@@ -512,7 +511,7 @@ def update_node_id_cache():
512511@app .command (help = "Update custom nodes or ComfyUI" )
513512@tracking .track_command ("node" )
514513def update (
515- nodes : List [str ] = typer .Argument (
514+ nodes : list [str ] = typer .Argument (
516515 ...,
517516 help = "[all|List of custom nodes to update]" ,
518517 autocompletion = node_or_all_completer ,
@@ -541,7 +540,7 @@ def update(
541540@app .command (help = "Disable custom nodes" )
542541@tracking .track_command ("node" )
543542def disable (
544- nodes : List [str ] = typer .Argument (
543+ nodes : list [str ] = typer .Argument (
545544 ...,
546545 help = "[all|List of custom nodes to disable]" ,
547546 autocompletion = node_or_all_completer ,
@@ -568,7 +567,7 @@ def disable(
568567@app .command (help = "Enable custom nodes" )
569568@tracking .track_command ("node" )
570569def enable (
571- nodes : List [str ] = typer .Argument (
570+ nodes : list [str ] = typer .Argument (
572571 ...,
573572 help = "[all|List of custom nodes to enable]" ,
574573 autocompletion = node_or_all_completer ,
@@ -595,7 +594,7 @@ def enable(
595594@app .command (help = "Fix dependencies of custom nodes" )
596595@tracking .track_command ("node" )
597596def fix (
598- nodes : List [str ] = typer .Argument (
597+ nodes : list [str ] = typer .Argument (
599598 ...,
600599 help = "[all|List of custom nodes to fix]" ,
601600 autocompletion = node_or_all_completer ,
0 commit comments