kaxil commented on a change in pull request #20163:
URL: https://github.com/apache/airflow/pull/20163#discussion_r765765579
##########
File path: airflow/models/dagrun.py
##########
@@ -398,7 +398,9 @@ def generate_run_id(run_type: DagRunType, execution_date:
datetime) -> str:
@provide_session
def get_task_instances(
- self, state: Optional[Iterable[TaskInstanceState]] = None, session=None
+ self,
+ state: Optional[Iterable[Optional[TaskInstanceState]]] = None,
+ session: Session = NEW_SESSION,
Review comment:
In a separate PR or this (your choice) - can you add a small section in
https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst#coding-style-and-best-practices
to let devs know when they should use `NEW_SESSION` vs `Session` for type hints
--
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]