Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use pydantic extras for pendulum types #13396

Closed
wants to merge 3 commits into from

Conversation

aaazzam
Copy link
Contributor

@aaazzam aaazzam commented May 16, 2024

Previously in prefect._internal.schemas.fields:

# Rather than subclassing pendulum.DateTime to add our pydantic-specific validation,
# which will lead to a lot of funky typing issues, we'll just monkeypatch the pydantic
# validators onto the class.  Retaining this type alias means that we can still use it
# as we have been in class definitions, also guaranteeing that we'll be applying these
# validators by importing this module.

in this we use pydantic-extra-type's handling of pendulum.DateTime

@aaazzam aaazzam requested review from chrisguidry and a team as code owners May 16, 2024 01:18
Copy link
Collaborator

@chrisguidry chrisguidry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love it!

@aaazzam
Copy link
Contributor Author

aaazzam commented May 20, 2024

obviated by schemas-v2

@aaazzam aaazzam closed this May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants