houqp commented on a change in pull request #10153:
URL: https://github.com/apache/airflow/pull/10153#discussion_r472499741



##########
File path: airflow/models/baseoperator.py
##########
@@ -359,9 +363,12 @@ def __init__(
         do_xcom_push: bool = True,
         inlets: Optional[Any] = None,
         outlets: Optional[Any] = None,
+        task_group: Optional["TaskGroup"] = None,
         **kwargs
     ):
         from airflow.models.dag import DagContext
+        from airflow.utils.task_group import TaskGroupContext

Review comment:
       There is runtime overhead for every import statement even though the 
module has already been imported. the performance implication is probably not 
going to matter too much for this particular case, but in general, it's a good 
coding practice to keep import at the top of the file unless there is no other 
choice.




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to