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

 ##########
 File path: airflow/models/serialized_dag.py
 ##########
 @@ -57,6 +53,7 @@ class SerializedDagModel(Base):
     Because reading from database is lightweight compared to importing from 
files,
     it solves the webserver scalability issue.
     """
+    from airflow import DAG
 
 Review comment:
   Out of interest does this mean the `SerialiazedDagModel.DAG` is now a 
valid/reachable property?
   
   Shouldn't this also be `from airflow.models.dag import DAG` as it is in 
airflow core?
   
   And I think this is still evaluated at "parse time" (i.e. not delayed until 
a function call) so this could be at the top of the file with the rest of the 
imports?

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