You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "uranusjr (via GitHub)" <gi...@apache.org> on 2023/08/16 04:14:42 UTC

[GitHub] [airflow] uranusjr commented on a diff in pull request #33417: Add typing to concrete taskflow examples

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


##########
docs/shared/template-examples/taskflow.rst:
##########
@@ -17,8 +17,12 @@
 
  .. code-block:: python
 
+    from airflow.models.taskinstance import TaskInstance
+    from airflow.models.dagrun import DagRun
+
+
     @task
-    def print_ti_info(task_instance=None, dag_run=None):
+    def print_ti_info(task_instance: TaskInstance | None = None, dag_run: DagRun | None = None):

Review Comment:
   I’ve had a mind to add a fix to the `=None` default (they really shouldn’t be needed), maybe I should do it now.



##########
docs/shared/template-examples/taskflow.rst:
##########
@@ -17,8 +17,12 @@
 
  .. code-block:: python
 
+    from airflow.models.taskinstance import TaskInstance
+    from airflow.models.dagrun import DagRun
+
+
     @task
-    def print_ti_info(task_instance=None, dag_run=None):
+    def print_ti_info(task_instance: TaskInstance | None = None, dag_run: DagRun | None = None):

Review Comment:
   I’ve had a mind to add a fix to the `=None` default (they really shouldn’t be needed), maybe I should do it now.



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org