Fix new style config

This commit is contained in:
Tat Dat Duong
2025-04-11 00:04:44 +02:00
parent e0be9ae2ef
commit d06075cbcf
2 changed files with 7 additions and 2 deletions
+5 -1
View File
@@ -443,9 +443,13 @@ def _parse_node_version(version_str: str) -> int:
) from None
def _is_python_graph(spec: str) -> bool:
def _is_python_graph(spec: str | dict) -> bool:
"""Check if a graph is a Python graph based on the file extension."""
# handle new style config
if isinstance(spec, dict):
spec = spec.get("path")
file_path = spec.split(":")[0]
file_ext = os.path.splitext(file_path)[1]
return file_ext in [".py", ".pyx", ".pyd", ".pyi"]