shahar1 commented on code in PR #73728:
URL: https://github.com/apache/airflow/pull/73728#discussion_r4110628832


##########
task-sdk/src/airflow/sdk/importers/python_importer.py:
##########
@@ -147,18 +147,18 @@ def list_dag_definitions(
         safe_mode: bool = True,
     ) -> Iterator[FileDagDefinition | DagImportError]:
         """
-        List Python DAG files in a bundle matching supported extensions.
+        List Python DAG files under the bundle path matching supported 
extensions.
 
         A lightweight content sniff (``might_contain_dag``) is applied here so 
files that
         clearly hold no DAG never become definitions -- keeping the discovered 
set (and the
         eventual parse-process count) close to the number of real DAG files. 
Zip members are
         discovered by :class:`..zip_importer.ZipImporter`, not here.
         """
-        if not bundle.path.is_dir():
-            return
         for definition in find_file_dag_definitions(bundle.path, 
self.supported_extensions):
             if self.might_contain_dag(definition, safe_mode):
                 yield definition
+            else:
+                log.debug("Skipping %r: no Airflow DAG markers found", 
definition)

Review Comment:
   nit: We try to align the codebase to use the term `Dag` instead of `DAG` 
(de-emphasizing the mathemtical concept) - I'll appreciate if you could also 
fix it in the commentary:
   
   ```suggestion
                   log.debug("Skipping %r: no Airflow Dag markers found", 
definition)
   ```



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