arnoldmr01 commented on code in PR #58025:
URL: https://github.com/apache/airflow/pull/58025#discussion_r2520811559
##########
airflow-core/src/airflow/models/dagrun.py:
##########
@@ -351,7 +352,7 @@ def __init__(
if queued_at is NOTSET:
self.queued_at = timezone.utcnow() if state == DagRunState.QUEUED
else None
elif queued_at is not None:
- self.queued_at = queued_at
+ self.queued_at = cast("datetime", queued_at)
Review Comment:
Just to make sure, why can’t if `queued_at is NOTSET` catch all ArgNotSet
cases? I asked GPT and it said mypy can’t narrow a custom sentinel. Is this a
limitation of mypy’s type-narrowing rules?
--
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]