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


##########
pyproject.toml:
##########
@@ -802,6 +802,130 @@ testing = ["dev", "providers.tests", "tests_common", 
"tests", "system", "unit",
 # mechanism and whole .pyi is really "type-checking" only
 "providers/common/sql/src/airflow/providers/common/sql/hooks/sql.pyi" = 
["TID253"]
 
+# Allow Task SDK and its tests to import from task SDK
+"task-sdk/**" = ["TID251"]

Review Comment:
   Suggestion: maybe we should build our own pre-commit rule. I thibk 
eventyally what we want to have is to ban any import from a distribution that 
we do not have as dependency.
   
   As explained before - the **next** level of defence are tests: `uv sync` and 
tuning tests on code that imports from distribution that is not in dependencies 
of the project will fail.
   
   But this one is `late` and we should shift-left
   
   I wonder if there is a ruff rule that bans 'unnonwn' imports in generaƂ? If 
there is then simply running `uv run ruff` in the folder of the distribution 
that we want to check. It will run `uv sync` under the hood and it will remove 
any dependency that is not specified in the 'tested' distribution's 
pyproject.toml 



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