codegen-2 2.15.0__tar.gz → 2.15.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.
- {codegen_2-2.15.0 → codegen_2-2.15.2}/PKG-INFO +4 -2
- {codegen_2-2.15.0 → codegen_2-2.15.2}/codegen/models/expr.py +2 -0
- {codegen_2-2.15.0 → codegen_2-2.15.2}/codegen/models/statement.py +2 -2
- {codegen_2-2.15.0 → codegen_2-2.15.2}/pyproject.toml +1 -1
- {codegen_2-2.15.0 → codegen_2-2.15.2}/LICENSE +0 -0
- {codegen_2-2.15.0 → codegen_2-2.15.2}/README.md +0 -0
- {codegen_2-2.15.0 → codegen_2-2.15.2}/codegen/__init__.py +0 -0
- {codegen_2-2.15.0 → codegen_2-2.15.2}/codegen/models/__init__.py +0 -0
- {codegen_2-2.15.0 → codegen_2-2.15.2}/codegen/models/ast.py +0 -0
- {codegen_2-2.15.0 → codegen_2-2.15.2}/codegen/models/program.py +0 -0
- {codegen_2-2.15.0 → codegen_2-2.15.2}/codegen/models/types.py +0 -0
- {codegen_2-2.15.0 → codegen_2-2.15.2}/codegen/models/var.py +0 -0
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: codegen-2
|
|
3
|
-
Version: 2.15.
|
|
3
|
+
Version: 2.15.2
|
|
4
4
|
Summary: Meta-programming
|
|
5
5
|
License: MIT
|
|
6
|
+
License-File: LICENSE
|
|
6
7
|
Author: Binh Vu
|
|
7
8
|
Author-email: binh@toan2.com
|
|
8
9
|
Requires-Python: >=3.11,<4.0
|
|
@@ -11,6 +12,7 @@ Classifier: Programming Language :: Python :: 3
|
|
|
11
12
|
Classifier: Programming Language :: Python :: 3.11
|
|
12
13
|
Classifier: Programming Language :: Python :: 3.12
|
|
13
14
|
Classifier: Programming Language :: Python :: 3.13
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
14
16
|
Description-Content-Type: text/markdown
|
|
15
17
|
|
|
16
18
|
# codegen
|
|
@@ -96,7 +96,7 @@ class DefFuncStatement(Statement):
|
|
|
96
96
|
comment: str = ""
|
|
97
97
|
|
|
98
98
|
def to_python(self):
|
|
99
|
-
sig = f"def {self.name}({', '.join([arg[0].to_python() +
|
|
99
|
+
sig = f"def {self.name}({', '.join([arg[0].to_python() + ' = ' + arg[1].to_python() if isinstance(arg, tuple) else arg.to_python() for arg in self.args])})"
|
|
100
100
|
if self.return_type is not None:
|
|
101
101
|
sig += f" -> {self.return_type.to_python()}"
|
|
102
102
|
if self.is_async:
|
|
@@ -130,7 +130,7 @@ class DefFuncStatement(Statement):
|
|
|
130
130
|
|
|
131
131
|
sig = (
|
|
132
132
|
keyword
|
|
133
|
-
+ f"{self.name}({', '.join([arg[0].to_typescript() +
|
|
133
|
+
+ f"{self.name}({', '.join([arg[0].to_typescript() + ' = ' + arg[1].to_typescript() if isinstance(arg, tuple) else arg.to_typescript() for arg in self.args])})"
|
|
134
134
|
)
|
|
135
135
|
if self.return_type is not None:
|
|
136
136
|
sig += f": {self.return_type.to_typescript()}"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|