py2dag 0.1.11__tar.gz → 0.1.12__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {py2dag-0.1.11 → py2dag-0.1.12}/PKG-INFO +1 -1
- {py2dag-0.1.11 → py2dag-0.1.12}/py2dag/parser.py +8 -1
- {py2dag-0.1.11 → py2dag-0.1.12}/pyproject.toml +1 -1
- {py2dag-0.1.11 → py2dag-0.1.12}/LICENSE +0 -0
- {py2dag-0.1.11 → py2dag-0.1.12}/README.md +0 -0
- {py2dag-0.1.11 → py2dag-0.1.12}/py2dag/__init__.py +0 -0
- {py2dag-0.1.11 → py2dag-0.1.12}/py2dag/cli.py +0 -0
- {py2dag-0.1.11 → py2dag-0.1.12}/py2dag/export_dagre.py +0 -0
- {py2dag-0.1.11 → py2dag-0.1.12}/py2dag/export_svg.py +0 -0
- {py2dag-0.1.11 → py2dag-0.1.12}/py2dag/pseudo.py +0 -0
@@ -76,7 +76,14 @@ def parse(source: str, function_name: Optional[str] = None) -> Dict[str, Any]:
|
|
76
76
|
for kw in value.keywords:
|
77
77
|
if kw.arg is None:
|
78
78
|
raise DSLParseError("**kwargs are not allowed")
|
79
|
-
|
79
|
+
# Support variable-name keyword args as dependencies; literals remain in args
|
80
|
+
if isinstance(kw.value, ast.Name):
|
81
|
+
name = kw.value.id
|
82
|
+
if name not in defined:
|
83
|
+
raise DSLParseError(f"Undefined dependency: {name}")
|
84
|
+
deps.append(name)
|
85
|
+
else:
|
86
|
+
kwargs[kw.arg] = _literal(kw.value)
|
80
87
|
|
81
88
|
ops.append({"id": var_name, "op": op_name, "deps": deps, "args": kwargs})
|
82
89
|
elif isinstance(value, ast.JoinedStr):
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|