uranusjr commented on code in PR #38570:
URL: https://github.com/apache/airflow/pull/38570#discussion_r1555519108


##########
airflow/serialization/pydantic/dag_run.py:
##########
@@ -78,7 +78,7 @@ def get_task_instances(
     def get_task_instance(
         self,
         task_id: str,
-        session: Session,
+        session: Session | None = None,

Review Comment:
   ref https://github.com/apache/airflow/pull/38563#discussion_r1553938903
   
   I thought the same when seeing this change. Instead of (potentially?) adding 
`| None` everywhere, it may be better to introduce a fake session object to 
simplify typing and runtime behaviour. We can also use `typing.cast()` to fake 
the Session type so the imports cay stay unchanged.



-- 
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]

Reply via email to