astToolkit 0.14.0__tar.gz → 0.14.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.
- asttoolkit-0.14.2/MANIFEST.in +1 -0
- {asttoolkit-0.14.0 → asttoolkit-0.14.2}/PKG-INFO +10 -10
- {asttoolkit-0.14.0 → asttoolkit-0.14.2}/README.md +9 -5
- {asttoolkit-0.14.0 → asttoolkit-0.14.2}/astToolkit/_kitNodeTours.py +3 -1
- {asttoolkit-0.14.0 → asttoolkit-0.14.2}/astToolkit/_toolBe.py +273 -14
- {asttoolkit-0.14.0 → asttoolkit-0.14.2}/astToolkit/_toolDOT.py +25 -22
- asttoolkit-0.14.2/astToolkit/_toolGrab.py +2143 -0
- {asttoolkit-0.14.0 → asttoolkit-0.14.2}/astToolkit/_toolIfThis.py +1 -1
- asttoolkit-0.14.2/astToolkit/_toolMake.py +4000 -0
- {asttoolkit-0.14.0 → asttoolkit-0.14.2}/astToolkit/_tool_dump.py +2 -0
- {asttoolkit-0.14.0 → asttoolkit-0.14.2}/astToolkit/changeDef.py +29 -17
- {asttoolkit-0.14.0 → asttoolkit-0.14.2}/astToolkit/theTypes.py +20 -18
- {asttoolkit-0.14.0 → asttoolkit-0.14.2}/astToolkit.egg-info/PKG-INFO +10 -10
- {asttoolkit-0.14.0 → asttoolkit-0.14.2}/astToolkit.egg-info/SOURCES.txt +3 -8
- asttoolkit-0.14.2/astToolkit.egg-info/requires.txt +1 -0
- asttoolkit-0.14.2/astToolkit.egg-info/top_level.txt +1 -0
- asttoolkit-0.14.2/pyproject.toml +295 -0
- asttoolkit-0.14.2/tests/__init__.py +27 -0
- asttoolkit-0.14.2/tests/conftest.py +39 -0
- asttoolkit-0.14.2/tests/conftestAnnex.py +13 -0
- {asttoolkit-0.14.0 → asttoolkit-0.14.2}/tests/dataSamples/Make.py +345 -303
- {asttoolkit-0.14.0 → asttoolkit-0.14.2}/tests/dataSamples/sampleModuleForParsing.py +3 -0
- {asttoolkit-0.14.0 → asttoolkit-0.14.2}/tests/dataSamples/synthesizeTestDataCrudely.py +3 -3
- asttoolkit-0.14.2/tests/test_Be.py +52 -0
- asttoolkit-0.14.2/tests/test_Grab.py +57 -0
- asttoolkit-0.14.2/tests/test_IfThis.py +194 -0
- asttoolkit-0.14.2/tests/test_Then.py +72 -0
- asttoolkit-0.14.2/tests/test_changeDef.py +145 -0
- asttoolkit-0.14.2/tests/test_filesystem.py +67 -0
- asttoolkit-0.14.2/tests/test_transformationTools.py +154 -0
- asttoolkit-0.14.0/astToolkit/_toolGrab.py +0 -2352
- asttoolkit-0.14.0/astToolkit/_toolMake.py +0 -3713
- asttoolkit-0.14.0/astToolkit.egg-info/requires.txt +0 -6
- asttoolkit-0.14.0/astToolkit.egg-info/top_level.txt +0 -5
- asttoolkit-0.14.0/notesClassFind/_generateStubFind.py +0 -70
- asttoolkit-0.14.0/notesClassFind/_prototypeFind.py +0 -54
- asttoolkit-0.14.0/notesClassFind/_prototypeFind.pyi +0 -219
- asttoolkit-0.14.0/notesClassFind/_toolBeMetaclasses.py +0 -27
- asttoolkit-0.14.0/notesClassFind/idea_compare traversals.py +0 -67
- asttoolkit-0.14.0/notesClassFind/pseudocode.py +0 -37
- asttoolkit-0.14.0/notesClassFind/zz.py +0 -18
- asttoolkit-0.14.0/pyproject.toml +0 -82
- asttoolkit-0.14.0/tests/__init__.py +0 -5
- asttoolkit-0.14.0/tests/conftest.py +0 -596
- asttoolkit-0.14.0/tests/conftestAnnex.py +0 -30
- asttoolkit-0.14.0/tests/test_Be.py +0 -16
- asttoolkit-0.14.0/tests/test_Grab.py +0 -335
- asttoolkit-0.14.0/tests/test_IfThis.py +0 -317
- asttoolkit-0.14.0/tests/test_Then.py +0 -425
- asttoolkit-0.14.0/tests/test_toolkitAST.py +0 -22
- asttoolkit-0.14.0/tests/test_transformationTools.py +0 -353
- {asttoolkit-0.14.0 → asttoolkit-0.14.2}/LICENSE +0 -0
- {asttoolkit-0.14.0 → asttoolkit-0.14.2}/astToolkit/__init__.py +0 -0
- {asttoolkit-0.14.0 → asttoolkit-0.14.2}/astToolkit/_theSSOT.py +0 -0
- {asttoolkit-0.14.0 → asttoolkit-0.14.2}/astToolkit/_toolThen.py +0 -0
- {asttoolkit-0.14.0 → asttoolkit-0.14.2}/astToolkit/filesystem.py +0 -0
- {asttoolkit-0.14.0 → asttoolkit-0.14.2}/astToolkit/ohWow.py +0 -0
- {asttoolkit-0.14.0 → asttoolkit-0.14.2}/astToolkit/py.typed +0 -0
- {asttoolkit-0.14.0 → asttoolkit-0.14.2}/astToolkit/transformationTools.py +0 -0
- {asttoolkit-0.14.0 → asttoolkit-0.14.2}/astToolkit.egg-info/dependency_links.txt +0 -0
- {asttoolkit-0.14.0 → asttoolkit-0.14.2}/setup.cfg +0 -0
- {asttoolkit-0.14.0 → asttoolkit-0.14.2}/tests/dataSamples/__init__.py +0 -0
- {asttoolkit-0.14.0 → asttoolkit-0.14.2}/tests/dataSamples/sampleModuleWithRelativeImports.py +0 -0
- {asttoolkit-0.14.0 → asttoolkit-0.14.2}/tests/dataSamples/torchRelativeImports.py +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
recursive-include tests *.py
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: astToolkit
|
|
3
|
-
Version: 0.14.
|
|
3
|
+
Version: 0.14.2
|
|
4
4
|
Summary: A powerfully composable, type-safe toolkit for Python abstract syntax tree (AST) manipulation, analysis, transformation, and code generation with a layered architecture designed for building sophisticated code processing assembly-lines.
|
|
5
5
|
Author-email: Hunter Hogan <HunterHogan@pm.me>
|
|
6
6
|
License-Expression: CC-BY-NC-4.0
|
|
@@ -27,12 +27,9 @@ Requires-Python: >=3.14
|
|
|
27
27
|
Description-Content-Type: text/markdown
|
|
28
28
|
License-File: LICENSE
|
|
29
29
|
Requires-Dist: hunterMakesPy>=0.10.0
|
|
30
|
-
Provides-Extra: testing
|
|
31
|
-
Requires-Dist: pytest-cov; extra == "testing"
|
|
32
|
-
Requires-Dist: pytest-parametrize>=1.6; extra == "testing"
|
|
33
|
-
Requires-Dist: pytest; extra == "testing"
|
|
34
30
|
Dynamic: license-file
|
|
35
31
|
|
|
32
|
+
<!-- path-sync copy -n hunterhogan -->
|
|
36
33
|
# astToolkit
|
|
37
34
|
|
|
38
35
|
## Easily and Confidently Transform Python Code Using Unadulterated AST Classes
|
|
@@ -183,16 +180,19 @@ Most of the core toolkit code is generated by the separate [astToolFactory](http
|
|
|
183
180
|
|
|
184
181
|
If astToolkit saves you time, please [sponsor my work on GitHub](https://github.com/sponsors/hunterhogan). Monthly or one-time support helps me survive. You can also [choose another way to support me](https://hunterthinks.com/support).
|
|
185
182
|
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
## Citation and license
|
|
183
|
+
## Citation
|
|
189
184
|
|
|
190
185
|
Citation metadata is available in [CITATION.cff](citations/CITATION.cff).
|
|
191
186
|
|
|
192
|
-
|
|
187
|
+
<!-- === DO_NOT_EDIT: path-sync hunterhogan === -->
|
|
188
|
+
## My recovery
|
|
189
|
+
|
|
190
|
+
[](https://HunterThinks.com/support)
|
|
191
|
+

|
|
193
192
|
|
|
194
|
-
By law, authors retain their copyrights unless they grant exceptions. The
|
|
193
|
+
By law, authors retain their copyrights unless they grant exceptions. The Creative Commons Attribution-NonCommercial 4.0 International Deed outlines how you may use this work.
|
|
195
194
|
|
|
196
195
|
The restriction on commercial use (without a license) limits advantage-taking, unjust enrichment, and exploitation. You would be morally wrong if you were to enrich yourself by using this work while I am denied healthcare, housing, security of property, and the safety of my person.
|
|
197
196
|
|
|
198
197
|
To obtain and retain the right to use this work, you incur the cost of attributing the work to me. Your nominal cost might accrue as a benefit that mitigates my suffering or saves my life.
|
|
198
|
+
<!-- === OK_EDIT: path-sync hunterhogan === -->
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
<!-- path-sync copy -n hunterhogan -->
|
|
1
2
|
# astToolkit
|
|
2
3
|
|
|
3
4
|
## Easily and Confidently Transform Python Code Using Unadulterated AST Classes
|
|
@@ -148,16 +149,19 @@ Most of the core toolkit code is generated by the separate [astToolFactory](http
|
|
|
148
149
|
|
|
149
150
|
If astToolkit saves you time, please [sponsor my work on GitHub](https://github.com/sponsors/hunterhogan). Monthly or one-time support helps me survive. You can also [choose another way to support me](https://hunterthinks.com/support).
|
|
150
151
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
## Citation and license
|
|
152
|
+
## Citation
|
|
154
153
|
|
|
155
154
|
Citation metadata is available in [CITATION.cff](citations/CITATION.cff).
|
|
156
155
|
|
|
157
|
-
|
|
156
|
+
<!-- === DO_NOT_EDIT: path-sync hunterhogan === -->
|
|
157
|
+
## My recovery
|
|
158
|
+
|
|
159
|
+
[](https://HunterThinks.com/support)
|
|
160
|
+

|
|
158
161
|
|
|
159
|
-
By law, authors retain their copyrights unless they grant exceptions. The
|
|
162
|
+
By law, authors retain their copyrights unless they grant exceptions. The Creative Commons Attribution-NonCommercial 4.0 International Deed outlines how you may use this work.
|
|
160
163
|
|
|
161
164
|
The restriction on commercial use (without a license) limits advantage-taking, unjust enrichment, and exploitation. You would be morally wrong if you were to enrich yourself by using this work while I am denied healthcare, housing, security of property, and the safety of my person.
|
|
162
165
|
|
|
163
166
|
To obtain and retain the right to use this work, you incur the cost of attributing the work to me. Your nominal cost might accrue as a benefit that mitigates my suffering or saves my life.
|
|
167
|
+
<!-- === OK_EDIT: path-sync hunterhogan === -->
|
|
@@ -33,7 +33,7 @@ maintainable AST manipulation code.
|
|
|
33
33
|
from __future__ import annotations
|
|
34
34
|
|
|
35
35
|
from collections.abc import Iterable
|
|
36
|
-
from typing import overload, TYPE_CHECKING
|
|
36
|
+
from typing import overload, override, TYPE_CHECKING
|
|
37
37
|
import ast
|
|
38
38
|
|
|
39
39
|
if TYPE_CHECKING:
|
|
@@ -127,6 +127,7 @@ class NodeTourist[木: ast.AST, 归个](ast.NodeVisitor):
|
|
|
127
127
|
def _matches(self, node: ast.AST) -> TypeGuard[木]:
|
|
128
128
|
return self.findThis(node)
|
|
129
129
|
|
|
130
|
+
@override
|
|
130
131
|
def visit(self, node: ast.AST) -> None:
|
|
131
132
|
"""Apply predicate and action functions during AST traversal.
|
|
132
133
|
|
|
@@ -278,6 +279,7 @@ class NodeChanger[木: ast.AST, 归木: ast.AST | Iterable[ast.AST] | None](ast.
|
|
|
278
279
|
def _matches(self, node: ast.AST) -> TypeGuard[木]:
|
|
279
280
|
return self.findThis(node)
|
|
280
281
|
|
|
282
|
+
@override
|
|
281
283
|
def visit(self, node: ast.AST) -> 归木 | ast.AST:
|
|
282
284
|
"""Apply predicate and action functions during AST transformation.
|
|
283
285
|
|