Taragolis commented on code in PR #34629:
URL: https://github.com/apache/airflow/pull/34629#discussion_r1338393007


##########
tests/operators/test_python.py:
##########
@@ -59,6 +59,10 @@
 from tests.test_utils import AIRFLOW_MAIN_FOLDER
 from tests.test_utils.db import clear_db_runs
 
+if TYPE_CHECKING:
+    from airflow.models.dagrun import DagRun
+
+TI = TaskInstance

Review Comment:
   I think we could do as follow up. In some tests `TI` uses as shorthand for 
`TaskInstance` and I'm not sure should we do that, because it might lead to 
situation as we have in this test where `TaskInstance` uses for type annotation 
inside of the tests and `TI` uses for create object 🙄 



##########
tests/operators/test_python.py:
##########
@@ -59,6 +59,10 @@
 from tests.test_utils import AIRFLOW_MAIN_FOLDER
 from tests.test_utils.db import clear_db_runs
 
+if TYPE_CHECKING:
+    from airflow.models.dagrun import DagRun
+
+TI = TaskInstance

Review Comment:
   I think we could do as follow up. In some tests `TI` uses as shorthand for 
`TaskInstance` and I'm not sure should we do that, because it might lead to 
situation as we have in this test where `TaskInstance` uses for type annotation 
inside of the tests and `TI` uses for create object 🙄 



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