kaxil commented on a change in pull request #6601: [AIRFLOW-6010] Remove cyclic 
imports and pylint disables
URL: https://github.com/apache/airflow/pull/6601#discussion_r348510804
 
 

 ##########
 File path: airflow/models/dagbag.py
 ##########
 @@ -124,7 +123,10 @@ def get_dag(self, dag_id, from_file_only=False):
         :param from_file_only: returns a DAG loaded from file.
         :type from_file_only: bool
         """
-        from airflow.models.dag import DagModel  # Avoid circular import
+        # Avoid circular import
+        from airflow.models.dag import DagModel
+        from airflow.models.serialized_dag import SerializedDagModel
 
 Review comment:
   The reason why this was mainly added in CONDITIONALS is we don't need to 
import these modules unless `if self.store_serialized_dags is TRUE`.
   
   

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


With regards,
Apache Git Services

Reply via email to