Skip to content

Commit

Permalink
finish pydantic migration
Browse files Browse the repository at this point in the history
  • Loading branch information
robsdavis committed Sep 27, 2024
1 parent 7708426 commit a25fa5c
Show file tree
Hide file tree
Showing 8 changed files with 819 additions and 258 deletions.
4 changes: 3 additions & 1 deletion src/synthcity/plugins/core/constraints.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
# synthcity absolute
import synthcity.logger as log

Rule = Tuple[str, str, Any] # Define a type alias for clarity


class Constraints(BaseModel):
"""
Expand Down Expand Up @@ -41,7 +43,7 @@ class Constraints(BaseModel):
and thresh is the threshold or data type.
"""

rules: list = []
rules: list[Rule] = []

@field_validator("rules", mode="before")
def _validate_rules(cls: Any, rules: List) -> List:
Expand Down
Loading

0 comments on commit a25fa5c

Please sign in to comment.