py2dag 0.3.0__py3-none-any.whl → 0.3.1__py3-none-any.whl

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/parser.py CHANGED
@@ -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
- for i, stmt in enumerate(fn.body): # type: ignore[attr-defined]
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:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: py2dag
3
- Version: 0.3.0
3
+ Version: 0.3.1
4
4
  Summary: Convert Python function plans to DAG (JSON, pseudo, optional SVG).
5
5
  License: MIT
6
6
  Author: rvergis
@@ -3,10 +3,10 @@ py2dag/cli.py,sha256=q8ocafpGtkrls1mx9QiFU1wL6KKeeJhT0Oklk6SwHB0,15151
3
3
  py2dag/colors.py,sha256=kVMVWUKJY1uLQFQux5XKiEcofDFpNPQoAEzpMJWs2b0,604
4
4
  py2dag/export_dagre.py,sha256=Og-oVjKzc7bRgeU7rgLHDjiY6wIcNyr2nIYlSAQzKoM,6041
5
5
  py2dag/export_svg.py,sha256=3ZmZqxIUidSbuKIIh5kFqhfVnoqZ6PbEQpMih4AX9xo,3793
6
- py2dag/parser.py,sha256=Z0X_IyHF1EzM_HPxP9-eNMBGPoHuyhRAqJmX3zXH92k,30399
6
+ py2dag/parser.py,sha256=bpwOZVsJUS3fRQTFfm2CfTxqlTWUYaLYDOHJRA2Yj34,30657
7
7
  py2dag/pseudo.py,sha256=NJK61slyFLtSjhj8gJDJneUInEpBN57_41g8IfHNPWI,922
8
- py2dag-0.3.0.dist-info/LICENSE,sha256=3Qee1EPwej_nusovTbyIQ8LvD2rXHdM0c6LNwk_D8Kc,1067
9
- py2dag-0.3.0.dist-info/METADATA,sha256=9AQIxET2CsznM7lzAGM47GBQE79oHTPjNHepQnHtVSM,3549
10
- py2dag-0.3.0.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
11
- py2dag-0.3.0.dist-info/entry_points.txt,sha256=Q0SHexJJ0z1te4AYL1xTZogx5FrxCCE1ZJ5qntkFMZs,42
12
- py2dag-0.3.0.dist-info/RECORD,,
8
+ py2dag-0.3.1.dist-info/LICENSE,sha256=3Qee1EPwej_nusovTbyIQ8LvD2rXHdM0c6LNwk_D8Kc,1067
9
+ py2dag-0.3.1.dist-info/METADATA,sha256=GhuNW_nWmz0P0eNjX6Zs2y65AglkhUT1lplPeDzxmaU,3549
10
+ py2dag-0.3.1.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
11
+ py2dag-0.3.1.dist-info/entry_points.txt,sha256=Q0SHexJJ0z1te4AYL1xTZogx5FrxCCE1ZJ5qntkFMZs,42
12
+ py2dag-0.3.1.dist-info/RECORD,,
File without changes