kacpermuda commented on code in PR #66992:
URL: https://github.com/apache/airflow/pull/66992#discussion_r3324471275


##########
providers/openlineage/src/airflow/providers/openlineage/extractors/manager.py:
##########
@@ -184,12 +204,12 @@ def method_exists(method_name):
             return self.default_extractor
         return None
 
-    def _get_extractor(self, task: BaseOperator) -> BaseExtractor | None:
-        extractor = self.get_extractor_class(task)
-        self.log.debug("extractor for %s is %s", task.task_type, extractor)
-        if extractor:
-            return extractor(task)
-        return None
+    def _get_extractor(self, task: BaseOperator, source_code_enabled: bool = 
True) -> BaseExtractor | None:
+        extractor_cls = self.get_extractor_class(task)
+        self.log.debug("extractor for %s is %s", task.task_type, extractor_cls)
+        if extractor_cls is None:
+            return None
+        return extractor_cls(task, source_code_enabled=source_code_enabled)

Review Comment:
   Yup, fixed. I wrongly assumed that if I modify baseExtractor it will be 
enough to pass it as kwarg to init.



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