astToolkit 0.2.1__tar.gz → 0.2.3__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.2.1 → asttoolkit-0.2.3}/PKG-INFO +1 -1
- asttoolkit-0.2.3/astToolkit/_astTypes.py +141 -0
- {asttoolkit-0.2.1 → asttoolkit-0.2.3}/astToolkit/_toolClassIsAndAttribute.py +182 -161
- {asttoolkit-0.2.1 → asttoolkit-0.2.3}/astToolkit/_toolDOT.py +82 -77
- {asttoolkit-0.2.1 → asttoolkit-0.2.3}/astToolkit/_toolGrab.py +112 -99
- {asttoolkit-0.2.1 → asttoolkit-0.2.3}/astToolkit/_toolMake.py +2 -2
- {asttoolkit-0.2.1 → asttoolkit-0.2.3}/astToolkit/_toolkitAST.py +56 -1
- {asttoolkit-0.2.1 → asttoolkit-0.2.3}/astToolkit/_types.py +15 -3
- {asttoolkit-0.2.1 → asttoolkit-0.2.3}/astToolkit.egg-info/PKG-INFO +1 -1
- {asttoolkit-0.2.1 → asttoolkit-0.2.3}/pyproject.toml +1 -1
- asttoolkit-0.2.3/toolFactory/Z0Z_hardcoded.py +90 -0
- {asttoolkit-0.2.1 → asttoolkit-0.2.3}/toolFactory/Z0Z_makeAstTools.py +3 -2
- {asttoolkit-0.2.1 → asttoolkit-0.2.3}/toolFactory/__init__.py +7 -3
- asttoolkit-0.2.3/toolFactory/_snippets.py +12 -0
- {asttoolkit-0.2.1 → asttoolkit-0.2.3}/toolFactory/astFactory.py +88 -90
- {asttoolkit-0.2.1 → asttoolkit-0.2.3}/toolFactory/databaseASTCreation.py +2 -2
- asttoolkit-0.2.3/toolFactory/datacenter.py +270 -0
- {asttoolkit-0.2.1 → asttoolkit-0.2.3}/toolFactory/docstrings.py +30 -0
- asttoolkit-0.2.3/toolFactory/factory3.py +486 -0
- asttoolkit-0.2.3/toolFactory/factory_annex.py +76 -0
- asttoolkit-0.2.1/astToolkit/_astTypes.py +0 -130
- asttoolkit-0.2.1/toolFactory/Z0Z_hardcoded.py +0 -26
- asttoolkit-0.2.1/toolFactory/_snippets.py +0 -6
- asttoolkit-0.2.1/toolFactory/datacenter.py +0 -131
- asttoolkit-0.2.1/toolFactory/factory3.py +0 -319
- asttoolkit-0.2.1/toolFactory/factory_annex.py +0 -89
- {asttoolkit-0.2.1 → asttoolkit-0.2.3}/LICENSE +0 -0
- {asttoolkit-0.2.1 → asttoolkit-0.2.3}/README.md +0 -0
- {asttoolkit-0.2.1 → asttoolkit-0.2.3}/astToolkit/__init__.py +1 -1
- {asttoolkit-0.2.1 → asttoolkit-0.2.3}/astToolkit/_toolBe.py +0 -0
- {asttoolkit-0.2.1 → asttoolkit-0.2.3}/astToolkit/_toolIfThis.py +0 -0
- {asttoolkit-0.2.1 → asttoolkit-0.2.3}/astToolkit/_toolThen.py +0 -0
- {asttoolkit-0.2.1 → asttoolkit-0.2.3}/astToolkit/_toolkitContainers.py +0 -0
- {asttoolkit-0.2.1 → asttoolkit-0.2.3}/astToolkit/_toolkitNodeVisitor.py +0 -0
- {asttoolkit-0.2.1 → asttoolkit-0.2.3}/astToolkit/_typesSpecial.py +0 -0
- {asttoolkit-0.2.1 → asttoolkit-0.2.3}/astToolkit/py.typed +0 -0
- {asttoolkit-0.2.1 → asttoolkit-0.2.3}/astToolkit/theSSOT.py +0 -0
- {asttoolkit-0.2.1 → asttoolkit-0.2.3}/astToolkit/transformationTools.py +0 -0
- {asttoolkit-0.2.1 → asttoolkit-0.2.3}/astToolkit.egg-info/SOURCES.txt +0 -0
- {asttoolkit-0.2.1 → asttoolkit-0.2.3}/astToolkit.egg-info/dependency_links.txt +0 -0
- {asttoolkit-0.2.1 → asttoolkit-0.2.3}/astToolkit.egg-info/requires.txt +0 -0
- {asttoolkit-0.2.1 → asttoolkit-0.2.3}/astToolkit.egg-info/top_level.txt +0 -0
- {asttoolkit-0.2.1 → asttoolkit-0.2.3}/setup.cfg +0 -0
- {asttoolkit-0.2.1 → asttoolkit-0.2.3}/tests/test_basic.py +0 -0
- {asttoolkit-0.2.1 → asttoolkit-0.2.3}/toolFactory/py.typed +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: astToolkit
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.3
|
|
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: CC-BY-NC-4.0
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
"""This file is generated automatically, so changes to this file will be lost."""
|
|
2
|
+
from typing import Any, TypeAlias as typing_TypeAlias
|
|
3
|
+
import ast
|
|
4
|
+
import sys
|
|
5
|
+
intORstr: typing_TypeAlias = Any
|
|
6
|
+
intORstrORtype_params: typing_TypeAlias = Any
|
|
7
|
+
intORtype_params: typing_TypeAlias = Any
|
|
8
|
+
hasDOTannotation_expr: typing_TypeAlias = ast.AnnAssign
|
|
9
|
+
hasDOTannotation_exprOrNone: typing_TypeAlias = ast.arg
|
|
10
|
+
hasDOTannotation: typing_TypeAlias = hasDOTannotation_expr | hasDOTannotation_exprOrNone
|
|
11
|
+
hasDOTarg_str: typing_TypeAlias = ast.arg
|
|
12
|
+
hasDOTarg_strOrNone: typing_TypeAlias = ast.keyword
|
|
13
|
+
hasDOTarg: typing_TypeAlias = hasDOTarg_str | hasDOTarg_strOrNone
|
|
14
|
+
hasDOTargs_arguments: typing_TypeAlias = ast.AsyncFunctionDef | ast.FunctionDef | ast.Lambda
|
|
15
|
+
hasDOTargs_list_arg: typing_TypeAlias = ast.arguments
|
|
16
|
+
hasDOTargs_list_expr: typing_TypeAlias = ast.Call
|
|
17
|
+
hasDOTargs: typing_TypeAlias = hasDOTargs_arguments | hasDOTargs_list_arg | hasDOTargs_list_expr
|
|
18
|
+
hasDOTargtypes: typing_TypeAlias = ast.FunctionType
|
|
19
|
+
hasDOTasname: typing_TypeAlias = ast.alias
|
|
20
|
+
hasDOTattr: typing_TypeAlias = ast.Attribute
|
|
21
|
+
hasDOTbases: typing_TypeAlias = ast.ClassDef
|
|
22
|
+
hasDOTbody_expr: typing_TypeAlias = ast.Expression | ast.IfExp | ast.Lambda
|
|
23
|
+
if sys.version_info >= (3, 11):
|
|
24
|
+
hasDOTbody_list_stmt: typing_TypeAlias = ast.AsyncFor | ast.AsyncFunctionDef | ast.AsyncWith | ast.ClassDef | ast.ExceptHandler | ast.For | ast.FunctionDef | ast.If | ast.Interactive | ast.match_case | ast.Module | ast.Try | ast.TryStar | ast.While | ast.With
|
|
25
|
+
else:
|
|
26
|
+
hasDOTbody_list_stmt: typing_TypeAlias = ast.AsyncFor | ast.AsyncFunctionDef | ast.AsyncWith | ast.ClassDef | ast.ExceptHandler | ast.For | ast.FunctionDef | ast.If | ast.Interactive | ast.match_case | ast.Module | ast.Try | ast.While | ast.With
|
|
27
|
+
hasDOTbody: typing_TypeAlias = hasDOTbody_expr | hasDOTbody_list_stmt
|
|
28
|
+
if sys.version_info >= (3, 12):
|
|
29
|
+
hasDOTbound: typing_TypeAlias = ast.TypeVar
|
|
30
|
+
hasDOTcases: typing_TypeAlias = ast.Match
|
|
31
|
+
hasDOTcause: typing_TypeAlias = ast.Raise
|
|
32
|
+
hasDOTcls: typing_TypeAlias = ast.MatchClass
|
|
33
|
+
hasDOTcomparators: typing_TypeAlias = ast.Compare
|
|
34
|
+
hasDOTcontext_expr: typing_TypeAlias = ast.withitem
|
|
35
|
+
hasDOTconversion: typing_TypeAlias = ast.FormattedValue
|
|
36
|
+
hasDOTctx: typing_TypeAlias = ast.Attribute | ast.List | ast.Name | ast.Starred | ast.Subscript | ast.Tuple
|
|
37
|
+
hasDOTdecorator_list: typing_TypeAlias = ast.AsyncFunctionDef | ast.ClassDef | ast.FunctionDef
|
|
38
|
+
if sys.version_info >= (3, 13):
|
|
39
|
+
hasDOTdefault_value: typing_TypeAlias = ast.ParamSpec | ast.TypeVar | ast.TypeVarTuple
|
|
40
|
+
hasDOTdefaults: typing_TypeAlias = ast.arguments
|
|
41
|
+
hasDOTelt: typing_TypeAlias = ast.GeneratorExp | ast.ListComp | ast.SetComp
|
|
42
|
+
hasDOTelts: typing_TypeAlias = ast.List | ast.Set | ast.Tuple
|
|
43
|
+
hasDOTexc: typing_TypeAlias = ast.Raise
|
|
44
|
+
if sys.version_info >= (3, 11):
|
|
45
|
+
hasDOTfinalbody: typing_TypeAlias = ast.Try | ast.TryStar
|
|
46
|
+
else:
|
|
47
|
+
hasDOTfinalbody: typing_TypeAlias = ast.Try
|
|
48
|
+
hasDOTformat_spec: typing_TypeAlias = ast.FormattedValue
|
|
49
|
+
hasDOTfunc: typing_TypeAlias = ast.Call
|
|
50
|
+
hasDOTgenerators: typing_TypeAlias = ast.DictComp | ast.GeneratorExp | ast.ListComp | ast.SetComp
|
|
51
|
+
hasDOTguard: typing_TypeAlias = ast.match_case
|
|
52
|
+
if sys.version_info >= (3, 11):
|
|
53
|
+
hasDOThandlers: typing_TypeAlias = ast.Try | ast.TryStar
|
|
54
|
+
else:
|
|
55
|
+
hasDOThandlers: typing_TypeAlias = ast.Try
|
|
56
|
+
hasDOTid: typing_TypeAlias = ast.Name
|
|
57
|
+
hasDOTifs: typing_TypeAlias = ast.comprehension
|
|
58
|
+
hasDOTis_async: typing_TypeAlias = ast.comprehension
|
|
59
|
+
hasDOTitems: typing_TypeAlias = ast.AsyncWith | ast.With
|
|
60
|
+
hasDOTiter: typing_TypeAlias = ast.AsyncFor | ast.comprehension | ast.For
|
|
61
|
+
hasDOTkey: typing_TypeAlias = ast.DictComp
|
|
62
|
+
hasDOTkeys_list_expr: typing_TypeAlias = ast.MatchMapping
|
|
63
|
+
hasDOTkeys_list_exprOrNone: typing_TypeAlias = ast.Dict
|
|
64
|
+
hasDOTkeys: typing_TypeAlias = hasDOTkeys_list_expr | hasDOTkeys_list_exprOrNone
|
|
65
|
+
hasDOTkeywords: typing_TypeAlias = ast.Call | ast.ClassDef
|
|
66
|
+
hasDOTkind: typing_TypeAlias = ast.Constant
|
|
67
|
+
hasDOTkw_defaults: typing_TypeAlias = ast.arguments
|
|
68
|
+
hasDOTkwarg: typing_TypeAlias = ast.arguments
|
|
69
|
+
hasDOTkwd_attrs: typing_TypeAlias = ast.MatchClass
|
|
70
|
+
hasDOTkwd_patterns: typing_TypeAlias = ast.MatchClass
|
|
71
|
+
hasDOTkwonlyargs: typing_TypeAlias = ast.arguments
|
|
72
|
+
hasDOTleft: typing_TypeAlias = ast.BinOp | ast.Compare
|
|
73
|
+
hasDOTlevel: typing_TypeAlias = ast.ImportFrom
|
|
74
|
+
hasDOTlineno: typing_TypeAlias = ast.TypeIgnore
|
|
75
|
+
hasDOTlower: typing_TypeAlias = ast.Slice
|
|
76
|
+
hasDOTmodule: typing_TypeAlias = ast.ImportFrom
|
|
77
|
+
hasDOTmsg: typing_TypeAlias = ast.Assert
|
|
78
|
+
if sys.version_info >= (3, 12):
|
|
79
|
+
hasDOTname_Name: typing_TypeAlias = ast.TypeAlias
|
|
80
|
+
if sys.version_info >= (3, 12):
|
|
81
|
+
hasDOTname_str: typing_TypeAlias = ast.alias | ast.AsyncFunctionDef | ast.ClassDef | ast.FunctionDef | ast.ParamSpec | ast.TypeVar | ast.TypeVarTuple
|
|
82
|
+
else:
|
|
83
|
+
hasDOTname_str: typing_TypeAlias = ast.alias | ast.AsyncFunctionDef | ast.ClassDef | ast.FunctionDef
|
|
84
|
+
hasDOTname_strOrNone: typing_TypeAlias = ast.ExceptHandler | ast.MatchAs | ast.MatchStar
|
|
85
|
+
if sys.version_info >= (3, 12):
|
|
86
|
+
hasDOTname: typing_TypeAlias = hasDOTname_Name | hasDOTname_str | hasDOTname_strOrNone
|
|
87
|
+
else:
|
|
88
|
+
hasDOTname: typing_TypeAlias = hasDOTname_str | hasDOTname_strOrNone
|
|
89
|
+
hasDOTnames_list_alias: typing_TypeAlias = ast.Import | ast.ImportFrom
|
|
90
|
+
hasDOTnames_list_str: typing_TypeAlias = ast.Global | ast.Nonlocal
|
|
91
|
+
hasDOTnames: typing_TypeAlias = hasDOTnames_list_alias | hasDOTnames_list_str
|
|
92
|
+
hasDOTop_boolop: typing_TypeAlias = ast.BoolOp
|
|
93
|
+
hasDOTop_operator: typing_TypeAlias = ast.AugAssign | ast.BinOp
|
|
94
|
+
hasDOTop_unaryop: typing_TypeAlias = ast.UnaryOp
|
|
95
|
+
hasDOTop: typing_TypeAlias = hasDOTop_boolop | hasDOTop_operator | hasDOTop_unaryop
|
|
96
|
+
hasDOToperand: typing_TypeAlias = ast.UnaryOp
|
|
97
|
+
hasDOTops: typing_TypeAlias = ast.Compare
|
|
98
|
+
hasDOToptional_vars: typing_TypeAlias = ast.withitem
|
|
99
|
+
hasDOTorelse_expr: typing_TypeAlias = ast.IfExp
|
|
100
|
+
if sys.version_info >= (3, 11):
|
|
101
|
+
hasDOTorelse_list_stmt: typing_TypeAlias = ast.AsyncFor | ast.For | ast.If | ast.Try | ast.TryStar | ast.While
|
|
102
|
+
else:
|
|
103
|
+
hasDOTorelse_list_stmt: typing_TypeAlias = ast.AsyncFor | ast.For | ast.If | ast.Try | ast.While
|
|
104
|
+
hasDOTorelse: typing_TypeAlias = hasDOTorelse_expr | hasDOTorelse_list_stmt
|
|
105
|
+
hasDOTpattern_pattern: typing_TypeAlias = ast.match_case
|
|
106
|
+
hasDOTpattern_patternOrNone: typing_TypeAlias = ast.MatchAs
|
|
107
|
+
hasDOTpattern: typing_TypeAlias = hasDOTpattern_pattern | hasDOTpattern_patternOrNone
|
|
108
|
+
hasDOTpatterns: typing_TypeAlias = ast.MatchClass | ast.MatchMapping | ast.MatchOr | ast.MatchSequence
|
|
109
|
+
hasDOTposonlyargs: typing_TypeAlias = ast.arguments
|
|
110
|
+
hasDOTrest: typing_TypeAlias = ast.MatchMapping
|
|
111
|
+
hasDOTreturns_expr: typing_TypeAlias = ast.FunctionType
|
|
112
|
+
hasDOTreturns_exprOrNone: typing_TypeAlias = ast.AsyncFunctionDef | ast.FunctionDef
|
|
113
|
+
hasDOTreturns: typing_TypeAlias = hasDOTreturns_expr | hasDOTreturns_exprOrNone
|
|
114
|
+
hasDOTright: typing_TypeAlias = ast.BinOp
|
|
115
|
+
hasDOTsimple: typing_TypeAlias = ast.AnnAssign
|
|
116
|
+
hasDOTslice: typing_TypeAlias = ast.Subscript
|
|
117
|
+
hasDOTstep: typing_TypeAlias = ast.Slice
|
|
118
|
+
hasDOTsubject: typing_TypeAlias = ast.Match
|
|
119
|
+
hasDOTtag: typing_TypeAlias = ast.TypeIgnore
|
|
120
|
+
hasDOTtarget_expr: typing_TypeAlias = ast.AsyncFor | ast.comprehension | ast.For
|
|
121
|
+
hasDOTtarget_Name: typing_TypeAlias = ast.NamedExpr
|
|
122
|
+
hasDOTtarget_NameOrAttributeOrSubscript: typing_TypeAlias = ast.AnnAssign | ast.AugAssign
|
|
123
|
+
hasDOTtarget: typing_TypeAlias = hasDOTtarget_expr | hasDOTtarget_Name | hasDOTtarget_NameOrAttributeOrSubscript
|
|
124
|
+
hasDOTtargets: typing_TypeAlias = ast.Assign | ast.Delete
|
|
125
|
+
hasDOTtest: typing_TypeAlias = ast.Assert | ast.If | ast.IfExp | ast.While
|
|
126
|
+
hasDOTtype: typing_TypeAlias = ast.ExceptHandler
|
|
127
|
+
hasDOTtype_comment: typing_TypeAlias = ast.arg | ast.Assign | ast.AsyncFor | ast.AsyncFunctionDef | ast.AsyncWith | ast.For | ast.FunctionDef | ast.With
|
|
128
|
+
hasDOTtype_ignores: typing_TypeAlias = ast.Module
|
|
129
|
+
if sys.version_info >= (3, 12):
|
|
130
|
+
hasDOTtype_params: typing_TypeAlias = ast.AsyncFunctionDef | ast.ClassDef | ast.FunctionDef | ast.TypeAlias
|
|
131
|
+
hasDOTupper: typing_TypeAlias = ast.Slice
|
|
132
|
+
hasDOTvalue_Any: typing_TypeAlias = ast.Constant
|
|
133
|
+
hasDOTvalue_boolOrNone: typing_TypeAlias = ast.MatchSingleton
|
|
134
|
+
if sys.version_info >= (3, 12):
|
|
135
|
+
hasDOTvalue_expr: typing_TypeAlias = ast.Assign | ast.Attribute | ast.AugAssign | ast.Await | ast.DictComp | ast.Expr | ast.FormattedValue | ast.keyword | ast.MatchValue | ast.NamedExpr | ast.Starred | ast.Subscript | ast.TypeAlias | ast.YieldFrom
|
|
136
|
+
else:
|
|
137
|
+
hasDOTvalue_expr: typing_TypeAlias = ast.Assign | ast.Attribute | ast.AugAssign | ast.Await | ast.DictComp | ast.Expr | ast.FormattedValue | ast.keyword | ast.MatchValue | ast.NamedExpr | ast.Starred | ast.Subscript | ast.YieldFrom
|
|
138
|
+
hasDOTvalue_exprOrNone: typing_TypeAlias = ast.AnnAssign | ast.Return | ast.Yield
|
|
139
|
+
hasDOTvalue: typing_TypeAlias = hasDOTvalue_Any | hasDOTvalue_boolOrNone | hasDOTvalue_expr | hasDOTvalue_exprOrNone
|
|
140
|
+
hasDOTvalues: typing_TypeAlias = ast.BoolOp | ast.Dict | ast.JoinedStr
|
|
141
|
+
hasDOTvararg: typing_TypeAlias = ast.arguments
|