py2dag 0.1.9__py3-none-any.whl → 0.1.11__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 +5 -0
- {py2dag-0.1.9.dist-info → py2dag-0.1.11.dist-info}/METADATA +1 -1
- py2dag-0.1.11.dist-info/RECORD +11 -0
- py2dag-0.1.9.dist-info/RECORD +0 -11
- {py2dag-0.1.9.dist-info → py2dag-0.1.11.dist-info}/LICENSE +0 -0
- {py2dag-0.1.9.dist-info → py2dag-0.1.11.dist-info}/WHEEL +0 -0
- {py2dag-0.1.9.dist-info → py2dag-0.1.11.dist-info}/entry_points.txt +0 -0
py2dag/parser.py
CHANGED
@@ -171,6 +171,11 @@ def parse(source: str, function_name: Optional[str] = None) -> Dict[str, Any]:
|
|
171
171
|
returned_var = const_id
|
172
172
|
else:
|
173
173
|
raise DSLParseError("return must return a variable name or literal")
|
174
|
+
elif isinstance(stmt, (ast.For, ast.AsyncFor, ast.While, ast.If)):
|
175
|
+
# Ignore control flow blocks; only top-level linear statements are modeled
|
176
|
+
continue
|
177
|
+
elif isinstance(stmt, (ast.Pass,)):
|
178
|
+
continue
|
174
179
|
else:
|
175
180
|
raise DSLParseError("Only assignments, expression calls, and a final return are allowed in function body")
|
176
181
|
|
@@ -0,0 +1,11 @@
|
|
1
|
+
py2dag/__init__.py,sha256=i8VB44JCVcRJAcvnQtbH8YVRUz5j7dE355iRbikXPGQ,250
|
2
|
+
py2dag/cli.py,sha256=BCBi5mNxOqeEN8uEMt_hiDx0iSt7ZE3y74cGXREzZ2I,1296
|
3
|
+
py2dag/export_dagre.py,sha256=S244wUxBMuM9qXD8bklaslkMp3rcbBGWvMhwWVBzBF0,3487
|
4
|
+
py2dag/export_svg.py,sha256=YyjqOuj8GhUTDWP70SKnnSWAKI1PvJwyOhHLwB29uNM,1812
|
5
|
+
py2dag/parser.py,sha256=dInrYFUVQILBstNJvKxRcBe3Af2NRxQ0UBmP0KFt1k4,10525
|
6
|
+
py2dag/pseudo.py,sha256=NJK61slyFLtSjhj8gJDJneUInEpBN57_41g8IfHNPWI,922
|
7
|
+
py2dag-0.1.11.dist-info/LICENSE,sha256=3Qee1EPwej_nusovTbyIQ8LvD2rXHdM0c6LNwk_D8Kc,1067
|
8
|
+
py2dag-0.1.11.dist-info/METADATA,sha256=3ZFmWP3PGCdU4ac0HQ2-gSSeDdXwfj8WErcPUjZlqJw,3550
|
9
|
+
py2dag-0.1.11.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
10
|
+
py2dag-0.1.11.dist-info/entry_points.txt,sha256=Q0SHexJJ0z1te4AYL1xTZogx5FrxCCE1ZJ5qntkFMZs,42
|
11
|
+
py2dag-0.1.11.dist-info/RECORD,,
|
py2dag-0.1.9.dist-info/RECORD
DELETED
@@ -1,11 +0,0 @@
|
|
1
|
-
py2dag/__init__.py,sha256=i8VB44JCVcRJAcvnQtbH8YVRUz5j7dE355iRbikXPGQ,250
|
2
|
-
py2dag/cli.py,sha256=BCBi5mNxOqeEN8uEMt_hiDx0iSt7ZE3y74cGXREzZ2I,1296
|
3
|
-
py2dag/export_dagre.py,sha256=S244wUxBMuM9qXD8bklaslkMp3rcbBGWvMhwWVBzBF0,3487
|
4
|
-
py2dag/export_svg.py,sha256=YyjqOuj8GhUTDWP70SKnnSWAKI1PvJwyOhHLwB29uNM,1812
|
5
|
-
py2dag/parser.py,sha256=-Q4FK6aM6bzi5-z5LY7jRYJqCrqY8tjxi9c5tWFEpKc,10257
|
6
|
-
py2dag/pseudo.py,sha256=NJK61slyFLtSjhj8gJDJneUInEpBN57_41g8IfHNPWI,922
|
7
|
-
py2dag-0.1.9.dist-info/LICENSE,sha256=3Qee1EPwej_nusovTbyIQ8LvD2rXHdM0c6LNwk_D8Kc,1067
|
8
|
-
py2dag-0.1.9.dist-info/METADATA,sha256=skJgvQ_BodA_JhixDpVL8yxbsA87--Y3B07mFhVSiM0,3549
|
9
|
-
py2dag-0.1.9.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
10
|
-
py2dag-0.1.9.dist-info/entry_points.txt,sha256=Q0SHexJJ0z1te4AYL1xTZogx5FrxCCE1ZJ5qntkFMZs,42
|
11
|
-
py2dag-0.1.9.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|