Skip to content

Commit

Permalink
chore: Add default value for timestamp in FieldValidationErrorInfo class
Browse files Browse the repository at this point in the history
  • Loading branch information
Kamil Rybacki committed Jul 16, 2024
1 parent 50fe1e0 commit 3fc6108
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion phaistos/exceptions.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ class IncorrectFieldTypeError(ValueError): ...
class FieldValidationErrorInfo:
name: str
message: str
timestamp: datetime.datetime
timestamp: datetime.datetime = dataclasses.field(default_factory=datetime.datetime.now)
1 change: 1 addition & 0 deletions phaistos/typings.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ class TranspiledModelData(typing.TypedDict):
context: typing.NotRequired[dict[str, typing.Any]]
global_validator: typing.NotRequired[typing.Any]

@dataclasses.dataclass(kw_only=True)
class ValidationResults:
"""
A dataclass that represents the results of a validation.
Expand Down

0 comments on commit 3fc6108

Please sign in to comment.