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

moving all pendulum use into prefect.types #16609

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft

moving all pendulum use into prefect.types #16609

wants to merge 6 commits into from

Conversation

zzstoatzz
Copy link
Collaborator

@zzstoatzz zzstoatzz commented Jan 5, 2025

related to #16472 and pydantic/pydantic-extra-types#239

preliminary steps towards removing pendulum entirely

@zzstoatzz zzstoatzz changed the title moving all pendulum use into prefect.types moving all pendulum use into prefect.types Jan 5, 2025
@github-actions github-actions bot added bug Something isn't working docs labels Jan 5, 2025
Comment on lines -71 to -91
def __rich_repr__(self) -> RichReprResult:
# Display all of the fields in the model if they differ from the default value
for name, field in self.model_fields.items():
value = getattr(self, name)

# Simplify the display of some common fields
if field.annotation == UUID and value:
value = str(value)
elif (
isinstance(field.annotation, datetime.datetime)
and name == "timestamp"
and value
):
value = cast(pendulum.DateTime, pendulum.instance(value)).isoformat()
elif isinstance(field.annotation, datetime.datetime) and value:
value = cast(
pendulum.DateTime, pendulum.instance(value)
).diff_for_humans()

yield name, value, field.get_default()

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

i could keep this..... but why?

@@ -802,7 +807,7 @@ async def run(
warnings.filterwarnings("ignore", module="dateparser")

try:
start_time_parsed = dateparser.parse(
start_time_parsed = dateparser.parse( # type: ignore TODO: remove this?
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

i really don't understand why this exists either

@zzstoatzz zzstoatzz added development Tech debt, refactors, CI, tests, and other related work. docs and removed bug Something isn't working docs labels Jan 5, 2025
Copy link

codspeed-hq bot commented Jan 5, 2025

CodSpeed Performance Report

Merging #16609 will not alter performance

Comparing datetime (18015ec) with main (f905bde)

Summary

✅ 2 untouched benchmarks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
development Tech debt, refactors, CI, tests, and other related work. docs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant