ferruzzi commented on code in PR #30104:
URL: https://github.com/apache/airflow/pull/30104#discussion_r1136068442


##########
airflow/utils/file.py:
##########
@@ -344,6 +344,10 @@ def might_contain_dag(file_path: str, safe_mode: bool, 
zip_file: zipfile.ZipFile
     :param zip_file: if passed, checks the archive. Otherwise, check local 
filesystem.
     :return: True, if file might contain DAGs.
     """
+    might_contain_dag_callable = conf.getimport("core", 
"might_contain_dag_callable")
+    if might_contain_dag_callable:
+        return might_contain_dag_callable(file_path=file_path, 
safe_mode=safe_mode, zip_file=zip_file)
+

Review Comment:
   I like the concept.  One suggestion:  I would move the existing heuristic 
into a callable and set that as the default value in the config and clean this 
method up.



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