vincbeck commented on code in PR #57799:
URL: https://github.com/apache/airflow/pull/57799#discussion_r2490870191
##########
airflow-core/src/airflow/models/deadline.py:
##########
@@ -107,7 +107,7 @@ class Deadline(Base):
# The time after which the Deadline has passed and the callback should be
triggered.
deadline_time: Mapped[datetime] = mapped_column(UtcDateTime,
nullable=False)
# The (serialized) callback to be called when the Deadline has passed.
- _callback: Mapped[dict] = mapped_column(
+ _callback: Mapped[Any] = mapped_column(
Review Comment:
We should not do that, given the type `JSONField`, it should be `dict`
##########
airflow-core/src/airflow/models/deadline.py:
##########
@@ -414,6 +414,7 @@ def _evaluate_with(self, *, session: Session, **kwargs:
Any) -> datetime | None:
dialect = get_dialect_name(session)
# Create database-specific expression for calculating duration in
seconds
+ duration_expr: Any | None = None
Review Comment:
Does not `Any` include `None`? And I think we can guess the type of
`duration_expr` It is used below to build the query so I guess the type should
be pretty straightforward to guess
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]