-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
base: main
Are you sure you want to change the base?
Conversation
prefect.types
pendulum
use into prefect.types
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() | ||
|
There was a problem hiding this comment.
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? |
There was a problem hiding this comment.
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
CodSpeed Performance ReportMerging #16609 will not alter performanceComparing Summary
|
related to #16472 and pydantic/pydantic-extra-types#239
preliminary steps towards removing
pendulum
entirely