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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: py2dag
3
- Version: 0.1.11
3
+ Version: 0.1.12
4
4
  Summary: Convert Python function plans to DAG (JSON, pseudo, optional SVG).
5
5
  License: MIT
6
6
  Author: rvergis
@@ -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
- kwargs[kw.arg] = _literal(kw.value)
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):
@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
4
4
 
5
5
  [tool.poetry]
6
6
  name = "py2dag"
7
- version = "0.1.11"
7
+ version = "0.1.12"
8
8
  description = "Convert Python function plans to DAG (JSON, pseudo, optional SVG)."
9
9
  authors = ["rvergis"]
10
10
  license = "MIT"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes