py2dag 0.3.0__tar.gz → 0.3.2__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.3.0 → py2dag-0.3.2}/PKG-INFO +1 -1
- {py2dag-0.3.0 → py2dag-0.3.2}/py2dag/parser.py +5 -2
- {py2dag-0.3.0 → py2dag-0.3.2}/pyproject.toml +1 -1
- {py2dag-0.3.0 → py2dag-0.3.2}/LICENSE +0 -0
- {py2dag-0.3.0 → py2dag-0.3.2}/README.md +0 -0
- {py2dag-0.3.0 → py2dag-0.3.2}/py2dag/__init__.py +0 -0
- {py2dag-0.3.0 → py2dag-0.3.2}/py2dag/cli.py +0 -0
- {py2dag-0.3.0 → py2dag-0.3.2}/py2dag/colors.py +0 -0
- {py2dag-0.3.0 → py2dag-0.3.2}/py2dag/export_dagre.py +0 -0
- {py2dag-0.3.0 → py2dag-0.3.2}/py2dag/export_svg.py +0 -0
- {py2dag-0.3.0 → py2dag-0.3.2}/py2dag/pseudo.py +0 -0
@@ -108,7 +108,7 @@ def parse(source: str, function_name: Optional[str] = None) -> Dict[str, Any]:
|
|
108
108
|
deps: List[str] = []
|
109
109
|
for n in ast.walk(node):
|
110
110
|
if isinstance(n, ast.Name) and isinstance(n.ctx, ast.Load):
|
111
|
-
if n.id not in callees and n.id not in deps:
|
111
|
+
if n.id not in callees and n.id not in deps and n.id in latest:
|
112
112
|
deps.append(n.id)
|
113
113
|
return deps
|
114
114
|
|
@@ -603,7 +603,10 @@ def parse(source: str, function_name: Optional[str] = None) -> Dict[str, Any]:
|
|
603
603
|
raise DSLParseError("Only assignments, control flow, settings/output calls, and return are allowed in function body")
|
604
604
|
|
605
605
|
# Parse body sequentially; still require a resulting output
|
606
|
-
|
606
|
+
body = list(getattr(fn, "body", [])) # type: ignore[attr-defined]
|
607
|
+
if body and isinstance(body[0], ast.Expr) and isinstance(getattr(body[0], "value", None), ast.Constant) and isinstance(getattr(body[0].value, "value", None), str): # type: ignore[attr-defined]
|
608
|
+
body = body[1:]
|
609
|
+
for stmt in body:
|
607
610
|
_parse_stmt(stmt)
|
608
611
|
|
609
612
|
if not outputs:
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|