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
Refactor shorter defaults #34350
Refactor shorter defaults #34350
Conversation
airflow/api/common/trigger_dag.py
Outdated
execution_date = execution_date if execution_date else timezone.utcnow() | ||
if execution_date is None: | ||
execution_date = timezone.utcnow() |
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.
Would execution_date = execution_date or timezone.utcnow()
work?
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.
Yes. However, while other cases are c = a or b
and we need to attribute something to c
, this is a = a or b
, so if a
is trueish, it is not modified.
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.
Yeah and I don’t think that’s a problem for this particular case.
Conflicts |
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.
CI Failures are from main, otherwise changes are clean. LGTM!
Rebased to see if it works with latest main. |
No description provided.