py2dag 0.1.14__py3-none-any.whl → 0.1.15__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 +9 -4
- {py2dag-0.1.14.dist-info → py2dag-0.1.15.dist-info}/METADATA +1 -1
- {py2dag-0.1.14.dist-info → py2dag-0.1.15.dist-info}/RECORD +6 -6
- {py2dag-0.1.14.dist-info → py2dag-0.1.15.dist-info}/LICENSE +0 -0
- {py2dag-0.1.14.dist-info → py2dag-0.1.15.dist-info}/WHEEL +0 -0
- {py2dag-0.1.14.dist-info → py2dag-0.1.15.dist-info}/entry_points.txt +0 -0
py2dag/parser.py
CHANGED
@@ -47,11 +47,16 @@ def parse(source: str, function_name: Optional[str] = None) -> Dict[str, Any]:
|
|
47
47
|
settings: Dict[str, Any] = {}
|
48
48
|
|
49
49
|
returned_var: Optional[str] = None
|
50
|
-
#
|
50
|
+
# Enforce no-args top-level function signature
|
51
51
|
try:
|
52
|
-
|
53
|
-
|
54
|
-
|
52
|
+
fargs = getattr(fn, "args") # type: ignore[attr-defined]
|
53
|
+
has_params = bool(
|
54
|
+
getattr(fargs, "posonlyargs", []) or fargs.args or fargs.vararg or fargs.kwonlyargs or fargs.kwarg
|
55
|
+
)
|
56
|
+
if has_params:
|
57
|
+
raise DSLParseError("Top-level function must not accept parameters")
|
58
|
+
except AttributeError:
|
59
|
+
# If args not present, ignore
|
55
60
|
pass
|
56
61
|
|
57
62
|
def _collect_name_deps(node: ast.AST) -> List[str]:
|
@@ -2,10 +2,10 @@ py2dag/__init__.py,sha256=i8VB44JCVcRJAcvnQtbH8YVRUz5j7dE355iRbikXPGQ,250
|
|
2
2
|
py2dag/cli.py,sha256=BCBi5mNxOqeEN8uEMt_hiDx0iSt7ZE3y74cGXREzZ2I,1296
|
3
3
|
py2dag/export_dagre.py,sha256=S244wUxBMuM9qXD8bklaslkMp3rcbBGWvMhwWVBzBF0,3487
|
4
4
|
py2dag/export_svg.py,sha256=YyjqOuj8GhUTDWP70SKnnSWAKI1PvJwyOhHLwB29uNM,1812
|
5
|
-
py2dag/parser.py,sha256=
|
5
|
+
py2dag/parser.py,sha256=6YPM1MU2FgVDkElK0hxR-PX7NeiQwTTSJvjMkSABF2s,16856
|
6
6
|
py2dag/pseudo.py,sha256=NJK61slyFLtSjhj8gJDJneUInEpBN57_41g8IfHNPWI,922
|
7
|
-
py2dag-0.1.
|
8
|
-
py2dag-0.1.
|
9
|
-
py2dag-0.1.
|
10
|
-
py2dag-0.1.
|
11
|
-
py2dag-0.1.
|
7
|
+
py2dag-0.1.15.dist-info/LICENSE,sha256=3Qee1EPwej_nusovTbyIQ8LvD2rXHdM0c6LNwk_D8Kc,1067
|
8
|
+
py2dag-0.1.15.dist-info/METADATA,sha256=kxE0fmpJMm0xvuglSG2fz9w8E1fnu8vufQGd49YeQT0,3550
|
9
|
+
py2dag-0.1.15.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
10
|
+
py2dag-0.1.15.dist-info/entry_points.txt,sha256=Q0SHexJJ0z1te4AYL1xTZogx5FrxCCE1ZJ5qntkFMZs,42
|
11
|
+
py2dag-0.1.15.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|