fluent-codegen 0.2__tar.gz → 0.4.0__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.
- {fluent_codegen-0.2/src/fluent_codegen.egg-info → fluent_codegen-0.4.0}/PKG-INFO +6 -2
- {fluent_codegen-0.2 → fluent_codegen-0.4.0}/README.rst +2 -0
- {fluent_codegen-0.2 → fluent_codegen-0.4.0}/pyproject.toml +9 -4
- fluent_codegen-0.4.0/src/fluent_codegen/__init__.py +4 -0
- {fluent_codegen-0.2 → fluent_codegen-0.4.0}/src/fluent_codegen/ast_compat.py +13 -0
- {fluent_codegen-0.2 → fluent_codegen-0.4.0}/src/fluent_codegen/codegen.py +779 -164
- fluent_codegen-0.4.0/src/fluent_codegen/remove_unused_assignments.py +163 -0
- {fluent_codegen-0.2 → fluent_codegen-0.4.0}/src/fluent_codegen/utils.py +2 -0
- {fluent_codegen-0.2 → fluent_codegen-0.4.0/src/fluent_codegen.egg-info}/PKG-INFO +6 -2
- {fluent_codegen-0.2 → fluent_codegen-0.4.0}/src/fluent_codegen.egg-info/SOURCES.txt +4 -1
- fluent_codegen-0.4.0/src/fluent_codegen.egg-info/requires.txt +3 -0
- {fluent_codegen-0.2 → fluent_codegen-0.4.0}/tests/test_codegen.py +989 -35
- fluent_codegen-0.4.0/tests/test_remove_unused.py +230 -0
- fluent_codegen-0.2/src/fluent_codegen/__init__.py +0 -0
- {fluent_codegen-0.2 → fluent_codegen-0.4.0}/LICENSE +0 -0
- {fluent_codegen-0.2 → fluent_codegen-0.4.0}/setup.cfg +0 -0
- {fluent_codegen-0.2 → fluent_codegen-0.4.0}/src/fluent_codegen/py.typed +0 -0
- {fluent_codegen-0.2 → fluent_codegen-0.4.0}/src/fluent_codegen.egg-info/dependency_links.txt +0 -0
- {fluent_codegen-0.2 → fluent_codegen-0.4.0}/src/fluent_codegen.egg-info/top_level.txt +0 -0
- {fluent_codegen-0.2 → fluent_codegen-0.4.0}/tests/test_fizzbuzz_example.py +0 -0
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: fluent-codegen
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.4.0
|
|
4
4
|
Summary: A Python library for generating Python code via AST construction.
|
|
5
5
|
Author-email: Luke Plant <luke@lukeplant.me.uk>
|
|
6
6
|
License-Expression: Apache-2.0
|
|
7
|
+
Project-URL: Documentation, https://fluent-codegen.readthedocs.io/en/latest/
|
|
7
8
|
Project-URL: Repository, https://github.com/spookylukey/fluent-codegen
|
|
8
9
|
Keywords: codegen,code-generation,ast,python,metaprogramming
|
|
9
|
-
Classifier: Development Status ::
|
|
10
|
+
Classifier: Development Status :: 4 - Beta
|
|
10
11
|
Classifier: Intended Audience :: Developers
|
|
11
12
|
Classifier: Operating System :: OS Independent
|
|
12
13
|
Classifier: Programming Language :: Python :: 3 :: Only
|
|
@@ -18,6 +19,7 @@ Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
|
18
19
|
Requires-Python: >=3.12
|
|
19
20
|
Description-Content-Type: text/x-rst
|
|
20
21
|
License-File: LICENSE
|
|
22
|
+
Requires-Dist: typing_extensions>=4.10; python_version < "3.13"
|
|
21
23
|
Dynamic: license-file
|
|
22
24
|
|
|
23
25
|
fluent-codegen
|
|
@@ -25,6 +27,8 @@ fluent-codegen
|
|
|
25
27
|
|
|
26
28
|
A Python library for generating Python code via AST construction.
|
|
27
29
|
|
|
30
|
+
`Documentation <https://fluent-codegen.readthedocs.io/en/latest/>`__
|
|
31
|
+
|
|
28
32
|
Overview
|
|
29
33
|
--------
|
|
30
34
|
|
|
@@ -14,7 +14,7 @@ keywords = [
|
|
|
14
14
|
"metaprogramming",
|
|
15
15
|
]
|
|
16
16
|
classifiers = [
|
|
17
|
-
"Development Status ::
|
|
17
|
+
"Development Status :: 4 - Beta",
|
|
18
18
|
"Intended Audience :: Developers",
|
|
19
19
|
"Operating System :: OS Independent",
|
|
20
20
|
"Programming Language :: Python :: 3 :: Only",
|
|
@@ -24,10 +24,13 @@ classifiers = [
|
|
|
24
24
|
"Topic :: Software Development :: Code Generators",
|
|
25
25
|
"Topic :: Software Development :: Libraries :: Python Modules",
|
|
26
26
|
]
|
|
27
|
-
version = "0.
|
|
28
|
-
dependencies = [
|
|
27
|
+
version = "0.4.0"
|
|
28
|
+
dependencies = [
|
|
29
|
+
"typing_extensions>=4.10; python_version<'3.13'",
|
|
30
|
+
]
|
|
29
31
|
|
|
30
32
|
[project.urls]
|
|
33
|
+
Documentation = "https://fluent-codegen.readthedocs.io/en/latest/"
|
|
31
34
|
Repository = "https://github.com/spookylukey/fluent-codegen"
|
|
32
35
|
|
|
33
36
|
|
|
@@ -74,7 +77,9 @@ dev = [
|
|
|
74
77
|
"pyright==1.1.406",
|
|
75
78
|
"pytest>=7.4.4",
|
|
76
79
|
"pytest-cov>=7.0.0",
|
|
77
|
-
"ruff>=0.
|
|
80
|
+
"ruff>=0.15.1",
|
|
81
|
+
"sphinx>=9.1.0",
|
|
82
|
+
"sphinx-rtd-theme>=3.1.0",
|
|
78
83
|
"tox>=4.36.0",
|
|
79
84
|
"tox-uv>=1.29.0",
|
|
80
85
|
]
|
|
@@ -11,6 +11,9 @@ from typing import TypedDict
|
|
|
11
11
|
|
|
12
12
|
Add = ast.Add
|
|
13
13
|
And = ast.And
|
|
14
|
+
BitAnd = ast.BitAnd
|
|
15
|
+
BitOr = ast.BitOr
|
|
16
|
+
BitXor = ast.BitXor
|
|
14
17
|
Assert = ast.Assert
|
|
15
18
|
Assign = ast.Assign
|
|
16
19
|
AnnAssign = ast.AnnAssign
|
|
@@ -25,9 +28,11 @@ Expr = ast.Expr
|
|
|
25
28
|
FloorDiv = ast.FloorDiv
|
|
26
29
|
Gt = ast.Gt
|
|
27
30
|
GtE = ast.GtE
|
|
31
|
+
Invert = ast.Invert
|
|
28
32
|
If = ast.If
|
|
29
33
|
In = ast.In
|
|
30
34
|
List = ast.List
|
|
35
|
+
LShift = ast.LShift
|
|
31
36
|
Load = ast.Load
|
|
32
37
|
Lt = ast.Lt
|
|
33
38
|
LtE = ast.LtE
|
|
@@ -35,14 +40,22 @@ Mod = ast.Mod
|
|
|
35
40
|
Module = ast.Module
|
|
36
41
|
Mult = ast.Mult
|
|
37
42
|
MatMult = ast.MatMult
|
|
43
|
+
Not = ast.Not
|
|
38
44
|
NotEq = ast.NotEq
|
|
39
45
|
NotIn = ast.NotIn
|
|
40
46
|
Or = ast.Or
|
|
41
47
|
Pow = ast.Pow
|
|
48
|
+
RShift = ast.RShift
|
|
42
49
|
Sub = ast.Sub
|
|
50
|
+
Is = ast.Is
|
|
51
|
+
IsNot = ast.IsNot
|
|
52
|
+
UAdd = ast.UAdd
|
|
53
|
+
USub = ast.USub
|
|
54
|
+
UnaryOp = ast.UnaryOp
|
|
43
55
|
boolop = ast.boolop
|
|
44
56
|
cmpop = ast.cmpop
|
|
45
57
|
operator = ast.operator
|
|
58
|
+
unaryop = ast.unaryop
|
|
46
59
|
Pass = ast.Pass
|
|
47
60
|
Return = ast.Return
|
|
48
61
|
Set = ast.Set
|