potiuk commented on code in PR #44686:
URL: https://github.com/apache/airflow/pull/44686#discussion_r1871539756


##########
providers/src/airflow/providers/common/compat/lineage/hook.py:
##########
@@ -16,7 +16,10 @@
 # under the License.
 from __future__ import annotations
 
-from airflow.providers.common.compat import AIRFLOW_V_2_10_PLUS, 
AIRFLOW_V_3_0_PLUS
+from airflow.providers.common.compat import (
+    PROVIDERS_COMMON_COMPAT_AIRFLOW_IS_2_10_PLUS,
+    PROVIDERS_COMMON_COMPAT_AIRFLOW_IS_3_0_PLUS,

Review Comment:
   No. Using this you (unless you find a different way) you have to implement 
90+ rules to ban imports from N-1 providers - different for each provider sub 
tree. Surely we could generate those rules (again by pre-commit probably).
   
   But maybe I am mistaken and there is an easy way to use that ruff rule to 
ban "every constant name this way from any other package except import of it 
from my own subtree"
   
   Do you think it is possible @ashb?



##########
providers/src/airflow/providers/common/compat/lineage/hook.py:
##########
@@ -16,7 +16,10 @@
 # under the License.
 from __future__ import annotations
 
-from airflow.providers.common.compat import AIRFLOW_V_2_10_PLUS, 
AIRFLOW_V_3_0_PLUS
+from airflow.providers.common.compat import (
+    PROVIDERS_COMMON_COMPAT_AIRFLOW_IS_2_10_PLUS,
+    PROVIDERS_COMMON_COMPAT_AIRFLOW_IS_3_0_PLUS,

Review Comment:
   No. Using this you (unless you find a different way) you have to implement 
90+ rules to ban imports from N-1 providers - different for each provider sub 
tree. Surely we could generate those rules (again by pre-commit probably).
   
   But maybe I am mistaken and there is an easy way to use that ruff rule to 
ban "every constant named this way from any other package except import of it 
from my own subtree"
   
   Do you think it is possible @ashb?



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