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

rm extra pendulum annotations #14640

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file.
78 changes: 0 additions & 78 deletions src/prefect/_internal/pydantic/annotations/pendulum.py

This file was deleted.

14 changes: 0 additions & 14 deletions src/prefect/_internal/pydantic/v2_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,11 @@
import typing
import typing as t

import pendulum
import pydantic
from pydantic import BaseModel as V2BaseModel
from pydantic import ConfigDict, PydanticUndefinedAnnotation, create_model
from pydantic.type_adapter import TypeAdapter

from prefect._internal.pydantic.annotations.pendulum import (
PydanticPendulumDateTimeType,
PydanticPendulumDateType,
PydanticPendulumDurationType,
)
from prefect._internal.pydantic.schemas import GenerateEmptySchemaForUserClasses


Expand Down Expand Up @@ -74,14 +68,6 @@ def process_v2_params(

type_ = t.Any if param.annotation is inspect._empty else param.annotation

# Replace pendulum type annotations with our own so that they are pydantic compatible
if type_ == pendulum.DateTime:
type_ = PydanticPendulumDateTimeType
if type_ == pendulum.Date:
type_ = PydanticPendulumDateType
if type_ == pendulum.Duration:
type_ = PydanticPendulumDurationType

field = pydantic.Field(
default=... if param.default is param.empty else param.default,
title=param.name,
Expand Down
Loading