@@ -93,43 +93,43 @@ def validate_and_extract_os_classifiers(classifiers: list) -> list:
9393 if not os_classifiers :
9494 return []
9595
96- os_values = [c [len ("Operating System :: " ):] for c in os_classifiers ]
96+ os_values = [c [len ("Operating System :: " ) :] for c in os_classifiers ]
9797 valid_os_prefixes = {"Microsoft" , "POSIX" , "MacOS" , "OS Independent" }
98-
98+
9999 for os_value in os_values :
100100 if not any (os_value .startswith (prefix ) for prefix in valid_os_prefixes ):
101101 typer .echo (
102102 'Warning: Invalid Operating System classifier found. Operating System classifiers must start with one of: "Microsoft", "POSIX", "MacOS", "OS Independent". '
103103 'Examples: "Operating System :: Microsoft :: Windows", "Operating System :: POSIX :: Linux", "Operating System :: MacOS", "Operating System :: OS Independent". '
104- ' No OS information will be populated.'
104+ " No OS information will be populated."
105105 )
106106 return []
107107
108108 return os_values
109109
110110
111- def validate_and_extract_accelerator_classifiers (classifiers : list ) -> list :
111+ def validate_and_extract_accelerator_classifiers (classifiers : list ) -> list :
112112 accelerator_classifiers = [c for c in classifiers if c .startswith ("Environment ::" )]
113113 if not accelerator_classifiers :
114114 return []
115-
116- accelerator_values = [c [len ("Environment :: " ):] for c in accelerator_classifiers ]
117-
115+
116+ accelerator_values = [c [len ("Environment :: " ) :] for c in accelerator_classifiers ]
117+
118118 valid_accelerators = {
119119 "GPU :: NVIDIA CUDA" ,
120120 "GPU :: AMD ROCm" ,
121- "GPU :: Intel Arc" ,
121+ "GPU :: Intel Arc" ,
122122 "NPU :: Huawei Ascend" ,
123123 "GPU :: Apple Metal" ,
124124 }
125125
126126 for accelerator_value in accelerator_values :
127127 if accelerator_value not in valid_accelerators :
128128 typer .echo (
129- ' Warning: Invalid Environment classifier found. Environment classifiers must be one of: '
129+ " Warning: Invalid Environment classifier found. Environment classifiers must be one of: "
130130 '"Environment :: GPU :: NVIDIA CUDA", "Environment :: GPU :: AMD ROCm", "Environment :: GPU :: Intel Arc", '
131131 '"Environment :: NPU :: Huawei Ascend", "Environment :: GPU :: Apple Metal". '
132- ' No accelerator information will be populated.'
132+ " No accelerator information will be populated."
133133 )
134134 return []
135135
@@ -140,21 +140,21 @@ def validate_version(version: str, field_name: str) -> str:
140140 if not version :
141141 return version
142142
143- version_pattern = r' ^(?:(==|>=|<=|!=|~=|>|<|<>|=)\s*)?(\d+\.\d+\.\d+(?:-[a-zA-Z0-9]+)?)?$'
143+ version_pattern = r" ^(?:(==|>=|<=|!=|~=|>|<|<>|=)\s*)?(\d+\.\d+\.\d+(?:-[a-zA-Z0-9]+)?)?$"
144144
145- version_parts = [part .strip () for part in version .split (',' )]
145+ version_parts = [part .strip () for part in version .split ("," )]
146146 for part in version_parts :
147147 if not re .match (version_pattern , part ):
148148 typer .echo (
149149 f'Warning: Invalid { field_name } format: "{ version } ". '
150- f' Each version part must follow the pattern: [operator][version] where operator is optional (==, >=, <=, !=, ~=, >, <, <>, =) '
151- f' and version is in format major.minor.patch[-suffix]. '
152- f' Multiple versions can be comma-separated. '
150+ f" Each version part must follow the pattern: [operator][version] where operator is optional (==, >=, <=, !=, ~=, >, <, <>, =) "
151+ f" and version is in format major.minor.patch[-suffix]. "
152+ f" Multiple versions can be comma-separated. "
153153 f'Examples: ">=1.0.0", "==2.1.0-beta", "1.5.2", ">=1.0.0,<2.0.0". '
154- f' No { field_name } will be populated.'
154+ f" No { field_name } will be populated."
155155 )
156156 return ""
157-
157+
158158 return version
159159
160160
@@ -246,7 +246,9 @@ def extract_node_configuration(
246246 supported_os = validate_and_extract_os_classifiers (classifiers )
247247 supported_accelerators = validate_and_extract_accelerator_classifiers (classifiers )
248248 supported_comfyui_version = validate_version (supported_comfyui_version , "requires-comfyui" )
249- supported_comfyui_frontend_version = validate_version (supported_comfyui_frontend_version , "comfyui-frontend-package" )
249+ supported_comfyui_frontend_version = validate_version (
250+ supported_comfyui_frontend_version , "comfyui-frontend-package"
251+ )
250252
251253 license_data = project_data .get ("license" , {})
252254 if isinstance (license_data , str ):
0 commit comments