Problem Description:
Rune allows attaching conditions directly to basic type aliases (e.g., typeAlias BusinessCenter: string condition IsValid). The Python generator does not yet support wrapping simple types to trigger these validators upon assignment.
Steps to Reproduce:
Example Rune code: (Type alias with condition)
typeAlias Currency:
string
condition C:
item count = 3
- Define a
typeAlias on a basic type (string, number, etc.) with an attached condition.
- Generate Python code and check the Pydantic field definition for the alias.
Expected Result:
The assignment should be intercepted and validated according to the condition.
Actual Result:
No validation occurs as the type is treated as a plain Python str.
Problem Description:
Rune allows attaching conditions directly to basic type aliases (e.g.,
typeAlias BusinessCenter: string condition IsValid). The Python generator does not yet support wrapping simple types to trigger these validators upon assignment.Steps to Reproduce:
Example Rune code: (Type alias with condition)
typeAliason a basic type (string, number, etc.) with an attachedcondition.Expected Result:
The assignment should be intercepted and validated according to the condition.
Actual Result:
No validation occurs as the type is treated as a plain Python
str.