vincbeck commented on code in PR #28976:
URL: https://github.com/apache/airflow/pull/28976#discussion_r1072524664


##########
airflow/dag_processing/manager.py:
##########
@@ -725,7 +726,7 @@ def _refresh_dag_dir(self):
 
             try:
                 self.log.debug("Removing old import errors")
-                self.clear_nonexistent_import_errors()
+                
self.clear_nonexistent_import_errors(file_paths=self._file_paths)

Review Comment:
   It is a static method now
   
   ```suggestion
                   
DagFileProcessorManager.clear_nonexistent_import_errors(file_paths=self._file_paths)
   ```



##########
airflow/dag_processing/manager.py:
##########
@@ -769,16 +770,19 @@ def _print_stat(self):
                 self._log_file_processing_stats(self._file_paths)
             self.last_stat_print_time = time.monotonic()
 
+    @staticmethod
+    @internal_api_call
     @provide_session
-    def clear_nonexistent_import_errors(self, session):
+    def clear_nonexistent_import_errors(file_paths: list[str] = [], 
session=NEW_SESSION):

Review Comment:
   I dont think the default value for `file_paths` is needed
   
   ```suggestion
       def clear_nonexistent_import_errors(file_paths: list[str] | None, 
session=NEW_SESSION):
   ```



-- 
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: commits-unsubscr...@airflow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to