cadwyn 3.15.9__py3-none-any.whl → 4.0.0__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.
Potentially problematic release.
This version of cadwyn might be problematic. Click here for more details.
- cadwyn/__init__.py +25 -8
- cadwyn/__main__.py +46 -90
- cadwyn/_asts.py +9 -133
- cadwyn/_importer.py +31 -0
- cadwyn/_render.py +152 -0
- cadwyn/_utils.py +7 -107
- cadwyn/applications.py +5 -34
- cadwyn/exceptions.py +11 -3
- cadwyn/middleware.py +4 -4
- cadwyn/route_generation.py +22 -450
- cadwyn/routing.py +2 -5
- cadwyn/schema_generation.py +946 -0
- cadwyn/structure/__init__.py +0 -2
- cadwyn/structure/schemas.py +50 -49
- cadwyn/structure/versions.py +24 -137
- {cadwyn-3.15.9.dist-info → cadwyn-4.0.0.dist-info}/METADATA +4 -5
- cadwyn-4.0.0.dist-info/RECORD +27 -0
- cadwyn/_compat.py +0 -151
- cadwyn/_package_utils.py +0 -45
- cadwyn/codegen/README.md +0 -10
- cadwyn/codegen/__init__.py +0 -10
- cadwyn/codegen/_common.py +0 -168
- cadwyn/codegen/_main.py +0 -279
- cadwyn/codegen/_plugins/__init__.py +0 -0
- cadwyn/codegen/_plugins/class_migrations.py +0 -423
- cadwyn/codegen/_plugins/class_rebuilding.py +0 -109
- cadwyn/codegen/_plugins/class_renaming.py +0 -49
- cadwyn/codegen/_plugins/import_auto_adding.py +0 -64
- cadwyn/codegen/_plugins/module_migrations.py +0 -15
- cadwyn/main.py +0 -11
- cadwyn/structure/modules.py +0 -39
- cadwyn-3.15.9.dist-info/RECORD +0 -38
- {cadwyn-3.15.9.dist-info → cadwyn-4.0.0.dist-info}/LICENSE +0 -0
- {cadwyn-3.15.9.dist-info → cadwyn-4.0.0.dist-info}/WHEEL +0 -0
- {cadwyn-3.15.9.dist-info → cadwyn-4.0.0.dist-info}/entry_points.txt +0 -0
cadwyn/structure/modules.py
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import ast
|
|
2
|
-
import dataclasses
|
|
3
|
-
import textwrap
|
|
4
|
-
from dataclasses import InitVar, dataclass
|
|
5
|
-
from types import ModuleType
|
|
6
|
-
|
|
7
|
-
from cadwyn.exceptions import CadwynStructureError
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
@dataclass(slots=True)
|
|
11
|
-
class AlterModuleInstruction:
|
|
12
|
-
module: ModuleType
|
|
13
|
-
raw_import: InitVar[str]
|
|
14
|
-
import_: ast.Import | ast.ImportFrom = dataclasses.field(init=False)
|
|
15
|
-
|
|
16
|
-
def __post_init__(self, raw_import: str):
|
|
17
|
-
parsed_body = ast.parse(textwrap.dedent(raw_import)).body
|
|
18
|
-
if len(parsed_body) > 1:
|
|
19
|
-
raise CadwynStructureError(
|
|
20
|
-
f"You have specified more than just a single import. This is prohibited. "
|
|
21
|
-
f"Problematic string: {raw_import}",
|
|
22
|
-
)
|
|
23
|
-
if not isinstance(parsed_body[0], ast.Import | ast.ImportFrom):
|
|
24
|
-
raise CadwynStructureError(
|
|
25
|
-
f"You have specified a non-import statement. This is prohibited. Problematic string: {raw_import}",
|
|
26
|
-
)
|
|
27
|
-
self.import_ = parsed_body[0]
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
@dataclass(slots=True)
|
|
31
|
-
class AlterModuleInstructionFactory:
|
|
32
|
-
module: ModuleType
|
|
33
|
-
|
|
34
|
-
def had(self, *, import_: str) -> AlterModuleInstruction:
|
|
35
|
-
return AlterModuleInstruction(self.module, import_)
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
def module(module: ModuleType, /) -> AlterModuleInstructionFactory:
|
|
39
|
-
return AlterModuleInstructionFactory(module)
|
cadwyn-3.15.9.dist-info/RECORD
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
cadwyn/__init__.py,sha256=Wh_CtNgodacy8plxyDXCDb52CDftbql4jGXQ2pldX4s,605
|
|
2
|
-
cadwyn/__main__.py,sha256=cc-5iYItjxRnB09uxuxlEbjrLm1AEhXI2KrI5iakEOw,4376
|
|
3
|
-
cadwyn/_asts.py,sha256=0OcYNZPFm65CFb-oZMwbx191Bai0asqDA4y_IKzh6_w,10147
|
|
4
|
-
cadwyn/_compat.py,sha256=yAPmfGl2vVEYXlNHHPMoa2JkEJCVPjbP_Uz0WOIVOp4,5494
|
|
5
|
-
cadwyn/_package_utils.py,sha256=trxTYLmppv-10SKhScfyDQJh21rsQGFoLaOtHycKKR0,1443
|
|
6
|
-
cadwyn/_utils.py,sha256=BFsfZBpdoL5RMAaT1V1cXJVpTZCmwksQ-Le2MTHivGI,4841
|
|
7
|
-
cadwyn/applications.py,sha256=MkZ_vMs6YfnfuWPUzBjNBmrxtDa97etsV0zcnlv-iS0,15749
|
|
8
|
-
cadwyn/codegen/README.md,sha256=hc7AE87LsEsvbh-wX1H10JEWh-8bLHoe-1CkY3h00FI,879
|
|
9
|
-
cadwyn/codegen/__init__.py,sha256=JgddDjxMTjSfVrMXHwNu1ODgdn2QfPWpccrRKquBV6k,355
|
|
10
|
-
cadwyn/codegen/_common.py,sha256=fnz9Q-C7oZ3JKypPC_Xi6_CssF803XAUHL661IYY1hM,5910
|
|
11
|
-
cadwyn/codegen/_main.py,sha256=1mpXq_1AuZaAOeGjrCVMhcK7zhjmmlO82Q3ehoOOAfM,10483
|
|
12
|
-
cadwyn/codegen/_plugins/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
13
|
-
cadwyn/codegen/_plugins/class_migrations.py,sha256=kHZ-RMRTARZ4l70fxHMtul_204Ute2_yQmEej7wMwwo,20119
|
|
14
|
-
cadwyn/codegen/_plugins/class_rebuilding.py,sha256=_gjQsx_kU36tf8HT3mKhSv7V9RXfawFdbKTtYLP2IMk,3698
|
|
15
|
-
cadwyn/codegen/_plugins/class_renaming.py,sha256=oc9Ms6YnpJKaq1iOehcBfA_OFUFL-CAAZJiaQPlkKHs,1773
|
|
16
|
-
cadwyn/codegen/_plugins/import_auto_adding.py,sha256=krAVzsmsW-CbKP-W9oCkQsL7aPfhHzRq4STgai6Tm5s,2543
|
|
17
|
-
cadwyn/codegen/_plugins/module_migrations.py,sha256=TeWJk4Iu4SRQ9K2iI3v3sCs1110jrltKlPdfU9mXIsQ,722
|
|
18
|
-
cadwyn/exceptions.py,sha256=aJKx1qgzZqShL4MX3COjS780qzNJcdZFeGzYYa5gbzw,1726
|
|
19
|
-
cadwyn/main.py,sha256=kt2Vn7TIA4ZnD_xrgz57TOjUk-4zVP8SV8nuTZBEaaU,218
|
|
20
|
-
cadwyn/middleware.py,sha256=kUZK2dmoricMbv6knPCIHpXEInX2670XIwAj0v_XQxk,3408
|
|
21
|
-
cadwyn/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
22
|
-
cadwyn/route_generation.py,sha256=80LmEodZ5SgscnhVL4A3ck0t8RJK5d5Acnefyo4CfIc,41607
|
|
23
|
-
cadwyn/routing.py,sha256=o6IMjxTxARPa5BxFfsXqOP3bVw9Ya6OBAEbUwH9lMVM,7445
|
|
24
|
-
cadwyn/static/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
25
|
-
cadwyn/static/docs.html,sha256=WNm5ANJVy51TcIUFOaqKf1Z8eF86CC85TTHPxACtkzw,3455
|
|
26
|
-
cadwyn/structure/__init__.py,sha256=HjaNd6H4m4Cia42-dCO7A7sLWuVII7oldjaCabhbs_o,697
|
|
27
|
-
cadwyn/structure/common.py,sha256=6Z4nI97XPWTCinn6np73m-rLPyYNrz2fWXKJlqjsiaQ,269
|
|
28
|
-
cadwyn/structure/data.py,sha256=1ALPhBBCE_t4GrxM0Fa3hQ-jkORJgeWNySnZ42bsi0g,7382
|
|
29
|
-
cadwyn/structure/endpoints.py,sha256=JhTgVrqLjm5LkE9thjvU1UuWcSCmDgW2bMdqznsZb2Y,5777
|
|
30
|
-
cadwyn/structure/enums.py,sha256=iMokxA2QYJ61SzyB-Pmuq3y7KL7-e6TsnjLVUaVZQnw,954
|
|
31
|
-
cadwyn/structure/modules.py,sha256=v3hA_KiqKwwo-ur0Z84WvqD0rTTe4fBTkMUK8SxUj7s,1301
|
|
32
|
-
cadwyn/structure/schemas.py,sha256=0ylArAkUw626VkUOJSulOwJs7CS6lrGBRECEG5HFD4Q,8897
|
|
33
|
-
cadwyn/structure/versions.py,sha256=Vlp-H1K36NRztHRkNhagmNKgQbIP6bc0gAgm7egHCTs,37679
|
|
34
|
-
cadwyn-3.15.9.dist-info/LICENSE,sha256=KeCWewiDQYpmSnzF-p_0YpoWiyDcUPaCuG8OWQs4ig4,1072
|
|
35
|
-
cadwyn-3.15.9.dist-info/METADATA,sha256=LF_7ygrwYAOOqt8any8RynxqWL0I1hVI5seBiqjy7Rg,4397
|
|
36
|
-
cadwyn-3.15.9.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
|
|
37
|
-
cadwyn-3.15.9.dist-info/entry_points.txt,sha256=eO05hLn9GoRzzpwT9GONPmXKsonjuMNssM2D2WHWKGk,46
|
|
38
|
-
cadwyn-3.15.9.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|