amoghrajesh commented on code in PR #47008:
URL: https://github.com/apache/airflow/pull/47008#discussion_r1979684083


##########
.pre-commit-config.yaml:
##########
@@ -709,8 +710,11 @@ repos:
       - id: check-base-operator-usage
         language: pygrep
         name: Check BaseOperator[Link] other imports
-        description: Make sure BaseOperator[Link] is imported from 
airflow.models outside of core
-        entry: "from airflow\\.models\\.baseoperator(link)? import.* 
BaseOperator"
+        description: Make sure BaseOperator is imported from airflow.models 
and BaseOperatorLink is imported from airflow.models or airflow.sdk.* outside 
of core
+        entry: >
+          (from airflow\\.models\\.baseoperator import.* BaseOperator\\b|
+           from airflow\\.models import.* BaseOperatorLink\\b|
+           from airflow\\.sdk\\..* import.* BaseOperatorLink\\b)
         pass_filenames: true
         files: >
           (?x)

Review Comment:
   True, let me do that



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