dstandish commented on code in PR #26114:
URL: https://github.com/apache/airflow/pull/26114#discussion_r964315023
##########
airflow/cli/commands/task_command.py:
##########
@@ -75,9 +75,9 @@ def _generate_temporary_run_id() -> str:
def _get_dag_run(
*,
dag: DAG,
- exec_date_or_run_id: str,
create_if_necessary: CreateIfNecessary,
- session: Session,
+ exec_date_or_run_id: Optional[str] = None,
+ session: Session = NEW_SESSION,
Review Comment:
i don't see why the one should prompt the other. the NEW_SESSION change
doesn't really change the behavior of the function. the reason it's there in
general is this:
```
# A fake session to use in functions decorated by provide_session. This
allows
# the 'session' argument to be of type Session instead of Optional[Session],
# making it easier to type hint the function body without dealing with the
None
# case that can never happen at runtime.
```
but for me, i'm adding it here simply because i want to keep it as the last
argument, so to do so, it needs a default, since i'm making exec date optional.
but what do you think?
--
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]